/* 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.mics",
        "sources": [
            "pyqcstrc/icosah/mics.pyx"
        ]
    },
    "module_name": "pyqcstrc.icosah.mics"
}
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__mics
#define __PYX_HAVE_API__pyqcstrc__icosah__mics
/* 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/mics.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;

/* "pyqcstrc/icosah/mics.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_4mics_DTYPE_double_t;

/* "pyqcstrc/icosah/mics.pxd":8
 * 
 * ctypedef np.float64_t DTYPE_double_t
 * ctypedef long DTYPE_int_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef long __pyx_t_8pyqcstrc_6icosah_4mics_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 };

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char 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 *);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(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 PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_5math1_centroid)(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static double (*__pyx_f_8pyqcstrc_6icosah_5math1_triangle_area)(PyArrayObject *, PyArrayObject *, 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*/

/* Module declarations from 'pyqcstrc.icosah.numericalc' */
static int (*__pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment)(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
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 PyObject *(*__pyx_f_8pyqcstrc_6icosah_10numericalc_projection_numerical)(__pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, 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 int (*__pyx_f_8pyqcstrc_6icosah_5utils_equivalent_triangle)(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static int (*__pyx_f_8pyqcstrc_6icosah_5utils_equivalent_triangle_1)(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
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*/
static int (*__pyx_f_8pyqcstrc_6icosah_5utils_generator_xyz_dim4_tetrahedron)(PyArrayObject *, char, int, int __pyx_skip_dispatch); /*proto*/

/* Module declarations from 'pyqcstrc.icosah.intsct' */
static PyArrayObject *(*__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization)(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*/

/* Module declarations from 'pyqcstrc.icosah.mics' */
static __pyx_t_5numpy_float64_t __pyx_v_8pyqcstrc_6icosah_4mics_TAU;
static __pyx_t_5numpy_float64_t __pyx_v_8pyqcstrc_6icosah_4mics_TOL;
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_1(PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges(PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_smart(PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_using_parents(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification(PyArrayObject *, int, int, int, int, int, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_convex_polyhedron(PyArrayObject *, int, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_new(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev1(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev2(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_3(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(PyArrayObject *, PyArrayObject *, int); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_4mics_coplanar_check_two_triangles(PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyObject *__pyx_f_8pyqcstrc_6icosah_4mics_generate_obj_surface(PyArrayObject *, int, int); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(PyArrayObject *, PyArrayObject *, int); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_4mics_check_two_edges(PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_triangles_to_edges(PyArrayObject *, int); /*proto*/
static PyObject *__pyx_f_8pyqcstrc_6icosah_4mics_surface_cleaner(PyArrayObject *, int, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_chech_four_edges_forms_tetrahedron(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_extract_common_vertex(PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_extract_surface_without_specific_vertx(PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_4_tetrahedra_in_obj(PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(PyArrayObject *, PyArrayObject *); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_three_tetrahedra(PyArrayObject *, PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_four_tetrahedra(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_3_tetrahedra_in_obj(PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_2_tetrahedra_in_obj(PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_two_tetrahedra(PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_do_merge_tetrahedra_in_obj(PyArrayObject *, int, int, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_shuffle_obj(PyArrayObject *); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_4mics_on_out_surface(PyArrayObject *, PyArrayObject *); /*proto*/
static int __pyx_f_8pyqcstrc_6icosah_4mics_make_tmp_pod(PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_read_tmp_pod(int); /*proto*/
static PyObject *__pyx_f_8pyqcstrc_6icosah_4mics_read_file(char); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_tetrahedron_not_obj(PyArrayObject *, PyArrayObject *, int); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_subtraction_tetrahedron_object(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t = { "DTYPE_int_t", NULL, sizeof(__pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t), 0 };
#define __Pyx_MODULE_NAME "pyqcstrc.icosah.mics"
extern int __pyx_module_is_main_pyqcstrc__icosah__mics;
int __pyx_module_is_main_pyqcstrc__icosah__mics = 0;

/* Implementation of 'pyqcstrc.icosah.mics' */
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_min;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_d[] = "d";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_3d[] = "3d";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_to[] = " to ";
static const char __pyx_k_2_B[] = "          (2) B";
static const char __pyx_k__17[] = " ";
static const char __pyx_k__18[] = " (";
static const char __pyx_k__19[] = ")";
static const char __pyx_k__40[] = "         ";
static const char __pyx_k__41[] = "            ";
static const char __pyx_k__42[] = " -> ";
static const char __pyx_k__55[] = ") (";
static const char __pyx_k__58[] = ")(";
static const char __pyx_k__59[] = ", ";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_min[] = "min";
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_exit[] = "exit";
static const char __pyx_k_fail[] = "         fail";
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_obj3[] = "obj3";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_sqrt[] = "sqrt";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_10_6f[] = "10.6f";
static const char __pyx_k_10_8f[] = "10.8f";
static const char __pyx_k_ERROR[] = "ERROR";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_cycle[] = " cycle ";
static const char __pyx_k_found[] = "        found";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_tmp_d[] = "tmp%d";
static const char __pyx_k_A_CD_B[] = "          A==CD=B";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_arange[] = "arange";
static const char __pyx_k_flag_1[] = "         flag=1";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_merged[] = "           merged";
static const char __pyx_k_random[] = "random";
static const char __pyx_k_tolist[] = "tolist";
static const char __pyx_k_10_8f_2[] = "                            = %10.8f";
static const char __pyx_k_10_8f_3[] = "                               = %10.8f";
static const char __pyx_k_A_C_B_D[] = "          A==C==B D";
static const char __pyx_k_A_D_B_C[] = "          A==D==B C";
static const char __pyx_k_C_A_B_D[] = "          C A=====B D";
static const char __pyx_k_C_A_D_B[] = "          C A==D==B";
static const char __pyx_k_D_A_B_C[] = "          D A=====B C";
static const char __pyx_k_D_A_C_B[] = "          D A==C==B";
static const char __pyx_k_IOError[] = "IOError";
static const char __pyx_k_cycle_2[] = "       cycle ";
static const char __pyx_k_reshape[] = "reshape";
static const char __pyx_k_shuffle[] = "shuffle";
static const char __pyx_k_succeed[] = "        succeed: ";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_coplanar[] = "         coplanar";
static const char __pyx_k_merged_2[] = " (merged)";
static const char __pyx_k_merged_3[] = "         merged";
static const char __pyx_k_points_C[] = "    points C:";
static const char __pyx_k_readline[] = "readline";
static const char __pyx_k_1_A_and_B[] = "          (1) A and B";
static const char __pyx_k_3_A_not_B[] = "   (3) A not B";
static const char __pyx_k_len_tmp3d[] = "         len(tmp3d)=";
static const char __pyx_k_not_found[] = "        not found";
static const char __pyx_k_num_cycle[] = "num_cycle";
static const char __pyx_k_succdeded[] = "         succdeded";
static const char __pyx_k_tmp_d_xyz[] = "./tmp%d.xyz";
static const char __pyx_k_equivalent[] = "           equivalent";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_succdeded_2[] = "          succdeded";
static const char __pyx_k_equivalent_2[] = "          equivalent";
static const char __pyx_k_inequivalent[] = "           inequivalent";
static const char __pyx_k_not_coplanar[] = "         not coplanar";
static const char __pyx_k_not_coplaner[] = "              not coplaner";
static const char __pyx_k_volume_10_8f[] = "            volume, %10.8f";
static const char __pyx_k_cannot_merged[] = "           cannot merged";
static const char __pyx_k_num2_of_cycle[] = "num2_of_cycle";
static const char __pyx_k_num3_of_cycle[] = "num3_of_cycle";
static const char __pyx_k_num4_of_cycle[] = "num4_of_cycle";
static const char __pyx_k_verbose_level[] = "verbose_level";
static const char __pyx_k_inequivalent_2[] = "          inequivalent";
static const char __pyx_k_initial_volume[] = "       initial volume: ";
static const char __pyx_k_simplification[] = "        simplification: ";
static const char __pyx_k_check_two_edges[] = "         check_two_edges()";
static const char __pyx_k_merge_two_edges[] = "           merge_two_edges()";
static const char __pyx_k_num2_of_shuffle[] = "num2_of_shuffle";
static const char __pyx_k_num3_of_shuffle[] = "num3_of_shuffle";
static const char __pyx_k_num4_of_shuffle[] = "num4_of_shuffle";
static const char __pyx_k_surface_cleaner[] = "       surface_cleaner()";
static const char __pyx_k_initial_volume_2[] = "         initial volume: ";
static const char __pyx_k_simplification_2[] = "    simplification()";
static const char __pyx_k_volume_sum_2_tet[] = "         volume sum 2  tet = ";
static const char __pyx_k_volume_sum_3_tet[] = "         volume sum 3  tet = ";
static const char __pyx_k_number_of_edges_d[] = "            number of edges, %d";
static const char __pyx_k_number_of_egses_d[] = "           number of egses, %d";
static const char __pyx_k_object_not_object[] = "       object_not_object()";
static const char __pyx_k_volume_merged_tet[] = "         volume merged tet = ";
static const char __pyx_k_A_not_B_obj_volume[] = "          A not B obj, volume = ";
static const char __pyx_k_Object_subtraction[] = "       Object_subtraction()";
static const char __pyx_k_check_two_vertices[] = "          check_two_vertices()";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_total_volume_10_8f[] = "            total volume, %10.8f";
static const char __pyx_k_triangles_to_edges[] = "       triangles_to_edges()";
static const char __pyx_k_volume_initial_obj[] = "         volume initial obj = ";
static const char __pyx_k_check_two_triangles[] = "            check_two_triangles()";
static const char __pyx_k_return_previous_obj[] = "      return previous obj";
static const char __pyx_k_simplification_fail[] = "      simplification: fail";
static const char __pyx_k_tetrahedron_not_obj[] = "       tetrahedron_not_obj()";
static const char __pyx_k_generate_obj_surface[] = "      generate_obj_surface()";
static const char __pyx_k_merge_two_tetrahedra[] = "         merge_two_tetrahedra()";
static const char __pyx_k_number_of_trianges_d[] = "            number of trianges, %d";
static const char __pyx_k_obj1_NOT_obj2_volume[] = "      obj1 NOT obj2, volume = ";
static const char __pyx_k_object_subtraction_2[] = "    object_subtraction_2()";
static const char __pyx_k_object_subtraction_3[] = "        object_subtraction_3()";
static const char __pyx_k_two_segment_into_one[] = "            two_segment_into_one()";
static const char __pyx_k_d_th_set_of_triangles[] = "          %d-th set of triangles";
static const char __pyx_k_extract_common_vertex[] = "       extract_common_vertex()";
static const char __pyx_k_merge_four_tetrahedra[] = "         merge_four_tetrahedra()";
static const char __pyx_k_number_of_triangles_0[] = "        number of triangles, 0";
static const char __pyx_k_number_of_triangles_d[] = "        number of triangles, %d";
static const char __pyx_k_volume_of_reduced_obj[] = "         volume of reduced obj: ";
static const char __pyx_k_volume_simplified_obj[] = "         volume simplified obj = ";
static const char __pyx_k_merge_three_tetrahedra[] = "         merge_three_tetrahedra()";
static const char __pyx_k_object_subtraction_dev[] = " object_subtraction_dev()";
static const char __pyx_k_object_subtraction_new[] = "       object_subtraction_new()";
static const char __pyx_k_try_to_get_correct_obj[] = "         try to get correct obj";
static const char __pyx_k_volume_sum_4_tet_10_8f[] = "         volume sum 4  tet = %10.8f";
static const char __pyx_k_number_of_tetrahedron_d[] = "          number of tetrahedron, %d";
static const char __pyx_k_object_subtraction_dev1[] = " object_subtraction_dev1()";
static const char __pyx_k_object_subtraction_dev2[] = " object_subtraction_dev2()";
static const char __pyx_k_volume_merged_tet_10_8f[] = "         volume merged tet = %10.8f";
static const char __pyx_k_simplification_obj_edges[] = "      simplification_obj_edges()";
static const char __pyx_k_simplification_obj_smart[] = "      simplification_obj_smart()";
static const char __pyx_k_volume_initial_obj_10_8f[] = "         volume initial obj = %10.8f";
static const char __pyx_k_fail_initial_obj_returned[] = "        fail, initial obj returned";
static const char __pyx_k_merge_2_tetrahedra_in_obj[] = "         merge_2_tetrahedra_in_obj()";
static const char __pyx_k_merge_3_tetrahedra_in_obj[] = "        merge_3_tetrahedra_in_obj()";
static const char __pyx_k_merge_4_tetrahedra_in_obj[] = "         merge_4_tetrahedra_in_obj()";
static const char __pyx_k_number_of_common_vertex_0[] = "        number of common vertex, 0";
static const char __pyx_k_number_of_common_vertex_d[] = "        number of common vertex, %d";
static const char __pyx_k_number_of_tetrahedron_d_2[] = "    number of tetrahedron = %d";
static const char __pyx_k_do_merge_tetrahedra_in_obj[] = "        do_merge_tetrahedra_in_obj()";
static const char __pyx_k_simplification_obj_edges_1[] = "      simplification_obj_edges_1()";
static const char __pyx_k_fail_initial_obj_returned_2[] = "         fail, initial obj returned";
static const char __pyx_k_fail_initial_obj_returned_3[] = "          fail, initial obj returned";
static const char __pyx_k_fail_try_to_get_correct_obj[] = "         fail, try to get correct obj";
static const char __pyx_k_search_tetrahedron_in_edges[] = "          search_tetrahedron_in_edges()";
static const char __pyx_k_succdeded_simplified_volume[] = "        succdeded, simplified volume: ";
static const char __pyx_k_two_triangles_are_identical[] = "              two triangles are identical";
static const char __pyx_k_volume_simplified_obj_10_8f[] = "         volume simplified obj = %10.8f";
static const char __pyx_k_coplanar_check_two_triangles[] = "        coplanar_check_two_triangles()";
static const char __pyx_k_number_of_independent_edges_3[] = "            number of independent edges, 3";
static const char __pyx_k_number_of_independent_edges_d[] = "            number of independent edges, %d";
static const char __pyx_k_succdeded_simplified_volume_2[] = "       succdeded, simplified volume: ";
static const char __pyx_k_two_triangles_merged_into_one[] = "              two triangles merged into one";
static const char __pyx_k_simplification_obj_edges_using[] = "      simplification_obj_edges_using_parents()";
static const char __pyx_k_subtraction_tetrahedron_object[] = "       subtraction_tetrahedron_object()";
static const char __pyx_k_chech_four_edges_forms_tetrahed[] = "       chech_four_edges_forms_tetrahedron()";
static const char __pyx_k_extract_surface_without_specifi[] = "       extract_surface_without_specific_vertx()";
static const char __pyx_k_merge_points_A_and_points_B_tet[] = "    merge points A and points B -> tetrahedralization";
static const char __pyx_k_number_of_set_of_coplanar_trian[] = "        number of set of coplanar triangles, %d";
static const char __pyx_k_number_of_tetrahedron_in_reduce[] = "        number of tetrahedron in reduced obj, %d";
static const char __pyx_k_number_of_tetrahedron_outside_o[] = "    number of tetrahedron outside of obj2 = %d";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_simplification_convex_polyhedro[] = "      simplification_convex_polyhedron()";
static const char __pyx_k_two_triangles_are_sharing_one_e[] = "              two triangles are sharing one edge";
static const char __pyx_k_two_triangles_are_sharing_one_v[] = "              two triangles are sharing one vertex";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static const char __pyx_k_subtraction_tetrahedron_object_2[] = "         subtraction_tetrahedron_object_dev()";
static PyObject *__pyx_kp_u_10_6f;
static PyObject *__pyx_kp_u_10_8f;
static PyObject *__pyx_kp_u_10_8f_2;
static PyObject *__pyx_kp_u_10_8f_3;
static PyObject *__pyx_kp_u_1_A_and_B;
static PyObject *__pyx_kp_u_2_B;
static PyObject *__pyx_kp_u_3_A_not_B;
static PyObject *__pyx_kp_u_3d;
static PyObject *__pyx_kp_u_8_6f;
static PyObject *__pyx_kp_u_A_CD_B;
static PyObject *__pyx_kp_u_A_C_B_D;
static PyObject *__pyx_kp_u_A_D_B_C;
static PyObject *__pyx_kp_u_A_not_B_obj_volume;
static PyObject *__pyx_kp_u_C_A_B_D;
static PyObject *__pyx_kp_u_C_A_D_B;
static PyObject *__pyx_kp_u_D_A_B_C;
static PyObject *__pyx_kp_u_D_A_C_B;
static PyObject *__pyx_n_u_ERROR;
static PyObject *__pyx_n_s_IOError;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_u_Object_subtraction;
static PyObject *__pyx_kp_u__17;
static PyObject *__pyx_kp_u__18;
static PyObject *__pyx_kp_u__19;
static PyObject *__pyx_kp_u__40;
static PyObject *__pyx_kp_u__41;
static PyObject *__pyx_kp_u__42;
static PyObject *__pyx_kp_u__55;
static PyObject *__pyx_kp_u__58;
static PyObject *__pyx_kp_u__59;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_arange;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_kp_u_cannot_merged;
static PyObject *__pyx_kp_u_chech_four_edges_forms_tetrahed;
static PyObject *__pyx_kp_u_check_two_edges;
static PyObject *__pyx_kp_u_check_two_triangles;
static PyObject *__pyx_kp_u_check_two_vertices;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_kp_u_coplanar;
static PyObject *__pyx_kp_u_coplanar_check_two_triangles;
static PyObject *__pyx_kp_u_cycle;
static PyObject *__pyx_kp_u_cycle_2;
static PyObject *__pyx_n_u_d;
static PyObject *__pyx_kp_u_d_th_set_of_triangles;
static PyObject *__pyx_kp_u_do_merge_tetrahedra_in_obj;
static PyObject *__pyx_kp_u_equivalent;
static PyObject *__pyx_kp_u_equivalent_2;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_kp_u_extract_common_vertex;
static PyObject *__pyx_kp_u_extract_surface_without_specifi;
static PyObject *__pyx_kp_u_fail;
static PyObject *__pyx_kp_u_fail_initial_obj_returned;
static PyObject *__pyx_kp_u_fail_initial_obj_returned_2;
static PyObject *__pyx_kp_u_fail_initial_obj_returned_3;
static PyObject *__pyx_kp_u_fail_try_to_get_correct_obj;
static PyObject *__pyx_kp_u_flag_1;
static PyObject *__pyx_kp_u_found;
static PyObject *__pyx_kp_u_generate_obj_surface;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_kp_u_inequivalent;
static PyObject *__pyx_kp_u_inequivalent_2;
static PyObject *__pyx_kp_u_initial_volume;
static PyObject *__pyx_kp_u_initial_volume_2;
static PyObject *__pyx_kp_u_len_tmp3d;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_kp_u_merge_2_tetrahedra_in_obj;
static PyObject *__pyx_kp_u_merge_3_tetrahedra_in_obj;
static PyObject *__pyx_kp_u_merge_4_tetrahedra_in_obj;
static PyObject *__pyx_kp_u_merge_four_tetrahedra;
static PyObject *__pyx_kp_u_merge_points_A_and_points_B_tet;
static PyObject *__pyx_kp_u_merge_three_tetrahedra;
static PyObject *__pyx_kp_u_merge_two_edges;
static PyObject *__pyx_kp_u_merge_two_tetrahedra;
static PyObject *__pyx_kp_u_merged;
static PyObject *__pyx_kp_u_merged_2;
static PyObject *__pyx_kp_u_merged_3;
static PyObject *__pyx_n_s_min;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_kp_u_not_coplanar;
static PyObject *__pyx_kp_u_not_coplaner;
static PyObject *__pyx_kp_u_not_found;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_num2_of_cycle;
static PyObject *__pyx_n_s_num2_of_shuffle;
static PyObject *__pyx_n_s_num3_of_cycle;
static PyObject *__pyx_n_s_num3_of_shuffle;
static PyObject *__pyx_n_s_num4_of_cycle;
static PyObject *__pyx_n_s_num4_of_shuffle;
static PyObject *__pyx_n_s_num_cycle;
static PyObject *__pyx_kp_u_number_of_common_vertex_0;
static PyObject *__pyx_kp_u_number_of_common_vertex_d;
static PyObject *__pyx_kp_u_number_of_edges_d;
static PyObject *__pyx_kp_u_number_of_egses_d;
static PyObject *__pyx_kp_u_number_of_independent_edges_3;
static PyObject *__pyx_kp_u_number_of_independent_edges_d;
static PyObject *__pyx_kp_u_number_of_set_of_coplanar_trian;
static PyObject *__pyx_kp_u_number_of_tetrahedron_d;
static PyObject *__pyx_kp_u_number_of_tetrahedron_d_2;
static PyObject *__pyx_kp_u_number_of_tetrahedron_in_reduce;
static PyObject *__pyx_kp_u_number_of_tetrahedron_outside_o;
static PyObject *__pyx_kp_u_number_of_trianges_d;
static PyObject *__pyx_kp_u_number_of_triangles_0;
static PyObject *__pyx_kp_u_number_of_triangles_d;
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_NOT_obj2_volume;
static PyObject *__pyx_n_s_obj2;
static PyObject *__pyx_n_s_obj3;
static PyObject *__pyx_kp_u_object_not_object;
static PyObject *__pyx_kp_u_object_subtraction_2;
static PyObject *__pyx_kp_u_object_subtraction_3;
static PyObject *__pyx_kp_u_object_subtraction_dev;
static PyObject *__pyx_kp_u_object_subtraction_dev1;
static PyObject *__pyx_kp_u_object_subtraction_dev2;
static PyObject *__pyx_kp_u_object_subtraction_new;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_kp_u_points_C;
static PyObject *__pyx_n_s_print;
static PyObject *__pyx_n_u_r;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_readline;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_kp_u_return_previous_obj;
static PyObject *__pyx_kp_u_search_tetrahedron_in_edges;
static PyObject *__pyx_n_s_shuffle;
static PyObject *__pyx_kp_u_simplification;
static PyObject *__pyx_kp_u_simplification_2;
static PyObject *__pyx_kp_u_simplification_convex_polyhedro;
static PyObject *__pyx_kp_u_simplification_fail;
static PyObject *__pyx_kp_u_simplification_obj_edges;
static PyObject *__pyx_kp_u_simplification_obj_edges_1;
static PyObject *__pyx_kp_u_simplification_obj_edges_using;
static PyObject *__pyx_kp_u_simplification_obj_smart;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_sqrt;
static PyObject *__pyx_kp_u_subtraction_tetrahedron_object;
static PyObject *__pyx_kp_u_subtraction_tetrahedron_object_2;
static PyObject *__pyx_kp_u_succdeded;
static PyObject *__pyx_kp_u_succdeded_2;
static PyObject *__pyx_kp_u_succdeded_simplified_volume;
static PyObject *__pyx_kp_u_succdeded_simplified_volume_2;
static PyObject *__pyx_kp_u_succeed;
static PyObject *__pyx_kp_u_surface_cleaner;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_kp_u_tetrahedron_not_obj;
static PyObject *__pyx_kp_u_tmp_d;
static PyObject *__pyx_kp_u_tmp_d_xyz;
static PyObject *__pyx_kp_u_to;
static PyObject *__pyx_n_s_tolist;
static PyObject *__pyx_kp_u_total_volume_10_8f;
static PyObject *__pyx_kp_u_triangles_to_edges;
static PyObject *__pyx_kp_u_try_to_get_correct_obj;
static PyObject *__pyx_kp_u_two_segment_into_one;
static PyObject *__pyx_kp_u_two_triangles_are_identical;
static PyObject *__pyx_kp_u_two_triangles_are_sharing_one_e;
static PyObject *__pyx_kp_u_two_triangles_are_sharing_one_v;
static PyObject *__pyx_kp_u_two_triangles_merged_into_one;
static PyObject *__pyx_n_s_verbose;
static PyObject *__pyx_n_s_verbose_level;
static PyObject *__pyx_kp_u_volume_10_8f;
static PyObject *__pyx_kp_u_volume_initial_obj;
static PyObject *__pyx_kp_u_volume_initial_obj_10_8f;
static PyObject *__pyx_kp_u_volume_merged_tet;
static PyObject *__pyx_kp_u_volume_merged_tet_10_8f;
static PyObject *__pyx_kp_u_volume_of_reduced_obj;
static PyObject *__pyx_kp_u_volume_simplified_obj;
static PyObject *__pyx_kp_u_volume_simplified_obj_10_8f;
static PyObject *__pyx_kp_u_volume_sum_2_tet;
static PyObject *__pyx_kp_u_volume_sum_3_tet;
static PyObject *__pyx_kp_u_volume_sum_4_tet_10_8f;
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_simplification_convex_polyhedron(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_2simplification_obj_smart(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_4simplification_obj_edges_using_parents(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_num_cycle, int __pyx_v_verbose_level); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_6simplification_obj_edges_1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_8simplification_obj_edges(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose_level); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_10simplification(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num2_of_cycle, int __pyx_v_num3_of_cycle, int __pyx_v_num4_of_cycle, int __pyx_v_num2_of_shuffle, int __pyx_v_num3_of_shuffle, int __pyx_v_num4_of_shuffle, int __pyx_v_verbose_level); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_12object_subtraction_2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_14object_subtraction(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_16object_subtraction_new(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_18object_subtraction_dev1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_20object_subtraction_dev(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_22object_subtraction_dev2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose); /* proto */
static PyObject *__pyx_pf_8pyqcstrc_6icosah_4mics_24object_subtraction_3(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose); /* proto */
static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_index = {0, &__pyx_n_s_index, 0, 0, 0};
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_36;
static PyObject *__pyx_int_54;
static PyObject *__pyx_int_72;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__82;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
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;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
/* Late includes */

/* "pyqcstrc/icosah/mics.pyx":19
 * cdef np.float64_t TOL=1e-6 # tolerance
 * 
 * cdef np.ndarray two_segment_into_one(np.ndarray[DTYPE_int_t, ndim=3] line_segment_1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=3] line_segment_2,
 *                                     int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(PyArrayObject *__pyx_v_line_segment_1, PyArrayObject *__pyx_v_line_segment_2, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_counter;
  PyObject *__pyx_v_comb = 0;
  PyArrayObject *__pyx_v_tmp1 = 0;
  PyArrayObject *__pyx_v_edge1a = 0;
  PyArrayObject *__pyx_v_edge1b = 0;
  PyArrayObject *__pyx_v_edge2a = 0;
  PyArrayObject *__pyx_v_edge2b = 0;
  Py_ssize_t __pyx_v_i1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge1a;
  __Pyx_Buffer __pyx_pybuffer_edge1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge1b;
  __Pyx_Buffer __pyx_pybuffer_edge1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge2a;
  __Pyx_Buffer __pyx_pybuffer_edge2a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge2b;
  __Pyx_Buffer __pyx_pybuffer_edge2b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_line_segment_1;
  __Pyx_Buffer __pyx_pybuffer_line_segment_1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_line_segment_2;
  __Pyx_Buffer __pyx_pybuffer_line_segment_2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1;
  __Pyx_Buffer __pyx_pybuffer_tmp1;
  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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyArrayObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyArrayObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("two_segment_into_one", 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_edge1a.pybuffer.buf = NULL;
  __pyx_pybuffer_edge1a.refcount = 0;
  __pyx_pybuffernd_edge1a.data = NULL;
  __pyx_pybuffernd_edge1a.rcbuffer = &__pyx_pybuffer_edge1a;
  __pyx_pybuffer_edge1b.pybuffer.buf = NULL;
  __pyx_pybuffer_edge1b.refcount = 0;
  __pyx_pybuffernd_edge1b.data = NULL;
  __pyx_pybuffernd_edge1b.rcbuffer = &__pyx_pybuffer_edge1b;
  __pyx_pybuffer_edge2a.pybuffer.buf = NULL;
  __pyx_pybuffer_edge2a.refcount = 0;
  __pyx_pybuffernd_edge2a.data = NULL;
  __pyx_pybuffernd_edge2a.rcbuffer = &__pyx_pybuffer_edge2a;
  __pyx_pybuffer_edge2b.pybuffer.buf = NULL;
  __pyx_pybuffer_edge2b.refcount = 0;
  __pyx_pybuffernd_edge2b.data = NULL;
  __pyx_pybuffernd_edge2b.rcbuffer = &__pyx_pybuffer_edge2b;
  __pyx_pybuffer_line_segment_1.pybuffer.buf = NULL;
  __pyx_pybuffer_line_segment_1.refcount = 0;
  __pyx_pybuffernd_line_segment_1.data = NULL;
  __pyx_pybuffernd_line_segment_1.rcbuffer = &__pyx_pybuffer_line_segment_1;
  __pyx_pybuffer_line_segment_2.pybuffer.buf = NULL;
  __pyx_pybuffer_line_segment_2.refcount = 0;
  __pyx_pybuffernd_line_segment_2.data = NULL;
  __pyx_pybuffernd_line_segment_2.rcbuffer = &__pyx_pybuffer_line_segment_2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer, (PyObject*)__pyx_v_line_segment_1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 19, __pyx_L1_error)
  }
  __pyx_pybuffernd_line_segment_1.diminfo[0].strides = __pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_line_segment_1.diminfo[0].shape = __pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_line_segment_1.diminfo[1].strides = __pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_line_segment_1.diminfo[1].shape = __pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_line_segment_1.diminfo[2].strides = __pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_line_segment_1.diminfo[2].shape = __pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer, (PyObject*)__pyx_v_line_segment_2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 19, __pyx_L1_error)
  }
  __pyx_pybuffernd_line_segment_2.diminfo[0].strides = __pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_line_segment_2.diminfo[0].shape = __pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_line_segment_2.diminfo[1].strides = __pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_line_segment_2.diminfo[1].shape = __pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_line_segment_2.diminfo[2].strides = __pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_line_segment_2.diminfo[2].shape = __pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":28
 *     cdef np.ndarray[DTYPE_int_t, ndim=2] edge1a,edge1b,edge2a,edge2b
 * 
 *     comb=[[0,1,0,1],[0,1,1,0],[1,0,0,1],[1,0,1,0]]             # <<<<<<<<<<<<<<
 *     #edge1=np.array([0])
 *     #removed_vtrx=np.array([0])
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_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_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_1);
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __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_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_0);
  __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
  __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_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_0);
  __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_v_comb = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":31
 *     #edge1=np.array([0])
 *     #removed_vtrx=np.array([0])
 *     counter=0             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  __pyx_v_counter = 0;

  /* "pyqcstrc/icosah/mics.pyx":33
 *     counter=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            two_segment_into_one()')
 *     else:
 */
  __pyx_t_6 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_6) {

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

    /* "pyqcstrc/icosah/mics.pyx":33
 *     counter=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            two_segment_into_one()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":36
 *         print('            two_segment_into_one()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     for i1 in range(len(comb)):
 *         edge1a=line_segment_1[comb[i1][0]]
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":37
 *     else:
 *         pass
 *     for i1 in range(len(comb)):             # <<<<<<<<<<<<<<
 *         edge1a=line_segment_1[comb[i1][0]]
 *         edge1b=line_segment_1[comb[i1][1]]
 */
  __pyx_t_7 = PyList_GET_SIZE(__pyx_v_comb); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 37, __pyx_L1_error)
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i1 = __pyx_t_9;

    /* "pyqcstrc/icosah/mics.pyx":38
 *         pass
 *     for i1 in range(len(comb)):
 *         edge1a=line_segment_1[comb[i1][0]]             # <<<<<<<<<<<<<<
 *         edge1b=line_segment_1[comb[i1][1]]
 *         edge2a=line_segment_2[comb[i1][2]]
 */
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_line_segment_1), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __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, 38, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1a.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 0;
      }
      __pyx_pybuffernd_edge1a.diminfo[0].strides = __pyx_pybuffernd_edge1a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge1a.diminfo[0].shape = __pyx_pybuffernd_edge1a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge1a.diminfo[1].strides = __pyx_pybuffernd_edge1a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge1a.diminfo[1].shape = __pyx_pybuffernd_edge1a.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 38, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge1a, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":39
 *     for i1 in range(len(comb)):
 *         edge1a=line_segment_1[comb[i1][0]]
 *         edge1b=line_segment_1[comb[i1][1]]             # <<<<<<<<<<<<<<
 *         edge2a=line_segment_2[comb[i1][2]]
 *         edge2b=line_segment_2[comb[i1][3]]
 */
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_line_segment_1), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __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, 39, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1b.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        }
        __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 0;
      }
      __pyx_pybuffernd_edge1b.diminfo[0].strides = __pyx_pybuffernd_edge1b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge1b.diminfo[0].shape = __pyx_pybuffernd_edge1b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge1b.diminfo[1].strides = __pyx_pybuffernd_edge1b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge1b.diminfo[1].shape = __pyx_pybuffernd_edge1b.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 39, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge1b, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":40
 *         edge1a=line_segment_1[comb[i1][0]]
 *         edge1b=line_segment_1[comb[i1][1]]
 *         edge2a=line_segment_2[comb[i1][2]]             # <<<<<<<<<<<<<<
 *         edge2b=line_segment_2[comb[i1][3]]
 *         #a1,a2,a3,a4,a5,a6=projection(edge1a[0],edge1a[1],edge1a[2],edge1a[3],edge1a[4],edge1a[5])
 */
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_line_segment_2), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __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, 40, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2a.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 0;
      }
      __pyx_pybuffernd_edge2a.diminfo[0].strides = __pyx_pybuffernd_edge2a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge2a.diminfo[0].shape = __pyx_pybuffernd_edge2a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge2a.diminfo[1].strides = __pyx_pybuffernd_edge2a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge2a.diminfo[1].shape = __pyx_pybuffernd_edge2a.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 40, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge2a, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":41
 *         edge1b=line_segment_1[comb[i1][1]]
 *         edge2a=line_segment_2[comb[i1][2]]
 *         edge2b=line_segment_2[comb[i1][3]]             # <<<<<<<<<<<<<<
 *         #a1,a2,a3,a4,a5,a6=projection(edge1a[0],edge1a[1],edge1a[2],edge1a[3],edge1a[4],edge1a[5])
 *         #a1,a2,a3,b4,b5,b6=projection(edge2a[0],edge2a[1],edge2a[2],edge2a[3],edge2a[4],edge2a[5])
 */
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_line_segment_2), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __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, 41, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2b.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        }
        __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 0;
      }
      __pyx_pybuffernd_edge2b.diminfo[0].strides = __pyx_pybuffernd_edge2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge2b.diminfo[0].shape = __pyx_pybuffernd_edge2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge2b.diminfo[1].strides = __pyx_pybuffernd_edge2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge2b.diminfo[1].shape = __pyx_pybuffernd_edge2b.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 41, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge2b, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":45
 *         #a1,a2,a3,b4,b5,b6=projection(edge2a[0],edge2a[1],edge2a[2],edge2a[3],edge2a[4],edge2a[5])
 *         #if np.all(a4==b4) and np.all(a5==b5) and np.all(a6==b6):
 *         flag=check_two_vertices(edge1a,edge2a,verbose-1)             # <<<<<<<<<<<<<<
 *         if flag==1: # equivalent
 *             flag=point_on_segment(edge1a,edge1b,edge2b)
 */
    __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(((PyArrayObject *)__pyx_v_edge1a), ((PyArrayObject *)__pyx_v_edge2a), (__pyx_v_verbose - 1));

    /* "pyqcstrc/icosah/mics.pyx":46
 *         #if np.all(a4==b4) and np.all(a5==b5) and np.all(a6==b6):
 *         flag=check_two_vertices(edge1a,edge2a,verbose-1)
 *         if flag==1: # equivalent             # <<<<<<<<<<<<<<
 *             flag=point_on_segment(edge1a,edge1b,edge2b)
 *             if flag==0:
 */
    __pyx_t_6 = ((__pyx_v_flag == 1) != 0);
    if (__pyx_t_6) {

      /* "pyqcstrc/icosah/mics.pyx":47
 *         flag=check_two_vertices(edge1a,edge2a,verbose-1)
 *         if flag==1: # equivalent
 *             flag=point_on_segment(edge1a,edge1b,edge2b)             # <<<<<<<<<<<<<<
 *             if flag==0:
 *                 tmp1=np.append(edge1b,edge2b)
 */
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment(((PyArrayObject *)__pyx_v_edge1a), ((PyArrayObject *)__pyx_v_edge1b), ((PyArrayObject *)__pyx_v_edge2b), 0);

      /* "pyqcstrc/icosah/mics.pyx":48
 *         if flag==1: # equivalent
 *             flag=point_on_segment(edge1a,edge1b,edge2b)
 *             if flag==0:             # <<<<<<<<<<<<<<
 *                 tmp1=np.append(edge1b,edge2b)
 *                 tmp1=np.append(tmp1,edge1a)
 */
      __pyx_t_6 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_6) {

        /* "pyqcstrc/icosah/mics.pyx":49
 *             flag=point_on_segment(edge1a,edge1b,edge2b)
 *             if flag==0:
 *                 tmp1=np.append(edge1b,edge2b)             # <<<<<<<<<<<<<<
 *                 tmp1=np.append(tmp1,edge1a)
 *                 #edge1=np.append(edge1b,edge2b)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        __pyx_t_11 = 0;
        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_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_edge1b), ((PyObject *)__pyx_v_edge2b)};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __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_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_edge1b), ((PyObject *)__pyx_v_edge2b)};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_edge1b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_edge1b));
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, ((PyObject *)__pyx_v_edge1b));
          __Pyx_INCREF(((PyObject *)__pyx_v_edge2b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_edge2b));
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, ((PyObject *)__pyx_v_edge2b));
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 49, __pyx_L1_error)
        __pyx_t_15 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_11 < 0)) {
            PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
            }
            __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 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_11 < 0)) __PYX_ERR(0, 49, __pyx_L1_error)
        }
        __pyx_t_15 = 0;
        __pyx_v_tmp1 = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":50
 *             if flag==0:
 *                 tmp1=np.append(edge1b,edge2b)
 *                 tmp1=np.append(tmp1,edge1a)             # <<<<<<<<<<<<<<
 *                 #edge1=np.append(edge1b,edge2b)
 *                 #removed_vtrx=edge1a
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1), ((PyObject *)__pyx_v_edge1a)};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_3, ((PyObject *)__pyx_v_tmp1), ((PyObject *)__pyx_v_edge1a)};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_3) {
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_11, ((PyObject *)__pyx_v_tmp1));
          __Pyx_INCREF(((PyObject *)__pyx_v_edge1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_edge1a));
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, ((PyObject *)__pyx_v_edge1a));
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __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, 50, __pyx_L1_error)
        __pyx_t_15 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
          __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_11 < 0)) {
            PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
            }
            __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 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_11 < 0)) __PYX_ERR(0, 50, __pyx_L1_error)
        }
        __pyx_t_15 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":53
 *                 #edge1=np.append(edge1b,edge2b)
 *                 #removed_vtrx=edge1a
 *                 counter+=1             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
        __pyx_v_counter = (__pyx_v_counter + 1);

        /* "pyqcstrc/icosah/mics.pyx":54
 *                 #removed_vtrx=edge1a
 *                 counter+=1
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L5_break;

        /* "pyqcstrc/icosah/mics.pyx":48
 *         if flag==1: # equivalent
 *             flag=point_on_segment(edge1a,edge1b,edge2b)
 *             if flag==0:             # <<<<<<<<<<<<<<
 *                 tmp1=np.append(edge1b,edge2b)
 *                 tmp1=np.append(tmp1,edge1a)
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":56
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }

      /* "pyqcstrc/icosah/mics.pyx":46
 *         #if np.all(a4==b4) and np.all(a5==b5) and np.all(a6==b6):
 *         flag=check_two_vertices(edge1a,edge2a,verbose-1)
 *         if flag==1: # equivalent             # <<<<<<<<<<<<<<
 *             flag=point_on_segment(edge1a,edge1b,edge2b)
 *             if flag==0:
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/mics.pyx":58
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     #return edge1,removed_vtrx
 *     if counter!=0:
 */
    /*else*/ {
    }
    __pyx_L6:;
  }
  __pyx_L5_break:;

  /* "pyqcstrc/icosah/mics.pyx":60
 *             pass
 *     #return edge1,removed_vtrx
 *     if counter!=0:             # <<<<<<<<<<<<<<
 *         return tmp1.reshape(3,6,3)
 *     else:
 */
  __pyx_t_6 = ((__pyx_v_counter != 0) != 0);
  if (__pyx_t_6) {

    /* "pyqcstrc/icosah/mics.pyx":61
 *     #return edge1,removed_vtrx
 *     if counter!=0:
 *         return tmp1.reshape(3,6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[0]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __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, 61, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":60
 *             pass
 *     #return edge1,removed_vtrx
 *     if counter!=0:             # <<<<<<<<<<<<<<
 *         return tmp1.reshape(3,6,3)
 *     else:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":63
 *         return tmp1.reshape(3,6,3)
 *     else:
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray check_two_triangles(np.ndarray[DTYPE_int_t, ndim=3] triange_1,
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __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, 63, __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, 63, __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, 63, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":19
 * cdef np.float64_t TOL=1e-6 # tolerance
 * 
 * cdef np.ndarray two_segment_into_one(np.ndarray[DTYPE_int_t, ndim=3] line_segment_1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=3] line_segment_2,
 *                                     int verbose):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { 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_edge1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.two_segment_into_one", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_line_segment_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_line_segment_2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_comb);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1);
  __Pyx_XDECREF((PyObject *)__pyx_v_edge1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_edge1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_edge2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_edge2b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":65
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray check_two_triangles(np.ndarray[DTYPE_int_t, ndim=3] triange_1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=3] triange_2,
 *                                     int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_check_two_triangles(PyArrayObject *__pyx_v_triange_1, PyArrayObject *__pyx_v_triange_2, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_i5;
  int __pyx_v_i6;
  int __pyx_v_i7;
  int __pyx_v_i8;
  int __pyx_v_counter;
  CYTHON_UNUSED PyArrayObject *__pyx_v_t1 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_t2 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_t3 = 0;
  PyArrayObject *__pyx_v_a1 = 0;
  PyArrayObject *__pyx_v_a2 = 0;
  PyArrayObject *__pyx_v_a3 = 0;
  PyArrayObject *__pyx_v_b1 = 0;
  PyArrayObject *__pyx_v_b2 = 0;
  PyArrayObject *__pyx_v_b3 = 0;
  PyArrayObject *__pyx_v_c1 = 0;
  PyArrayObject *__pyx_v_c2 = 0;
  PyArrayObject *__pyx_v_c3 = 0;
  PyArrayObject *__pyx_v_d1 = 0;
  PyArrayObject *__pyx_v_d2 = 0;
  PyArrayObject *__pyx_v_d3 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp2b = 0;
  PyArrayObject *__pyx_v_tmp2c = 0;
  PyArrayObject *__pyx_v_tmp2d = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyObject *__pyx_v_comb1 = 0;
  PyObject *__pyx_v_tmp3c = NULL;
  PyArrayObject *__pyx_v_tmp3d = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a1;
  __Pyx_Buffer __pyx_pybuffer_a1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a2;
  __Pyx_Buffer __pyx_pybuffer_a2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a3;
  __Pyx_Buffer __pyx_pybuffer_a3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b1;
  __Pyx_Buffer __pyx_pybuffer_b1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b2;
  __Pyx_Buffer __pyx_pybuffer_b2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b3;
  __Pyx_Buffer __pyx_pybuffer_b3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c1;
  __Pyx_Buffer __pyx_pybuffer_c1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c2;
  __Pyx_Buffer __pyx_pybuffer_c2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c3;
  __Pyx_Buffer __pyx_pybuffer_c3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_d1;
  __Pyx_Buffer __pyx_pybuffer_d1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_d2;
  __Pyx_Buffer __pyx_pybuffer_d2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_d3;
  __Pyx_Buffer __pyx_pybuffer_d3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_t1;
  __Pyx_Buffer __pyx_pybuffer_t1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_t2;
  __Pyx_Buffer __pyx_pybuffer_t2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_t3;
  __Pyx_Buffer __pyx_pybuffer_t3;
  __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_tmp2b;
  __Pyx_Buffer __pyx_pybuffer_tmp2b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2c;
  __Pyx_Buffer __pyx_pybuffer_tmp2c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2d;
  __Pyx_Buffer __pyx_pybuffer_tmp2d;
  __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_triange_1;
  __Pyx_Buffer __pyx_pybuffer_triange_1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_triange_2;
  __Pyx_Buffer __pyx_pybuffer_triange_2;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyArrayObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyArrayObject *__pyx_t_20 = NULL;
  PyArrayObject *__pyx_t_21 = NULL;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  int __pyx_t_24;
  int __pyx_t_25;
  PyObject *__pyx_t_26 = NULL;
  PyArrayObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_two_triangles", 0);
  __pyx_pybuffer_t1.pybuffer.buf = NULL;
  __pyx_pybuffer_t1.refcount = 0;
  __pyx_pybuffernd_t1.data = NULL;
  __pyx_pybuffernd_t1.rcbuffer = &__pyx_pybuffer_t1;
  __pyx_pybuffer_t2.pybuffer.buf = NULL;
  __pyx_pybuffer_t2.refcount = 0;
  __pyx_pybuffernd_t2.data = NULL;
  __pyx_pybuffernd_t2.rcbuffer = &__pyx_pybuffer_t2;
  __pyx_pybuffer_t3.pybuffer.buf = NULL;
  __pyx_pybuffer_t3.refcount = 0;
  __pyx_pybuffernd_t3.data = NULL;
  __pyx_pybuffernd_t3.rcbuffer = &__pyx_pybuffer_t3;
  __pyx_pybuffer_a1.pybuffer.buf = NULL;
  __pyx_pybuffer_a1.refcount = 0;
  __pyx_pybuffernd_a1.data = NULL;
  __pyx_pybuffernd_a1.rcbuffer = &__pyx_pybuffer_a1;
  __pyx_pybuffer_a2.pybuffer.buf = NULL;
  __pyx_pybuffer_a2.refcount = 0;
  __pyx_pybuffernd_a2.data = NULL;
  __pyx_pybuffernd_a2.rcbuffer = &__pyx_pybuffer_a2;
  __pyx_pybuffer_a3.pybuffer.buf = NULL;
  __pyx_pybuffer_a3.refcount = 0;
  __pyx_pybuffernd_a3.data = NULL;
  __pyx_pybuffernd_a3.rcbuffer = &__pyx_pybuffer_a3;
  __pyx_pybuffer_b1.pybuffer.buf = NULL;
  __pyx_pybuffer_b1.refcount = 0;
  __pyx_pybuffernd_b1.data = NULL;
  __pyx_pybuffernd_b1.rcbuffer = &__pyx_pybuffer_b1;
  __pyx_pybuffer_b2.pybuffer.buf = NULL;
  __pyx_pybuffer_b2.refcount = 0;
  __pyx_pybuffernd_b2.data = NULL;
  __pyx_pybuffernd_b2.rcbuffer = &__pyx_pybuffer_b2;
  __pyx_pybuffer_b3.pybuffer.buf = NULL;
  __pyx_pybuffer_b3.refcount = 0;
  __pyx_pybuffernd_b3.data = NULL;
  __pyx_pybuffernd_b3.rcbuffer = &__pyx_pybuffer_b3;
  __pyx_pybuffer_c1.pybuffer.buf = NULL;
  __pyx_pybuffer_c1.refcount = 0;
  __pyx_pybuffernd_c1.data = NULL;
  __pyx_pybuffernd_c1.rcbuffer = &__pyx_pybuffer_c1;
  __pyx_pybuffer_c2.pybuffer.buf = NULL;
  __pyx_pybuffer_c2.refcount = 0;
  __pyx_pybuffernd_c2.data = NULL;
  __pyx_pybuffernd_c2.rcbuffer = &__pyx_pybuffer_c2;
  __pyx_pybuffer_c3.pybuffer.buf = NULL;
  __pyx_pybuffer_c3.refcount = 0;
  __pyx_pybuffernd_c3.data = NULL;
  __pyx_pybuffernd_c3.rcbuffer = &__pyx_pybuffer_c3;
  __pyx_pybuffer_d1.pybuffer.buf = NULL;
  __pyx_pybuffer_d1.refcount = 0;
  __pyx_pybuffernd_d1.data = NULL;
  __pyx_pybuffernd_d1.rcbuffer = &__pyx_pybuffer_d1;
  __pyx_pybuffer_d2.pybuffer.buf = NULL;
  __pyx_pybuffer_d2.refcount = 0;
  __pyx_pybuffernd_d2.data = NULL;
  __pyx_pybuffernd_d2.rcbuffer = &__pyx_pybuffer_d2;
  __pyx_pybuffer_d3.pybuffer.buf = NULL;
  __pyx_pybuffer_d3.refcount = 0;
  __pyx_pybuffernd_d3.data = NULL;
  __pyx_pybuffernd_d3.rcbuffer = &__pyx_pybuffer_d3;
  __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_tmp2b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2b.refcount = 0;
  __pyx_pybuffernd_tmp2b.data = NULL;
  __pyx_pybuffernd_tmp2b.rcbuffer = &__pyx_pybuffer_tmp2b;
  __pyx_pybuffer_tmp2c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2c.refcount = 0;
  __pyx_pybuffernd_tmp2c.data = NULL;
  __pyx_pybuffernd_tmp2c.rcbuffer = &__pyx_pybuffer_tmp2c;
  __pyx_pybuffer_tmp2d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2d.refcount = 0;
  __pyx_pybuffernd_tmp2d.data = NULL;
  __pyx_pybuffernd_tmp2d.rcbuffer = &__pyx_pybuffer_tmp2d;
  __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_triange_1.pybuffer.buf = NULL;
  __pyx_pybuffer_triange_1.refcount = 0;
  __pyx_pybuffernd_triange_1.data = NULL;
  __pyx_pybuffernd_triange_1.rcbuffer = &__pyx_pybuffer_triange_1;
  __pyx_pybuffer_triange_2.pybuffer.buf = NULL;
  __pyx_pybuffer_triange_2.refcount = 0;
  __pyx_pybuffernd_triange_2.data = NULL;
  __pyx_pybuffernd_triange_2.rcbuffer = &__pyx_pybuffer_triange_2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triange_1.rcbuffer->pybuffer, (PyObject*)__pyx_v_triange_1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 65, __pyx_L1_error)
  }
  __pyx_pybuffernd_triange_1.diminfo[0].strides = __pyx_pybuffernd_triange_1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triange_1.diminfo[0].shape = __pyx_pybuffernd_triange_1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triange_1.diminfo[1].strides = __pyx_pybuffernd_triange_1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triange_1.diminfo[1].shape = __pyx_pybuffernd_triange_1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triange_1.diminfo[2].strides = __pyx_pybuffernd_triange_1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triange_1.diminfo[2].shape = __pyx_pybuffernd_triange_1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triange_2.rcbuffer->pybuffer, (PyObject*)__pyx_v_triange_2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 65, __pyx_L1_error)
  }
  __pyx_pybuffernd_triange_2.diminfo[0].strides = __pyx_pybuffernd_triange_2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triange_2.diminfo[0].shape = __pyx_pybuffernd_triange_2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triange_2.diminfo[1].strides = __pyx_pybuffernd_triange_2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triange_2.diminfo[1].shape = __pyx_pybuffernd_triange_2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triange_2.diminfo[2].strides = __pyx_pybuffernd_triange_2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triange_2.diminfo[2].shape = __pyx_pybuffernd_triange_2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":81
 *     cdef list comb1
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            check_two_triangles()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":81
 *     cdef list comb1
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('            check_two_triangles()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":84
 *         print('            check_two_triangles()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     tmp3a=triange_1
 *     tmp3b=triange_2
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":85
 *     else:
 *         pass
 *     tmp3a=triange_1             # <<<<<<<<<<<<<<
 *     tmp3b=triange_2
 * 
 */
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_triange_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 85, __pyx_L1_error)
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_triange_1));
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_v_triange_1);

  /* "pyqcstrc/icosah/mics.pyx":86
 *         pass
 *     tmp3a=triange_1
 *     tmp3b=triange_2             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.append(triange_1,triange_2)
 */
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_triange_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 86, __pyx_L1_error)
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_triange_2));
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_v_triange_2);

  /* "pyqcstrc/icosah/mics.pyx":88
 *     tmp3b=triange_2
 * 
 *     tmp1a=np.append(triange_1,triange_2)             # <<<<<<<<<<<<<<
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if coplanar_check(tmp3b)==1: # 2
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_append); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_3 = 0;
  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_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_triange_1), ((PyObject *)__pyx_v_triange_2)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_triange_1), ((PyObject *)__pyx_v_triange_2)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_triange_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_triange_1));
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, ((PyObject *)__pyx_v_triange_1));
    __Pyx_INCREF(((PyObject *)__pyx_v_triange_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_triange_2));
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, ((PyObject *)__pyx_v_triange_2));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __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, 88, __pyx_L1_error)
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_3 < 0)) __PYX_ERR(0, 88, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":89
 * 
 *     tmp1a=np.append(triange_1,triange_2)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))             # <<<<<<<<<<<<<<
 *     if coplanar_check(tmp3b)==1: # 2
 *         if len(tmp3b)==3: # 2
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 18.0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_9, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_9, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_3, __pyx_t_9);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_3, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_3, __pyx_int_3);
    __pyx_t_9 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __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, 89, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_2), 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_8), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 89, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_8));
  __pyx_t_8 = 0;

  /* "pyqcstrc/icosah/mics.pyx":90
 *     tmp1a=np.append(triange_1,triange_2)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if coplanar_check(tmp3b)==1: # 2             # <<<<<<<<<<<<<<
 *         if len(tmp3b)==3: # 2
 *             if verbose>0:
 */
  __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check(((PyArrayObject *)__pyx_v_tmp3b), 0) == 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":91
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if coplanar_check(tmp3b)==1: # 2
 *         if len(tmp3b)==3: # 2             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('              two triangles are identical')
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 91, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_11 == 3) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":92
 *     if coplanar_check(tmp3b)==1: # 2
 *         if len(tmp3b)==3: # 2
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('              two triangles are identical')
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":93
 *         if len(tmp3b)==3: # 2
 *             if verbose>0:
 *                 print('              two triangles are identical')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyqcstrc/icosah/mics.pyx":92
 *     if coplanar_check(tmp3b)==1: # 2
 *         if len(tmp3b)==3: # 2
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('              two triangles are identical')
 *             else:
 */
        goto __pyx_L6;
      }

      /* "pyqcstrc/icosah/mics.pyx":96
 *             else:
 *                 pass
 *                 return triange_1             # <<<<<<<<<<<<<<
 *         elif len(tmp3b)==4: # 2
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_triange_1));
        __pyx_r = ((PyArrayObject *)__pyx_v_triange_1);
        goto __pyx_L0;
      }
      __pyx_L6:;

      /* "pyqcstrc/icosah/mics.pyx":91
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if coplanar_check(tmp3b)==1: # 2
 *         if len(tmp3b)==3: # 2             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('              two triangles are identical')
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":97
 *                 pass
 *                 return triange_1
 *         elif len(tmp3b)==4: # 2             # <<<<<<<<<<<<<<
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 97, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_11 == 4) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":98
 *                 return triange_1
 *         elif len(tmp3b)==4: # 2
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]             # <<<<<<<<<<<<<<
 *             for i1 in range(len(comb1)):
 *                 [i3,i4,i7]=comb1[i1]
 */
      __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 98, __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_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_1);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_3);
      __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __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_INCREF(__pyx_int_2);
      __Pyx_GIVEREF(__pyx_int_2);
      PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_1);
      __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_12, 0, __pyx_int_1);
      __Pyx_INCREF(__pyx_int_2);
      __Pyx_GIVEREF(__pyx_int_2);
      PyList_SET_ITEM(__pyx_t_12, 1, __pyx_int_2);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_12, 2, __pyx_int_0);
      __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_8);
      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_12);
      PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_12);
      __pyx_t_8 = 0;
      __pyx_t_2 = 0;
      __pyx_t_12 = 0;
      __pyx_v_comb1 = ((PyObject*)__pyx_t_9);
      __pyx_t_9 = 0;

      /* "pyqcstrc/icosah/mics.pyx":99
 *         elif len(tmp3b)==4: # 2
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):             # <<<<<<<<<<<<<<
 *                 [i3,i4,i7]=comb1[i1]
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 */
      __pyx_t_11 = PyList_GET_SIZE(__pyx_v_comb1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 99, __pyx_L1_error)
      __pyx_t_13 = __pyx_t_11;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_13; __pyx_t_3+=1) {
        __pyx_v_i1 = __pyx_t_3;

        /* "pyqcstrc/icosah/mics.pyx":100
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):
 *                 [i3,i4,i7]=comb1[i1]             # <<<<<<<<<<<<<<
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 *                 t1,t2,t3,c1,c2,c3=projection(tmp3a[i4][0],tmp3a[i4][1],tmp3a[i4][2],tmp3a[i4][3],tmp3a[i4][4],tmp3a[i4][5])
 */
        __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_comb1, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
          PyObject* sequence = __pyx_t_9;
          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, 100, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          #else
          __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 100, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext;
          index = 0; __pyx_t_12 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_12)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_12);
          index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          index = 2; __pyx_t_8 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_7), 3) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
          __pyx_t_14 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L10_unpacking_done;
          __pyx_L9_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_14 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 100, __pyx_L1_error)
          __pyx_L10_unpacking_done:;
        }
        __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_i3 = __pyx_t_15;
        __pyx_v_i4 = __pyx_t_16;
        __pyx_v_i7 = __pyx_t_17;

        /* "pyqcstrc/icosah/mics.pyx":101
 *             for i1 in range(len(comb1)):
 *                 [i3,i4,i7]=comb1[i1]
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])             # <<<<<<<<<<<<<<
 *                 t1,t2,t3,c1,c2,c3=projection(tmp3a[i4][0],tmp3a[i4][1],tmp3a[i4][2],tmp3a[i4][3],tmp3a[i4][4],tmp3a[i4][5])
 *                 tmp2a=np.array([a1,a2,a3])
 */
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_9, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_9, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_9 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_19), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        if (likely(__pyx_t_9 != Py_None)) {
          PyObject* sequence = __pyx_t_9;
          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, 101, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_19 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_18 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_12 = 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_19);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          #else
          {
            Py_ssize_t i;
            PyObject** temps[6] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_7,&__pyx_t_12,&__pyx_t_2,&__pyx_t_8};
            for (i=0; i < 6; i++) {
              PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 101, __pyx_L1_error)
              __Pyx_GOTREF(item);
              *(temps[i]) = item;
            }
          }
          #endif
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 101, __pyx_L1_error)
        }
        if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_19);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_v_t1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t1.diminfo[0].strides = __pyx_pybuffernd_t1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t1.diminfo[0].shape = __pyx_pybuffernd_t1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t1, ((PyArrayObject *)__pyx_t_19));
        __pyx_t_19 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_18);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_v_t2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t2.diminfo[0].strides = __pyx_pybuffernd_t2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t2.diminfo[0].shape = __pyx_pybuffernd_t2.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t2, ((PyArrayObject *)__pyx_t_18));
        __pyx_t_18 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_7);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_v_t3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t3.diminfo[0].strides = __pyx_pybuffernd_t3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t3.diminfo[0].shape = __pyx_pybuffernd_t3.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t3, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_12);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_12));
        __pyx_t_12 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_8);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_8));
        __pyx_t_8 = 0;

        /* "pyqcstrc/icosah/mics.pyx":102
 *                 [i3,i4,i7]=comb1[i1]
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 *                 t1,t2,t3,c1,c2,c3=projection(tmp3a[i4][0],tmp3a[i4][1],tmp3a[i4][2],tmp3a[i4][3],tmp3a[i4][4],tmp3a[i4][5])             # <<<<<<<<<<<<<<
 *                 tmp2a=np.array([a1,a2,a3])
 *                 tmp2c=np.array([c1,c2,c3])
 */
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_9, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_9, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_9 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_19), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        if (likely(__pyx_t_9 != Py_None)) {
          PyObject* sequence = __pyx_t_9;
          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, 102, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_19 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_18 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_12 = 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_19);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          #else
          {
            Py_ssize_t i;
            PyObject** temps[6] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_7,&__pyx_t_12,&__pyx_t_2,&__pyx_t_8};
            for (i=0; i < 6; i++) {
              PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 102, __pyx_L1_error)
              __Pyx_GOTREF(item);
              *(temps[i]) = item;
            }
          }
          #endif
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 102, __pyx_L1_error)
        }
        if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 102, __pyx_L1_error)
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_19);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_v_t1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t1.diminfo[0].strides = __pyx_pybuffernd_t1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t1.diminfo[0].shape = __pyx_pybuffernd_t1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 102, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_DECREF_SET(__pyx_v_t1, ((PyArrayObject *)__pyx_t_19));
        __pyx_t_19 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_18);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_v_t2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t2.diminfo[0].strides = __pyx_pybuffernd_t2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t2.diminfo[0].shape = __pyx_pybuffernd_t2.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 102, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_DECREF_SET(__pyx_v_t2, ((PyArrayObject *)__pyx_t_18));
        __pyx_t_18 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_7);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_v_t3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t3.diminfo[0].strides = __pyx_pybuffernd_t3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t3.diminfo[0].shape = __pyx_pybuffernd_t3.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 102, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_DECREF_SET(__pyx_v_t3, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_12);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c1.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c1.rcbuffer->pybuffer, (PyObject*)__pyx_v_c1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c1.diminfo[0].strides = __pyx_pybuffernd_c1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c1.diminfo[0].shape = __pyx_pybuffernd_c1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 102, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_c1, ((PyArrayObject *)__pyx_t_12));
        __pyx_t_12 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c2.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c2.rcbuffer->pybuffer, (PyObject*)__pyx_v_c2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c2.diminfo[0].strides = __pyx_pybuffernd_c2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c2.diminfo[0].shape = __pyx_pybuffernd_c2.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 102, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_c2, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_8);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c3.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c3.rcbuffer->pybuffer, (PyObject*)__pyx_v_c3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c3.diminfo[0].strides = __pyx_pybuffernd_c3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c3.diminfo[0].shape = __pyx_pybuffernd_c3.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 102, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_c3, ((PyArrayObject *)__pyx_t_8));
        __pyx_t_8 = 0;

        /* "pyqcstrc/icosah/mics.pyx":103
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 *                 t1,t2,t3,c1,c2,c3=projection(tmp3a[i4][0],tmp3a[i4][1],tmp3a[i4][2],tmp3a[i4][3],tmp3a[i4][4],tmp3a[i4][5])
 *                 tmp2a=np.array([a1,a2,a3])             # <<<<<<<<<<<<<<
 *                 tmp2c=np.array([c1,c2,c3])
 *                 counter=0
 */
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(((PyObject *)__pyx_v_a1));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_a1));
        PyList_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_a1));
        __Pyx_INCREF(((PyObject *)__pyx_v_a2));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_a2));
        PyList_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_a2));
        __Pyx_INCREF(((PyObject *)__pyx_v_a3));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_a3));
        PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_v_a3));
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_9 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 103, __pyx_L1_error)
        __pyx_t_21 = ((PyArrayObject *)__pyx_t_9);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_17 < 0)) __PYX_ERR(0, 103, __pyx_L1_error)
        }
        __pyx_t_21 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_9));
        __pyx_t_9 = 0;

        /* "pyqcstrc/icosah/mics.pyx":104
 *                 t1,t2,t3,c1,c2,c3=projection(tmp3a[i4][0],tmp3a[i4][1],tmp3a[i4][2],tmp3a[i4][3],tmp3a[i4][4],tmp3a[i4][5])
 *                 tmp2a=np.array([a1,a2,a3])
 *                 tmp2c=np.array([c1,c2,c3])             # <<<<<<<<<<<<<<
 *                 counter=0
 *                 for i2 in range(len(comb1)):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(((PyObject *)__pyx_v_c1));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_c1));
        PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_c1));
        __Pyx_INCREF(((PyObject *)__pyx_v_c2));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_c2));
        PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_c2));
        __Pyx_INCREF(((PyObject *)__pyx_v_c3));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_c3));
        PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_c3));
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        __pyx_t_9 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_12, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 104, __pyx_L1_error)
        __pyx_t_21 = ((PyArrayObject *)__pyx_t_9);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp2c.diminfo[0].strides = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2c.diminfo[0].shape = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2c.diminfo[1].strides = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2c.diminfo[1].shape = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.shape[1];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 104, __pyx_L1_error)
        }
        __pyx_t_21 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp2c, ((PyArrayObject *)__pyx_t_9));
        __pyx_t_9 = 0;

        /* "pyqcstrc/icosah/mics.pyx":105
 *                 tmp2a=np.array([a1,a2,a3])
 *                 tmp2c=np.array([c1,c2,c3])
 *                 counter=0             # <<<<<<<<<<<<<<
 *                 for i2 in range(len(comb1)):
 *                     [i5,i6,i8]=comb1[i2]
 */
        __pyx_v_counter = 0;

        /* "pyqcstrc/icosah/mics.pyx":106
 *                 tmp2c=np.array([c1,c2,c3])
 *                 counter=0
 *                 for i2 in range(len(comb1)):             # <<<<<<<<<<<<<<
 *                     [i5,i6,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i5][0],tmp3b[i5][1],tmp3b[i5][2],tmp3b[i5][3],tmp3b[i5][4],tmp3b[i5][5])
 */
        __pyx_t_22 = PyList_GET_SIZE(__pyx_v_comb1); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 106, __pyx_L1_error)
        __pyx_t_23 = __pyx_t_22;
        for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_23; __pyx_t_17+=1) {
          __pyx_v_i2 = __pyx_t_17;

          /* "pyqcstrc/icosah/mics.pyx":107
 *                 counter=0
 *                 for i2 in range(len(comb1)):
 *                     [i5,i6,i8]=comb1[i2]             # <<<<<<<<<<<<<<
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i5][0],tmp3b[i5][1],tmp3b[i5][2],tmp3b[i5][3],tmp3b[i5][4],tmp3b[i5][5])
 *                     t1,t2,t3,d1,d2,d3=projection(tmp3b[i6][0],tmp3b[i6][1],tmp3b[i6][2],tmp3b[i6][3],tmp3b[i6][4],tmp3b[i6][5])
 */
          __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_comb1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
            PyObject* sequence = __pyx_t_9;
            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, 107, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); 
            } else {
              __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_12 = PyList_GET_ITEM(sequence, 2); 
            }
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_12);
            #else
            __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 107, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 107, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            #endif
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_7 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext;
            index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_8);
            index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_2);
            index = 2; __pyx_t_12 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_12);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_7), 3) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
            __pyx_t_14 = NULL;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L14_unpacking_done;
            __pyx_L13_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_14 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 107, __pyx_L1_error)
            __pyx_L14_unpacking_done:;
          }
          __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_v_i5 = __pyx_t_16;
          __pyx_v_i6 = __pyx_t_15;
          __pyx_v_i8 = __pyx_t_24;

          /* "pyqcstrc/icosah/mics.pyx":108
 *                 for i2 in range(len(comb1)):
 *                     [i5,i6,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i5][0],tmp3b[i5][1],tmp3b[i5][2],tmp3b[i5][3],tmp3b[i5][4],tmp3b[i5][5])             # <<<<<<<<<<<<<<
 *                     t1,t2,t3,d1,d2,d3=projection(tmp3b[i6][0],tmp3b[i6][1],tmp3b[i6][2],tmp3b[i6][3],tmp3b[i6][4],tmp3b[i6][5])
 *                     tmp2b=np.array([b1,b2,b3])
 */
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_9, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_9, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_9 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_19), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (likely(__pyx_t_9 != Py_None)) {
            PyObject* sequence = __pyx_t_9;
            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, 108, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_19 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_18 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
            __pyx_t_12 = PyList_GET_ITEM(sequence, 5); 
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_12);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[6] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_7,&__pyx_t_8,&__pyx_t_2,&__pyx_t_12};
              for (i=0; i < 6; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 108, __pyx_L1_error)
                __Pyx_GOTREF(item);
                *(temps[i]) = item;
              }
            }
            #endif
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 108, __pyx_L1_error)
          }
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 108, __pyx_L1_error)
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_19);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_v_t1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t1.diminfo[0].strides = __pyx_pybuffernd_t1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t1.diminfo[0].shape = __pyx_pybuffernd_t1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t1, ((PyArrayObject *)__pyx_t_19));
          __pyx_t_19 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_v_t2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t2.diminfo[0].strides = __pyx_pybuffernd_t2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t2.diminfo[0].shape = __pyx_pybuffernd_t2.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t2, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_7);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_v_t3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t3.diminfo[0].strides = __pyx_pybuffernd_t3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t3.diminfo[0].shape = __pyx_pybuffernd_t3.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t3, ((PyArrayObject *)__pyx_t_7));
          __pyx_t_7 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_8);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b1.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b1.rcbuffer->pybuffer, (PyObject*)__pyx_v_b1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b1.diminfo[0].strides = __pyx_pybuffernd_b1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b1.diminfo[0].shape = __pyx_pybuffernd_b1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b1, ((PyArrayObject *)__pyx_t_8));
          __pyx_t_8 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b2.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b2.rcbuffer->pybuffer, (PyObject*)__pyx_v_b2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b2.diminfo[0].strides = __pyx_pybuffernd_b2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b2.diminfo[0].shape = __pyx_pybuffernd_b2.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b2, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_12);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b3.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b3.rcbuffer->pybuffer, (PyObject*)__pyx_v_b3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b3.diminfo[0].strides = __pyx_pybuffernd_b3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b3.diminfo[0].shape = __pyx_pybuffernd_b3.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b3, ((PyArrayObject *)__pyx_t_12));
          __pyx_t_12 = 0;

          /* "pyqcstrc/icosah/mics.pyx":109
 *                     [i5,i6,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i5][0],tmp3b[i5][1],tmp3b[i5][2],tmp3b[i5][3],tmp3b[i5][4],tmp3b[i5][5])
 *                     t1,t2,t3,d1,d2,d3=projection(tmp3b[i6][0],tmp3b[i6][1],tmp3b[i6][2],tmp3b[i6][3],tmp3b[i6][4],tmp3b[i6][5])             # <<<<<<<<<<<<<<
 *                     tmp2b=np.array([b1,b2,b3])
 *                     tmp2d=np.array([d1,d2,d3])
 */
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_9, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_9, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_9 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_19), 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (likely(__pyx_t_9 != Py_None)) {
            PyObject* sequence = __pyx_t_9;
            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, 109, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_19 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_18 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
            __pyx_t_12 = PyList_GET_ITEM(sequence, 5); 
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_12);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[6] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_7,&__pyx_t_8,&__pyx_t_2,&__pyx_t_12};
              for (i=0; i < 6; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 109, __pyx_L1_error)
                __Pyx_GOTREF(item);
                *(temps[i]) = item;
              }
            }
            #endif
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 109, __pyx_L1_error)
          }
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 109, __pyx_L1_error)
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_19);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_v_t1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t1.diminfo[0].strides = __pyx_pybuffernd_t1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t1.diminfo[0].shape = __pyx_pybuffernd_t1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t1, ((PyArrayObject *)__pyx_t_19));
          __pyx_t_19 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_v_t2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t2.diminfo[0].strides = __pyx_pybuffernd_t2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t2.diminfo[0].shape = __pyx_pybuffernd_t2.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t2, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_7);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_v_t3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t3.diminfo[0].strides = __pyx_pybuffernd_t3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t3.diminfo[0].shape = __pyx_pybuffernd_t3.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t3, ((PyArrayObject *)__pyx_t_7));
          __pyx_t_7 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_8);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d1.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_d1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_d1.rcbuffer->pybuffer, (PyObject*)__pyx_v_d1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_d1.diminfo[0].strides = __pyx_pybuffernd_d1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_d1.diminfo[0].shape = __pyx_pybuffernd_d1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_d1, ((PyArrayObject *)__pyx_t_8));
          __pyx_t_8 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d2.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_d2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_d2.rcbuffer->pybuffer, (PyObject*)__pyx_v_d2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_d2.diminfo[0].strides = __pyx_pybuffernd_d2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_d2.diminfo[0].shape = __pyx_pybuffernd_d2.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_d2, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_12);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d3.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_d3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_d3.rcbuffer->pybuffer, (PyObject*)__pyx_v_d3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_d3.diminfo[0].strides = __pyx_pybuffernd_d3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_d3.diminfo[0].shape = __pyx_pybuffernd_d3.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 109, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_d3, ((PyArrayObject *)__pyx_t_12));
          __pyx_t_12 = 0;

          /* "pyqcstrc/icosah/mics.pyx":110
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i5][0],tmp3b[i5][1],tmp3b[i5][2],tmp3b[i5][3],tmp3b[i5][4],tmp3b[i5][5])
 *                     t1,t2,t3,d1,d2,d3=projection(tmp3b[i6][0],tmp3b[i6][1],tmp3b[i6][2],tmp3b[i6][3],tmp3b[i6][4],tmp3b[i6][5])
 *                     tmp2b=np.array([b1,b2,b3])             # <<<<<<<<<<<<<<
 *                     tmp2d=np.array([d1,d2,d3])
 *                     if (np.all(tmp2a==tmp2b) and np.all(tmp2c==tmp2d)) or (np.all(tmp2a==tmp2d) and np.all(tmp2c==tmp2b)):
 */
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_INCREF(((PyObject *)__pyx_v_b1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_b1));
          PyList_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_b1));
          __Pyx_INCREF(((PyObject *)__pyx_v_b2));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_b2));
          PyList_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_v_b2));
          __Pyx_INCREF(((PyObject *)__pyx_v_b3));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_b3));
          PyList_SET_ITEM(__pyx_t_12, 2, ((PyObject *)__pyx_v_b3));
          __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_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 110, __pyx_L1_error)
          __pyx_t_21 = ((PyArrayObject *)__pyx_t_9);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp2b.diminfo[0].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2b.diminfo[0].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2b.diminfo[1].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2b.diminfo[1].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[1];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
          }
          __pyx_t_21 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp2b, ((PyArrayObject *)__pyx_t_9));
          __pyx_t_9 = 0;

          /* "pyqcstrc/icosah/mics.pyx":111
 *                     t1,t2,t3,d1,d2,d3=projection(tmp3b[i6][0],tmp3b[i6][1],tmp3b[i6][2],tmp3b[i6][3],tmp3b[i6][4],tmp3b[i6][5])
 *                     tmp2b=np.array([b1,b2,b3])
 *                     tmp2d=np.array([d1,d2,d3])             # <<<<<<<<<<<<<<
 *                     if (np.all(tmp2a==tmp2b) and np.all(tmp2c==tmp2d)) or (np.all(tmp2a==tmp2d) and np.all(tmp2c==tmp2b)):
 *                         tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3],tmp3a[i4])
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __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, 111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(((PyObject *)__pyx_v_d1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_d1));
          PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_d1));
          __Pyx_INCREF(((PyObject *)__pyx_v_d2));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_d2));
          PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_d2));
          __Pyx_INCREF(((PyObject *)__pyx_v_d3));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_d3));
          PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_d3));
          __pyx_t_8 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
            }
          }
          __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 111, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 111, __pyx_L1_error)
          __pyx_t_21 = ((PyArrayObject *)__pyx_t_9);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2d.rcbuffer->pybuffer);
            __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2d.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
            if (unlikely(__pyx_t_24 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp2d.diminfo[0].strides = __pyx_pybuffernd_tmp2d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2d.diminfo[0].shape = __pyx_pybuffernd_tmp2d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2d.diminfo[1].strides = __pyx_pybuffernd_tmp2d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2d.diminfo[1].shape = __pyx_pybuffernd_tmp2d.rcbuffer->pybuffer.shape[1];
            if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 111, __pyx_L1_error)
          }
          __pyx_t_21 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp2d, ((PyArrayObject *)__pyx_t_9));
          __pyx_t_9 = 0;

          /* "pyqcstrc/icosah/mics.pyx":112
 *                     tmp2b=np.array([b1,b2,b3])
 *                     tmp2d=np.array([d1,d2,d3])
 *                     if (np.all(tmp2a==tmp2b) and np.all(tmp2c==tmp2d)) or (np.all(tmp2a==tmp2d) and np.all(tmp2c==tmp2b)):             # <<<<<<<<<<<<<<
 *                         tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3],tmp3a[i4])
 *                         counter=1
 */
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = PyObject_RichCompare(((PyObject *)__pyx_v_tmp2a), ((PyObject *)__pyx_v_tmp2b), Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error)
          __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_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!__pyx_t_25) {
            goto __pyx_L17_next_or;
          } else {
          }
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_tmp2c), ((PyObject *)__pyx_v_tmp2d), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
          __pyx_t_8 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
            }
          }
          __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!__pyx_t_25) {
          } else {
            __pyx_t_1 = __pyx_t_25;
            goto __pyx_L16_bool_binop_done;
          }
          __pyx_L17_next_or:;
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = PyObject_RichCompare(((PyObject *)__pyx_v_tmp2a), ((PyObject *)__pyx_v_tmp2d), Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error)
          __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_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_25) {
          } else {
            __pyx_t_1 = __pyx_t_25;
            goto __pyx_L16_bool_binop_done;
          }
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_tmp2c), ((PyObject *)__pyx_v_tmp2b), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
          __pyx_t_8 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
            }
          }
          __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_1 = __pyx_t_25;
          __pyx_L16_bool_binop_done:;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":113
 *                     tmp2d=np.array([d1,d2,d3])
 *                     if (np.all(tmp2a==tmp2b) and np.all(tmp2c==tmp2d)) or (np.all(tmp2a==tmp2d) and np.all(tmp2c==tmp2b)):
 *                         tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3],tmp3a[i4])             # <<<<<<<<<<<<<<
 *                         counter=1
 *                         break
 */
            __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i7, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 113, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_19 = NULL;
            __pyx_t_24 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(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_24 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[5] = {__pyx_t_19, __pyx_t_12, __pyx_t_8, __pyx_t_7, __pyx_t_18};
              __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_24, 4+__pyx_t_24); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[5] = {__pyx_t_19, __pyx_t_12, __pyx_t_8, __pyx_t_7, __pyx_t_18};
              __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_24, 4+__pyx_t_24); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            } else
            #endif
            {
              __pyx_t_26 = PyTuple_New(4+__pyx_t_24); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 113, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_26);
              if (__pyx_t_19) {
                __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_19); __pyx_t_19 = NULL;
              }
              __Pyx_GIVEREF(__pyx_t_12);
              PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_24, __pyx_t_12);
              __Pyx_GIVEREF(__pyx_t_8);
              PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_24, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_7);
              PyTuple_SET_ITEM(__pyx_t_26, 2+__pyx_t_24, __pyx_t_7);
              __Pyx_GIVEREF(__pyx_t_18);
              PyTuple_SET_ITEM(__pyx_t_26, 3+__pyx_t_24, __pyx_t_18);
              __pyx_t_12 = 0;
              __pyx_t_8 = 0;
              __pyx_t_7 = 0;
              __pyx_t_18 = 0;
              __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_26, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 113, __pyx_L1_error)
            __pyx_t_10 = ((PyArrayObject *)__pyx_t_9);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_24 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_24 < 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_4mics_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_24 < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
            }
            __pyx_t_10 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_9));
            __pyx_t_9 = 0;

            /* "pyqcstrc/icosah/mics.pyx":114
 *                     if (np.all(tmp2a==tmp2b) and np.all(tmp2c==tmp2d)) or (np.all(tmp2a==tmp2d) and np.all(tmp2c==tmp2b)):
 *                         tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3],tmp3a[i4])
 *                         counter=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter = 1;

            /* "pyqcstrc/icosah/mics.pyx":115
 *                         tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3],tmp3a[i4])
 *                         counter=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L12_break;

            /* "pyqcstrc/icosah/mics.pyx":112
 *                     tmp2b=np.array([b1,b2,b3])
 *                     tmp2d=np.array([d1,d2,d3])
 *                     if (np.all(tmp2a==tmp2b) and np.all(tmp2c==tmp2d)) or (np.all(tmp2a==tmp2d) and np.all(tmp2c==tmp2b)):             # <<<<<<<<<<<<<<
 *                         tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3],tmp3a[i4])
 *                         counter=1
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":117
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter==1:
 *                     break
 */
          /*else*/ {
          }
        }
        __pyx_L12_break:;

        /* "pyqcstrc/icosah/mics.pyx":118
 *                     else:
 *                         pass
 *                 if counter==1:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":119
 *                         pass
 *                 if counter==1:
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     print('ERROR')
 */
          goto __pyx_L8_break;

          /* "pyqcstrc/icosah/mics.pyx":118
 *                     else:
 *                         pass
 *                 if counter==1:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":121
 *                     break
 *                 else:
 *                     print('ERROR')             # <<<<<<<<<<<<<<
 *                     pass
 *             # 2
 */
        /*else*/ {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __pyx_L8_break:;

      /* "pyqcstrc/icosah/mics.pyx":125
 *             # 2
 *             # (case 1)
 *             tmp3a=tmp1a.reshape(4,6,3)             # <<<<<<<<<<<<<<
 *             tmp3b=np.append(tmp3a[0],tmp3a[2])
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 125, __pyx_L1_error)
      __pyx_t_27 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 125, __pyx_L1_error)
      }
      __pyx_t_27 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":126
 *             # (case 1)
 *             tmp3a=tmp1a.reshape(4,6,3)
 *             tmp3b=np.append(tmp3a[0],tmp3a[2])             # <<<<<<<<<<<<<<
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])
 *             tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_append); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_7 = NULL;
      __pyx_t_3 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_26))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_26);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_26, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_26)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_18};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_26, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_26)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_18};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_26, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __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_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_3, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_3, __pyx_t_18);
        __pyx_t_9 = 0;
        __pyx_t_18 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_26, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 126, __pyx_L1_error)
      __pyx_t_27 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 126, __pyx_L1_error)
      }
      __pyx_t_27 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":127
 *             tmp3a=tmp1a.reshape(4,6,3)
 *             tmp3b=np.append(tmp3a[0],tmp3a[2])
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])             # <<<<<<<<<<<<<<
 *             tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *             if len(tmp3d)!=1: # 2
 */
      __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_append); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_9 = NULL;
      __pyx_t_3 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_26, __pyx_t_18};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_26, __pyx_t_18};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_26);
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_t_26);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_t_18);
        __pyx_t_26 = 0;
        __pyx_t_18 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_tmp3c = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":128
 *             tmp3b=np.append(tmp3a[0],tmp3a[2])
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])
 *             tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)             # <<<<<<<<<<<<<<
 *             if len(tmp3d)!=1: # 2
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])
 */
      if (!(likely(((__pyx_v_tmp3c) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_tmp3c, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 128, __pyx_L1_error)
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(((PyArrayObject *)__pyx_v_tmp3b), ((PyArrayObject *)__pyx_v_tmp3c), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_tmp3d = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":129
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])
 *             tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *             if len(tmp3d)!=1: # 2             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])
 *                 tmp3a=tmp1a.reshape(3,6,3)
 */
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3d)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_11 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":130
 *             tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *             if len(tmp3d)!=1: # 2
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])             # <<<<<<<<<<<<<<
 *                 tmp3a=tmp1a.reshape(3,6,3)
 *                 if verbose>1:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __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, 130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i7, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __pyx_t_9 = NULL;
        __pyx_t_3 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_3 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_8, __pyx_t_18, __pyx_t_26};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_8, __pyx_t_18, __pyx_t_26};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 130, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_3, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_3, __pyx_t_18);
          __Pyx_GIVEREF(__pyx_t_26);
          PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_3, __pyx_t_26);
          __pyx_t_8 = 0;
          __pyx_t_18 = 0;
          __pyx_t_26 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 130, __pyx_L1_error)
        __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_3 < 0)) __PYX_ERR(0, 130, __pyx_L1_error)
        }
        __pyx_t_10 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":131
 *             if len(tmp3d)!=1: # 2
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])
 *                 tmp3a=tmp1a.reshape(3,6,3)             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('              two triangles merged into one')
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 131, __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, 131, __pyx_L1_error)
        __pyx_t_27 = ((PyArrayObject *)__pyx_t_7);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
          __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 131, __pyx_L1_error)
        }
        __pyx_t_27 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":132
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])
 *                 tmp3a=tmp1a.reshape(3,6,3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('              two triangles merged into one')
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":133
 *                 tmp3a=tmp1a.reshape(3,6,3)
 *                 if verbose>1:
 *                     print('              two triangles merged into one')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "pyqcstrc/icosah/mics.pyx":132
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])
 *                 tmp3a=tmp1a.reshape(3,6,3)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('              two triangles merged into one')
 *                 else:
 */
          goto __pyx_L22;
        }

        /* "pyqcstrc/icosah/mics.pyx":135
 *                     print('              two triangles merged into one')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             # (case 2)
 *             else:
 */
        /*else*/ {
        }
        __pyx_L22:;

        /* "pyqcstrc/icosah/mics.pyx":129
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])
 *             tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *             if len(tmp3d)!=1: # 2             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i4])
 *                 tmp3a=tmp1a.reshape(3,6,3)
 */
        goto __pyx_L21;
      }

      /* "pyqcstrc/icosah/mics.pyx":138
 *             # (case 2)
 *             else:
 *                 tmp3b=np.append(tmp3a[0],tmp3a[3])             # <<<<<<<<<<<<<<
 *                 tmp3c=np.append(tmp3a[1],tmp3a[3])
 *                 tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 138, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 138, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __pyx_t_18 = NULL;
        __pyx_t_3 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_18)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_3 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_t_26};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_t_2, __pyx_t_26};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 138, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_18) {
            __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_18); __pyx_t_18 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_3, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_26);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_3, __pyx_t_26);
          __pyx_t_2 = 0;
          __pyx_t_26 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 138, __pyx_L1_error)
        __pyx_t_27 = ((PyArrayObject *)__pyx_t_7);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
          __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 138, __pyx_L1_error)
        }
        __pyx_t_27 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":139
 *             else:
 *                 tmp3b=np.append(tmp3a[0],tmp3a[3])
 *                 tmp3c=np.append(tmp3a[1],tmp3a[3])             # <<<<<<<<<<<<<<
 *                 tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *                 if len(tmp3d)!=1: # 2
 */
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_append); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __pyx_t_2 = NULL;
        __pyx_t_3 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_3 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_12, __pyx_t_26};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_12, __pyx_t_26};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        } else
        #endif
        {
          __pyx_t_18 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 139, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_3, __pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_26);
          PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_3, __pyx_t_26);
          __pyx_t_12 = 0;
          __pyx_t_26 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp3c, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":140
 *                 tmp3b=np.append(tmp3a[0],tmp3a[3])
 *                 tmp3c=np.append(tmp3a[1],tmp3a[3])
 *                 tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)             # <<<<<<<<<<<<<<
 *                 if len(tmp3d)!=1: # 2
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])
 */
        if (!(likely(((__pyx_v_tmp3c) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_tmp3c, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 140, __pyx_L1_error)
        __pyx_t_7 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(((PyArrayObject *)__pyx_v_tmp3b), ((PyArrayObject *)__pyx_v_tmp3c), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_tmp3d, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":141
 *                 tmp3c=np.append(tmp3a[1],tmp3a[3])
 *                 tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *                 if len(tmp3d)!=1: # 2             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])
 *                     tmp3a=tmp1a.reshape(3,6,3)
 */
        __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3d)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 141, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_11 != 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":142
 *                 tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *                 if len(tmp3d)!=1: # 2
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])             # <<<<<<<<<<<<<<
 *                     tmp3a=tmp1a.reshape(3,6,3)
 *                     if verbose>1:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_append); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i7, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = NULL;
          __pyx_t_3 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_18);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_18, function);
              __pyx_t_3 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_18)) {
            PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_8, __pyx_t_26, __pyx_t_12};
            __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
            PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_8, __pyx_t_26, __pyx_t_12};
            __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          } else
          #endif
          {
            __pyx_t_9 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_8);
            PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_3, __pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_26);
            PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_3, __pyx_t_26);
            __Pyx_GIVEREF(__pyx_t_12);
            PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_3, __pyx_t_12);
            __pyx_t_8 = 0;
            __pyx_t_26 = 0;
            __pyx_t_12 = 0;
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 142, __pyx_L1_error)
          __pyx_t_10 = ((PyArrayObject *)__pyx_t_7);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_3 < 0)) __PYX_ERR(0, 142, __pyx_L1_error)
          }
          __pyx_t_10 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "pyqcstrc/icosah/mics.pyx":143
 *                 if len(tmp3d)!=1: # 2
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])
 *                     tmp3a=tmp1a.reshape(3,6,3)             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('              two triangles merged into one')
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 143, __pyx_L1_error)
          __pyx_t_27 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
            __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
          }
          __pyx_t_27 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;

          /* "pyqcstrc/icosah/mics.pyx":144
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])
 *                     tmp3a=tmp1a.reshape(3,6,3)
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('              two triangles merged into one')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":145
 *                     tmp3a=tmp1a.reshape(3,6,3)
 *                     if verbose>1:
 *                         print('              two triangles merged into one')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 145, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

            /* "pyqcstrc/icosah/mics.pyx":144
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])
 *                     tmp3a=tmp1a.reshape(3,6,3)
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('              two triangles merged into one')
 *                     else:
 */
            goto __pyx_L24;
          }

          /* "pyqcstrc/icosah/mics.pyx":147
 *                         print('              two triangles merged into one')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 else: #
 *                     if verbose>1:
 */
          /*else*/ {
          }
          __pyx_L24:;

          /* "pyqcstrc/icosah/mics.pyx":141
 *                 tmp3c=np.append(tmp3a[1],tmp3a[3])
 *                 tmp3d=two_segment_into_one(tmp3b,tmp3c,verbose-1)
 *                 if len(tmp3d)!=1: # 2             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp3a[i7],tmp3b[i8],tmp3a[i3])
 *                     tmp3a=tmp1a.reshape(3,6,3)
 */
          goto __pyx_L23;
        }

        /* "pyqcstrc/icosah/mics.pyx":149
 *                         pass
 *                 else: #
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('              two triangles are sharing one edge')
 *                     else:
 */
        /*else*/ {
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":150
 *                 else: #
 *                     if verbose>1:
 *                         print('              two triangles are sharing one edge')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 150, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

            /* "pyqcstrc/icosah/mics.pyx":149
 *                         pass
 *                 else: #
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('              two triangles are sharing one edge')
 *                     else:
 */
            goto __pyx_L25;
          }

          /* "pyqcstrc/icosah/mics.pyx":152
 *                         print('              two triangles are sharing one edge')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *             return tmp3a
 * 
 */
          /*else*/ {
          }
          __pyx_L25:;
        }
        __pyx_L23:;
      }
      __pyx_L21:;

      /* "pyqcstrc/icosah/mics.pyx":153
 *                     else:
 *                         pass
 *             return tmp3a             # <<<<<<<<<<<<<<
 * 
 *         elif len(tmp3b)==5: # 21
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp3a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":97
 *                 pass
 *                 return triange_1
 *         elif len(tmp3b)==4: # 2             # <<<<<<<<<<<<<<
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":155
 *             return tmp3a
 * 
 *         elif len(tmp3b)==5: # 21             # <<<<<<<<<<<<<<
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 155, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_11 == 5) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":156
 * 
 *         elif len(tmp3b)==5: # 21
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]             # <<<<<<<<<<<<<<
 *             for i1 in range(len(comb1)):
 *                 [i3,i5,i6]=comb1[i1]
 */
      __pyx_t_18 = PyList_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_18, 0, __pyx_int_0);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_18, 1, __pyx_int_1);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyList_SET_ITEM(__pyx_t_18, 2, __pyx_int_3);
      __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __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_2);
      __Pyx_GIVEREF(__pyx_int_2);
      PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_2);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_1);
      __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_int_1);
      __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_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 156, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_18);
      PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_7);
      PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_9);
      PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_9);
      __pyx_t_18 = 0;
      __pyx_t_7 = 0;
      __pyx_t_9 = 0;
      __pyx_v_comb1 = ((PyObject*)__pyx_t_12);
      __pyx_t_12 = 0;

      /* "pyqcstrc/icosah/mics.pyx":157
 *         elif len(tmp3b)==5: # 21
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):             # <<<<<<<<<<<<<<
 *                 [i3,i5,i6]=comb1[i1]
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 */
      __pyx_t_11 = PyList_GET_SIZE(__pyx_v_comb1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 157, __pyx_L1_error)
      __pyx_t_13 = __pyx_t_11;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_13; __pyx_t_3+=1) {
        __pyx_v_i1 = __pyx_t_3;

        /* "pyqcstrc/icosah/mics.pyx":158
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):
 *                 [i3,i5,i6]=comb1[i1]             # <<<<<<<<<<<<<<
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 *                 tmp2a=np.array([a1,a2,a3])
 */
        __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_comb1, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 158, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
          PyObject* sequence = __pyx_t_12;
          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, 158, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_18 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_18);
          #else
          __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_18 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          #endif
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_26 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_14 = Py_TYPE(__pyx_t_26)->tp_iternext;
          index = 0; __pyx_t_9 = __pyx_t_14(__pyx_t_26); if (unlikely(!__pyx_t_9)) goto __pyx_L28_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_9);
          index = 1; __pyx_t_7 = __pyx_t_14(__pyx_t_26); if (unlikely(!__pyx_t_7)) goto __pyx_L28_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_7);
          index = 2; __pyx_t_18 = __pyx_t_14(__pyx_t_26); if (unlikely(!__pyx_t_18)) goto __pyx_L28_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_18);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_26), 3) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
          __pyx_t_14 = NULL;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          goto __pyx_L29_unpacking_done;
          __pyx_L28_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          __pyx_t_14 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 158, __pyx_L1_error)
          __pyx_L29_unpacking_done:;
        }
        __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_v_i3 = __pyx_t_17;
        __pyx_v_i5 = __pyx_t_24;
        __pyx_v_i6 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":159
 *             for i1 in range(len(comb1)):
 *                 [i3,i5,i6]=comb1[i1]
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])             # <<<<<<<<<<<<<<
 *                 tmp2a=np.array([a1,a2,a3])
 *                 counter=0
 */
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_12, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_12, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_12, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_12, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_12 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_9), ((PyArrayObject *)__pyx_t_26), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (likely(__pyx_t_12 != Py_None)) {
          PyObject* sequence = __pyx_t_12;
          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, 159, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_26 = PyList_GET_ITEM(sequence, 2); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 3); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
          __pyx_t_18 = PyList_GET_ITEM(sequence, 5); 
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_26);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_18);
          #else
          {
            Py_ssize_t i;
            PyObject** temps[6] = {&__pyx_t_2,&__pyx_t_8,&__pyx_t_26,&__pyx_t_9,&__pyx_t_7,&__pyx_t_18};
            for (i=0; i < 6; i++) {
              PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 159, __pyx_L1_error)
              __Pyx_GOTREF(item);
              *(temps[i]) = item;
            }
          }
          #endif
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 159, __pyx_L1_error)
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 159, __pyx_L1_error)
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_v_t1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t1.diminfo[0].strides = __pyx_pybuffernd_t1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t1.diminfo[0].shape = __pyx_pybuffernd_t1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t1, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_8);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_v_t2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t2.diminfo[0].strides = __pyx_pybuffernd_t2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t2.diminfo[0].shape = __pyx_pybuffernd_t2.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t2, ((PyArrayObject *)__pyx_t_8));
        __pyx_t_8 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_26);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_v_t3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t3.diminfo[0].strides = __pyx_pybuffernd_t3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t3.diminfo[0].shape = __pyx_pybuffernd_t3.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_t3, ((PyArrayObject *)__pyx_t_26));
        __pyx_t_26 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_9);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_9));
        __pyx_t_9 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_7);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_18);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_18));
        __pyx_t_18 = 0;

        /* "pyqcstrc/icosah/mics.pyx":160
 *                 [i3,i5,i6]=comb1[i1]
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 *                 tmp2a=np.array([a1,a2,a3])             # <<<<<<<<<<<<<<
 *                 counter=0
 *                 for i2 in [0,1,2]:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_18 = PyList_New(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_INCREF(((PyObject *)__pyx_v_a1));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_a1));
        PyList_SET_ITEM(__pyx_t_18, 0, ((PyObject *)__pyx_v_a1));
        __Pyx_INCREF(((PyObject *)__pyx_v_a2));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_a2));
        PyList_SET_ITEM(__pyx_t_18, 1, ((PyObject *)__pyx_v_a2));
        __Pyx_INCREF(((PyObject *)__pyx_v_a3));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_a3));
        PyList_SET_ITEM(__pyx_t_18, 2, ((PyObject *)__pyx_v_a3));
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_12 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_18);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 160, __pyx_L1_error)
        __pyx_t_21 = ((PyArrayObject *)__pyx_t_12);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
        }
        __pyx_t_21 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_12));
        __pyx_t_12 = 0;

        /* "pyqcstrc/icosah/mics.pyx":161
 *                 t1,t2,t3,a1,a2,a3=projection(tmp3a[i3][0],tmp3a[i3][1],tmp3a[i3][2],tmp3a[i3][3],tmp3a[i3][4],tmp3a[i3][5])
 *                 tmp2a=np.array([a1,a2,a3])
 *                 counter=0             # <<<<<<<<<<<<<<
 *                 for i2 in [0,1,2]:
 *                     [i4,i7,i8]=comb1[i2]
 */
        __pyx_v_counter = 0;

        /* "pyqcstrc/icosah/mics.pyx":162
 *                 tmp2a=np.array([a1,a2,a3])
 *                 counter=0
 *                 for i2 in [0,1,2]:             # <<<<<<<<<<<<<<
 *                     [i4,i7,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 */
        __pyx_t_12 = __pyx_tuple__9; __Pyx_INCREF(__pyx_t_12); __pyx_t_22 = 0;
        for (;;) {
          if (__pyx_t_22 >= 3) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_22); __Pyx_INCREF(__pyx_t_7); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(0, 162, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_12, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
          __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_i2 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":163
 *                 counter=0
 *                 for i2 in [0,1,2]:
 *                     [i4,i7,i8]=comb1[i2]             # <<<<<<<<<<<<<<
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 *                     tmp2b=np.array([b1,b2,b3])
 */
          __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_comb1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 163, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
            PyObject* sequence = __pyx_t_7;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 3)) {
              if (size > 3) __Pyx_RaiseTooManyValuesError(3);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 163, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_18 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_26 = PyTuple_GET_ITEM(sequence, 2); 
            } else {
              __pyx_t_18 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_26 = PyList_GET_ITEM(sequence, 2); 
            }
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_26);
            #else
            __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 163, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 163, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_26 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 163, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_26);
            #endif
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 163, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_14 = Py_TYPE(__pyx_t_8)->tp_iternext;
            index = 0; __pyx_t_18 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_18)) goto __pyx_L32_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_18);
            index = 1; __pyx_t_9 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L32_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_9);
            index = 2; __pyx_t_26 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_26)) goto __pyx_L32_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_26);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_8), 3) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
            __pyx_t_14 = NULL;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L33_unpacking_done;
            __pyx_L32_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_14 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 163, __pyx_L1_error)
            __pyx_L33_unpacking_done:;
          }
          __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_26); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          __pyx_v_i4 = __pyx_t_15;
          __pyx_v_i7 = __pyx_t_24;
          __pyx_v_i8 = __pyx_t_17;

          /* "pyqcstrc/icosah/mics.pyx":164
 *                 for i2 in [0,1,2]:
 *                     [i4,i7,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])             # <<<<<<<<<<<<<<
 *                     tmp2b=np.array([b1,b2,b3])
 *                     if np.all(tmp2a==tmp2b):
 */
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 164, __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, 164, __pyx_L1_error)
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_7, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_26), ((PyArrayObject *)__pyx_t_9), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_19), 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 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, 164, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_19 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
            __pyx_t_18 = PyList_GET_ITEM(sequence, 3); 
            __pyx_t_9 = PyList_GET_ITEM(sequence, 4); 
            __pyx_t_26 = PyList_GET_ITEM(sequence, 5); 
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_26);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[6] = {&__pyx_t_19,&__pyx_t_2,&__pyx_t_8,&__pyx_t_18,&__pyx_t_9,&__pyx_t_26};
              for (i=0; i < 6; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 164, __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, 164, __pyx_L1_error)
          }
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_19);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t1.rcbuffer->pybuffer, (PyObject*)__pyx_v_t1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t1.diminfo[0].strides = __pyx_pybuffernd_t1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t1.diminfo[0].shape = __pyx_pybuffernd_t1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t1, ((PyArrayObject *)__pyx_t_19));
          __pyx_t_19 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t2.rcbuffer->pybuffer, (PyObject*)__pyx_v_t2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t2.diminfo[0].strides = __pyx_pybuffernd_t2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t2.diminfo[0].shape = __pyx_pybuffernd_t2.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t2, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_8);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_t3.rcbuffer->pybuffer, (PyObject*)__pyx_v_t3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_t3.diminfo[0].strides = __pyx_pybuffernd_t3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_t3.diminfo[0].shape = __pyx_pybuffernd_t3.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_DECREF_SET(__pyx_v_t3, ((PyArrayObject *)__pyx_t_8));
          __pyx_t_8 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b1.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b1.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b1.rcbuffer->pybuffer, (PyObject*)__pyx_v_b1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b1.diminfo[0].strides = __pyx_pybuffernd_b1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b1.diminfo[0].shape = __pyx_pybuffernd_b1.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b1, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_9);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b2.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b2.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b2.rcbuffer->pybuffer, (PyObject*)__pyx_v_b2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b2.diminfo[0].strides = __pyx_pybuffernd_b2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b2.diminfo[0].shape = __pyx_pybuffernd_b2.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b2, ((PyArrayObject *)__pyx_t_9));
          __pyx_t_9 = 0;
          __pyx_t_20 = ((PyArrayObject *)__pyx_t_26);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b3.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b3.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b3.rcbuffer->pybuffer, (PyObject*)__pyx_v_b3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b3.diminfo[0].strides = __pyx_pybuffernd_b3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b3.diminfo[0].shape = __pyx_pybuffernd_b3.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
          }
          __pyx_t_20 = 0;
          __Pyx_XDECREF_SET(__pyx_v_b3, ((PyArrayObject *)__pyx_t_26));
          __pyx_t_26 = 0;

          /* "pyqcstrc/icosah/mics.pyx":165
 *                     [i4,i7,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 *                     tmp2b=np.array([b1,b2,b3])             # <<<<<<<<<<<<<<
 *                     if np.all(tmp2a==tmp2b):
 *                         tmp1a=np.append(tmp3a[i5],tmp3a[i6],tmp3b[i7],tmp3b[i8],tmp3a[i3])
 */
          __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 165, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          __pyx_t_26 = PyList_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 165, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_INCREF(((PyObject *)__pyx_v_b1));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_b1));
          PyList_SET_ITEM(__pyx_t_26, 0, ((PyObject *)__pyx_v_b1));
          __Pyx_INCREF(((PyObject *)__pyx_v_b2));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_b2));
          PyList_SET_ITEM(__pyx_t_26, 1, ((PyObject *)__pyx_v_b2));
          __Pyx_INCREF(((PyObject *)__pyx_v_b3));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_b3));
          PyList_SET_ITEM(__pyx_t_26, 2, ((PyObject *)__pyx_v_b3));
          __pyx_t_18 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
            __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_9);
            if (likely(__pyx_t_18)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_18);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_9, function);
            }
          }
          __pyx_t_7 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_18, __pyx_t_26) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_26);
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 165, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 165, __pyx_L1_error)
          __pyx_t_21 = ((PyArrayObject *)__pyx_t_7);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 0)) {
              PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp2b.diminfo[0].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2b.diminfo[0].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2b.diminfo[1].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2b.diminfo[1].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[1];
            if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
          }
          __pyx_t_21 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp2b, ((PyArrayObject *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "pyqcstrc/icosah/mics.pyx":166
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 *                     tmp2b=np.array([b1,b2,b3])
 *                     if np.all(tmp2a==tmp2b):             # <<<<<<<<<<<<<<
 *                         tmp1a=np.append(tmp3a[i5],tmp3a[i6],tmp3b[i7],tmp3b[i8],tmp3a[i3])
 *                         counter=1
 */
          __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_all); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_26);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = PyObject_RichCompare(((PyObject *)__pyx_v_tmp2a), ((PyObject *)__pyx_v_tmp2b), Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 166, __pyx_L1_error)
          __pyx_t_18 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_26))) {
            __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_26);
            if (likely(__pyx_t_18)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_26);
              __Pyx_INCREF(__pyx_t_18);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_26, function);
            }
          }
          __pyx_t_7 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_26, __pyx_t_18, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_26, __pyx_t_9);
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 166, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":167
 *                     tmp2b=np.array([b1,b2,b3])
 *                     if np.all(tmp2a==tmp2b):
 *                         tmp1a=np.append(tmp3a[i5],tmp3a[i6],tmp3b[i7],tmp3b[i8],tmp3a[i3])             # <<<<<<<<<<<<<<
 *                         counter=1
 *                         break
 */
            __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_n_s_np); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_26);
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_append); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
            __pyx_t_26 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_26);
            __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i7, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_28 = NULL;
            __pyx_t_17 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_28 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_28)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_28);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_17 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_9)) {
              PyObject *__pyx_temp[6] = {__pyx_t_28, __pyx_t_26, __pyx_t_18, __pyx_t_8, __pyx_t_2, __pyx_t_19};
              __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 5+__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
              PyObject *__pyx_temp[6] = {__pyx_t_28, __pyx_t_26, __pyx_t_18, __pyx_t_8, __pyx_t_2, __pyx_t_19};
              __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 5+__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            } else
            #endif
            {
              __pyx_t_29 = PyTuple_New(5+__pyx_t_17); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 167, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_29);
              if (__pyx_t_28) {
                __Pyx_GIVEREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_28); __pyx_t_28 = NULL;
              }
              __Pyx_GIVEREF(__pyx_t_26);
              PyTuple_SET_ITEM(__pyx_t_29, 0+__pyx_t_17, __pyx_t_26);
              __Pyx_GIVEREF(__pyx_t_18);
              PyTuple_SET_ITEM(__pyx_t_29, 1+__pyx_t_17, __pyx_t_18);
              __Pyx_GIVEREF(__pyx_t_8);
              PyTuple_SET_ITEM(__pyx_t_29, 2+__pyx_t_17, __pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_29, 3+__pyx_t_17, __pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_19);
              PyTuple_SET_ITEM(__pyx_t_29, 4+__pyx_t_17, __pyx_t_19);
              __pyx_t_26 = 0;
              __pyx_t_18 = 0;
              __pyx_t_8 = 0;
              __pyx_t_2 = 0;
              __pyx_t_19 = 0;
              __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_29, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 167, __pyx_L1_error)
            __pyx_t_10 = ((PyArrayObject *)__pyx_t_7);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 167, __pyx_L1_error)
            }
            __pyx_t_10 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_7));
            __pyx_t_7 = 0;

            /* "pyqcstrc/icosah/mics.pyx":168
 *                     if np.all(tmp2a==tmp2b):
 *                         tmp1a=np.append(tmp3a[i5],tmp3a[i6],tmp3b[i7],tmp3b[i8],tmp3a[i3])
 *                         counter=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter = 1;

            /* "pyqcstrc/icosah/mics.pyx":169
 *                         tmp1a=np.append(tmp3a[i5],tmp3a[i6],tmp3b[i7],tmp3b[i8],tmp3a[i3])
 *                         counter=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L31_break;

            /* "pyqcstrc/icosah/mics.pyx":166
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 *                     tmp2b=np.array([b1,b2,b3])
 *                     if np.all(tmp2a==tmp2b):             # <<<<<<<<<<<<<<
 *                         tmp1a=np.append(tmp3a[i5],tmp3a[i6],tmp3b[i7],tmp3b[i8],tmp3a[i3])
 *                         counter=1
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":171
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter==1:
 *                     break
 */
          /*else*/ {
          }

          /* "pyqcstrc/icosah/mics.pyx":162
 *                 tmp2a=np.array([a1,a2,a3])
 *                 counter=0
 *                 for i2 in [0,1,2]:             # <<<<<<<<<<<<<<
 *                     [i4,i7,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 */
        }
        __pyx_L31_break:;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "pyqcstrc/icosah/mics.pyx":172
 *                     else:
 *                         pass
 *                 if counter==1:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":173
 *                         pass
 *                 if counter==1:
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     print('ERROR')
 */
          goto __pyx_L27_break;

          /* "pyqcstrc/icosah/mics.pyx":172
 *                     else:
 *                         pass
 *                 if counter==1:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":175
 *                     break
 *                 else:
 *                     print('ERROR')             # <<<<<<<<<<<<<<
 *                     pass
 *             if verbose>1:
 */
        /*else*/ {
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
      }
      __pyx_L27_break:;

      /* "pyqcstrc/icosah/mics.pyx":177
 *                     print('ERROR')
 *                     pass
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('              two triangles are sharing one vertex')
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":178
 *                     pass
 *             if verbose>1:
 *                 print('              two triangles are sharing one vertex')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "pyqcstrc/icosah/mics.pyx":177
 *                     print('ERROR')
 *                     pass
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('              two triangles are sharing one vertex')
 *             else:
 */
        goto __pyx_L36;
      }

      /* "pyqcstrc/icosah/mics.pyx":180
 *                 print('              two triangles are sharing one vertex')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp1a.reshape(5,6,3)
 *         else:
 */
      /*else*/ {
      }
      __pyx_L36:;

      /* "pyqcstrc/icosah/mics.pyx":181
 *             else:
 *                 pass
 *             return tmp1a.reshape(5,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>1:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 181, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_7);
      __pyx_t_7 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":155
 *             return tmp3a
 * 
 *         elif len(tmp3b)==5: # 21             # <<<<<<<<<<<<<<
 *             comb1=[[0,1,3],[0,2,1],[1,2,0]]
 *             for i1 in range(len(comb1)):
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":183
 *             return tmp1a.reshape(5,6,3)
 *         else:
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('              not coplaner')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":184
 *         else:
 *             if verbose>1:
 *                 print('              not coplaner')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":183
 *             return tmp1a.reshape(5,6,3)
 *         else:
 *             if verbose>1:             # <<<<<<<<<<<<<<
 *                 print('              not coplaner')
 *             else:
 */
        goto __pyx_L37;
      }

      /* "pyqcstrc/icosah/mics.pyx":187
 *             else:
 *                 pass
 *                 return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef int coplanar_check_two_triangles(np.ndarray[DTYPE_int_t, ndim=3] triange1,
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 187, __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_t_29 = PyList_New(1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_29);
        __Pyx_GIVEREF(__pyx_t_12);
        PyList_SET_ITEM(__pyx_t_29, 0, __pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_29);
        PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_29);
        __pyx_t_29 = 0;
        __pyx_t_29 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_29)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_29);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_7 = (__pyx_t_29) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_29, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_12);
        __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 187, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_7);
        __pyx_t_7 = 0;
        goto __pyx_L0;
      }
      __pyx_L37:;
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":90
 *     tmp1a=np.append(triange_1,triange_2)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if coplanar_check(tmp3b)==1: # 2             # <<<<<<<<<<<<<<
 *         if len(tmp3b)==3: # 2
 *             if verbose>0:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":65
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray check_two_triangles(np.ndarray[DTYPE_int_t, ndim=3] triange_1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=3] triange_2,
 *                                     int verbose):
 */

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_28);
  __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_a1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2d.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange_2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.check_two_triangles", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_d3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_t3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2d.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange_2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_t1);
  __Pyx_XDECREF((PyObject *)__pyx_v_t2);
  __Pyx_XDECREF((PyObject *)__pyx_v_t3);
  __Pyx_XDECREF((PyObject *)__pyx_v_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_a2);
  __Pyx_XDECREF((PyObject *)__pyx_v_a3);
  __Pyx_XDECREF((PyObject *)__pyx_v_b1);
  __Pyx_XDECREF((PyObject *)__pyx_v_b2);
  __Pyx_XDECREF((PyObject *)__pyx_v_b3);
  __Pyx_XDECREF((PyObject *)__pyx_v_c1);
  __Pyx_XDECREF((PyObject *)__pyx_v_c2);
  __Pyx_XDECREF((PyObject *)__pyx_v_c3);
  __Pyx_XDECREF((PyObject *)__pyx_v_d1);
  __Pyx_XDECREF((PyObject *)__pyx_v_d2);
  __Pyx_XDECREF((PyObject *)__pyx_v_d3);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2d);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF(__pyx_v_comb1);
  __Pyx_XDECREF(__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3d);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":189
 *                 return np.array([[[0]]])
 * 
 * cdef int coplanar_check_two_triangles(np.ndarray[DTYPE_int_t, ndim=3] triange1,             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] triange2,
 *                                         int verbose):
 */

static int __pyx_f_8pyqcstrc_6icosah_4mics_coplanar_check_two_triangles(PyArrayObject *__pyx_v_triange1, PyArrayObject *__pyx_v_triange2, int __pyx_v_verbose) {
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_triange1;
  __Pyx_Buffer __pyx_pybuffer_triange1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_triange2;
  __Pyx_Buffer __pyx_pybuffer_triange2;
  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;
  PyArrayObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coplanar_check_two_triangles", 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_triange1.pybuffer.buf = NULL;
  __pyx_pybuffer_triange1.refcount = 0;
  __pyx_pybuffernd_triange1.data = NULL;
  __pyx_pybuffernd_triange1.rcbuffer = &__pyx_pybuffer_triange1;
  __pyx_pybuffer_triange2.pybuffer.buf = NULL;
  __pyx_pybuffer_triange2.refcount = 0;
  __pyx_pybuffernd_triange2.data = NULL;
  __pyx_pybuffernd_triange2.rcbuffer = &__pyx_pybuffer_triange2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triange1.rcbuffer->pybuffer, (PyObject*)__pyx_v_triange1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 189, __pyx_L1_error)
  }
  __pyx_pybuffernd_triange1.diminfo[0].strides = __pyx_pybuffernd_triange1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triange1.diminfo[0].shape = __pyx_pybuffernd_triange1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triange1.diminfo[1].strides = __pyx_pybuffernd_triange1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triange1.diminfo[1].shape = __pyx_pybuffernd_triange1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triange1.diminfo[2].strides = __pyx_pybuffernd_triange1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triange1.diminfo[2].shape = __pyx_pybuffernd_triange1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triange2.rcbuffer->pybuffer, (PyObject*)__pyx_v_triange2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 189, __pyx_L1_error)
  }
  __pyx_pybuffernd_triange2.diminfo[0].strides = __pyx_pybuffernd_triange2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triange2.diminfo[0].shape = __pyx_pybuffernd_triange2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triange2.diminfo[1].strides = __pyx_pybuffernd_triange2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triange2.diminfo[1].shape = __pyx_pybuffernd_triange2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triange2.diminfo[2].strides = __pyx_pybuffernd_triange2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triange2.diminfo[2].shape = __pyx_pybuffernd_triange2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":195
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a
 *     tmp1a=np.append(triange1,triange2)             # <<<<<<<<<<<<<<
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if verbose>0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_triange1), ((PyObject *)__pyx_v_triange2)};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_triange1), ((PyObject *)__pyx_v_triange2)};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_triange1));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_triange1));
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_triange1));
    __Pyx_INCREF(((PyObject *)__pyx_v_triange2));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_triange2));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)__pyx_v_triange2));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 195, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_4 < 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_4mics_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_4 < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":196
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a
 *     tmp1a=np.append(triange1,triange2)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         print('        coplanar_check_two_triangles()')
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 196, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  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 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_5, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_5, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_4, __pyx_t_5);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_4, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_4, __pyx_int_3);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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, 196, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_4 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_4 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
  }
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":197
 *     tmp1a=np.append(triange1,triange2)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        coplanar_check_two_triangles()')
 *     else:
 */
  __pyx_t_12 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_12) {

    /* "pyqcstrc/icosah/mics.pyx":198
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if verbose>0:
 *         print('        coplanar_check_two_triangles()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":197
 *     tmp1a=np.append(triange1,triange2)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        coplanar_check_two_triangles()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":200
 *         print('        coplanar_check_two_triangles()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     if coplanar_check(tmp3a)==1:
 *         if verbose>0:
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":201
 *     else:
 *         pass
 *     if coplanar_check(tmp3a)==1:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         coplanar')
 */
  __pyx_t_12 = ((__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check(((PyArrayObject *)__pyx_v_tmp3a), 0) == 1) != 0);
  if (__pyx_t_12) {

    /* "pyqcstrc/icosah/mics.pyx":202
 *         pass
 *     if coplanar_check(tmp3a)==1:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         coplanar')
 *         else:
 */
    __pyx_t_12 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_12) {

      /* "pyqcstrc/icosah/mics.pyx":203
 *     if coplanar_check(tmp3a)==1:
 *         if verbose>0:
 *             print('         coplanar')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":202
 *         pass
 *     if coplanar_check(tmp3a)==1:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         coplanar')
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":205
 *             print('         coplanar')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return 1 # coplanar
 *     else:
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":206
 *         else:
 *             pass
 *         return 1 # coplanar             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
    __pyx_r = 1;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":201
 *     else:
 *         pass
 *     if coplanar_check(tmp3a)==1:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         coplanar')
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":208
 *         return 1 # coplanar
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         not coplanar')
 *         else:
 */
  /*else*/ {
    __pyx_t_12 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_12) {

      /* "pyqcstrc/icosah/mics.pyx":209
 *     else:
 *         if verbose>0:
 *             print('         not coplanar')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":208
 *         return 1 # coplanar
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         not coplanar')
 *         else:
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/mics.pyx":212
 *         else:
 *             pass
 *             return 0             # <<<<<<<<<<<<<<
 * 
 * cdef list generate_obj_surface(np.ndarray[DTYPE_int_t, ndim=4] obj,
 */
    /*else*/ {
      __pyx_r = 0;
      goto __pyx_L0;
    }
    __pyx_L6:;
  }

  /* "pyqcstrc/icosah/mics.pyx":189
 *                 return np.array([[[0]]])
 * 
 * cdef int coplanar_check_two_triangles(np.ndarray[DTYPE_int_t, ndim=3] triange1,             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] triange2,
 *                                         int verbose):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __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_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.mics.coplanar_check_two_triangles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triange2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":214
 *             return 0
 * 
 * cdef list generate_obj_surface(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                 int num_cycle,
 *                                 int verbose):
 */

static PyObject *__pyx_f_8pyqcstrc_6icosah_4mics_generate_obj_surface(PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose) {
  long __pyx_v_v0;
  long __pyx_v_v1;
  long __pyx_v_v2;
  double __pyx_v_vol1;
  PyObject *__pyx_v_surface_list = 0;
  PyArrayObject *__pyx_v_obj_surface = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_surface;
  __Pyx_Buffer __pyx_pybuffer_obj_surface;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generate_obj_surface", 0);
  __pyx_pybuffer_obj_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_surface.refcount = 0;
  __pyx_pybuffernd_obj_surface.data = NULL;
  __pyx_pybuffernd_obj_surface.rcbuffer = &__pyx_pybuffer_obj_surface;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 214, __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/mics.pyx":223
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      generate_obj_surface()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

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

  /* "pyqcstrc/icosah/mics.pyx":226
 *         print('      generate_obj_surface()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":228
 *         pass
 * 
 *     v0,v1,v2=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __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, 228, __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, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 228, __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, 228, __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, 228, __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, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v0 = __pyx_t_6;
  __pyx_v_v1 = __pyx_t_7;
  __pyx_v_v2 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":230
 *     v0,v1,v2=obj_volume_6d(obj)
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose>1:
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol1)
 */
  __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":231
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 */
  __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":233
 *     if verbose>1:
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_initial_volume);
    __pyx_t_9 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_initial_volume);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_initial_volume);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __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__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __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__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __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__18);
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __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, 233, __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__19);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __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/mics.pyx":231
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>1:             # <<<<<<<<<<<<<<
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":235
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     #obj_surface=generator_surface(obj)
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":238
 * 
 *     #obj_surface=generator_surface(obj)
 *     obj_surface=generator_surface_1(obj,verbose-1)             # <<<<<<<<<<<<<<
 *     surface_list=surface_cleaner(obj_surface,num_cycle,verbose-1)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
    __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
    if (unlikely(__pyx_t_11 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      }
      __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 0;
    }
    __pyx_pybuffernd_obj_surface.diminfo[0].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_surface.diminfo[0].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_surface.diminfo[1].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_surface.diminfo[1].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_surface.diminfo[2].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_surface.diminfo[2].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_surface.diminfo[3].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_surface.diminfo[3].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 238, __pyx_L1_error)
  }
  __pyx_v_obj_surface = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":239
 *     #obj_surface=generator_surface(obj)
 *     obj_surface=generator_surface_1(obj,verbose-1)
 *     surface_list=surface_cleaner(obj_surface,num_cycle,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     return surface_list
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_4mics_surface_cleaner(((PyArrayObject *)__pyx_v_obj_surface), __pyx_v_num_cycle, (__pyx_v_verbose - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_surface_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":241
 *     surface_list=surface_cleaner(obj_surface,num_cycle,verbose-1)
 * 
 *     return surface_list             # <<<<<<<<<<<<<<
 * 
 * cdef int check_two_vertices(np.ndarray[DTYPE_int_t, ndim=2] vertex1,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_surface_list);
  __pyx_r = __pyx_v_surface_list;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":214
 *             return 0
 * 
 * cdef list generate_obj_surface(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                 int num_cycle,
 *                                 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);
  { 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_obj_surface.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.generate_obj_surface", __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_obj_surface.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_surface_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_surface);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":243
 *     return surface_list
 * 
 * cdef int check_two_vertices(np.ndarray[DTYPE_int_t, ndim=2] vertex1,             # <<<<<<<<<<<<<<
 *                             np.ndarray[DTYPE_int_t, ndim=2] vertex2,
 *                             int verbose):
 */

static int __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(PyArrayObject *__pyx_v_vertex1, PyArrayObject *__pyx_v_vertex2, int __pyx_v_verbose) {
  double __pyx_v_x0;
  double __pyx_v_y0;
  double __pyx_v_z0;
  double __pyx_v_x1;
  double __pyx_v_y1;
  double __pyx_v_z1;
  PyObject *__pyx_v_tmp1a = 0;
  PyObject *__pyx_v_tmp1b = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertex1;
  __Pyx_Buffer __pyx_pybuffer_vertex1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertex2;
  __Pyx_Buffer __pyx_pybuffer_vertex2;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t __pyx_t_6;
  __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t __pyx_t_7;
  __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t __pyx_t_8;
  __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t __pyx_t_9;
  __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t __pyx_t_10;
  __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t __pyx_t_11;
  double __pyx_t_12;
  double __pyx_t_13;
  double __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_two_vertices", 0);
  __pyx_pybuffer_vertex1.pybuffer.buf = NULL;
  __pyx_pybuffer_vertex1.refcount = 0;
  __pyx_pybuffernd_vertex1.data = NULL;
  __pyx_pybuffernd_vertex1.rcbuffer = &__pyx_pybuffer_vertex1;
  __pyx_pybuffer_vertex2.pybuffer.buf = NULL;
  __pyx_pybuffer_vertex2.refcount = 0;
  __pyx_pybuffernd_vertex2.data = NULL;
  __pyx_pybuffernd_vertex2.rcbuffer = &__pyx_pybuffer_vertex2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertex1.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertex1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 243, __pyx_L1_error)
  }
  __pyx_pybuffernd_vertex1.diminfo[0].strides = __pyx_pybuffernd_vertex1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertex1.diminfo[0].shape = __pyx_pybuffernd_vertex1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertex1.diminfo[1].strides = __pyx_pybuffernd_vertex1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertex1.diminfo[1].shape = __pyx_pybuffernd_vertex1.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertex2.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertex2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 243, __pyx_L1_error)
  }
  __pyx_pybuffernd_vertex2.diminfo[0].strides = __pyx_pybuffernd_vertex2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertex2.diminfo[0].shape = __pyx_pybuffernd_vertex2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertex2.diminfo[1].strides = __pyx_pybuffernd_vertex2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertex2.diminfo[1].shape = __pyx_pybuffernd_vertex2.rcbuffer->pybuffer.shape[1];

  /* "pyqcstrc/icosah/mics.pyx":274
 *     cdef list tmp1a,tmp1b
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] t1,t2,t3,a1,a2,a3,b1,b2,b3
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          check_two_vertices()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":275
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] t1,t2,t3,a1,a2,a3,b1,b2,b3
 *     if verbose>0:
 *         print('          check_two_vertices()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":274
 *     cdef list tmp1a,tmp1b
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] t1,t2,t3,a1,a2,a3,b1,b2,b3
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          check_two_vertices()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":277
 *         print('          check_two_vertices()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     tmp1a=projection_numerical((vertex1[0][0]+TAU*vertex1[0][1])/float(vertex1[0][2]),\
 *                                     (vertex1[1][0]+TAU*vertex1[1][1])/float(vertex1[1][2]),\
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":278
 *     else:
 *         pass
 *     tmp1a=projection_numerical((vertex1[0][0]+TAU*vertex1[0][1])/float(vertex1[0][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex1[1][0]+TAU*vertex1[1][1])/float(vertex1[1][2]),\
 *                                     (vertex1[2][0]+TAU*vertex1[2][1])/float(vertex1[2][2]),\
 */
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_6 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":279
 *         pass
 *     tmp1a=projection_numerical((vertex1[0][0]+TAU*vertex1[0][1])/float(vertex1[0][2]),\
 *                                     (vertex1[1][0]+TAU*vertex1[1][1])/float(vertex1[1][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex1[2][0]+TAU*vertex1[2][1])/float(vertex1[2][2]),\
 *                                     (vertex1[3][0]+TAU*vertex1[3][1])/float(vertex1[3][2]),\
 */
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_5); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/mics.pyx":280
 *     tmp1a=projection_numerical((vertex1[0][0]+TAU*vertex1[0][1])/float(vertex1[0][2]),\
 *                                     (vertex1[1][0]+TAU*vertex1[1][1])/float(vertex1[1][2]),\
 *                                     (vertex1[2][0]+TAU*vertex1[2][1])/float(vertex1[2][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex1[3][0]+TAU*vertex1[3][1])/float(vertex1[3][2]),\
 *                                     (vertex1[4][0]+TAU*vertex1[4][1])/float(vertex1[4][2]),\
 */
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __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, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_8 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":281
 *                                     (vertex1[1][0]+TAU*vertex1[1][1])/float(vertex1[1][2]),\
 *                                     (vertex1[2][0]+TAU*vertex1[2][1])/float(vertex1[2][2]),\
 *                                     (vertex1[3][0]+TAU*vertex1[3][1])/float(vertex1[3][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex1[4][0]+TAU*vertex1[4][1])/float(vertex1[4][2]),\
 *                                     (vertex1[5][0]+TAU*vertex1[5][1])/float(vertex1[5][2]))
 */
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_9 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":282
 *                                     (vertex1[2][0]+TAU*vertex1[2][1])/float(vertex1[2][2]),\
 *                                     (vertex1[3][0]+TAU*vertex1[3][1])/float(vertex1[3][2]),\
 *                                     (vertex1[4][0]+TAU*vertex1[4][1])/float(vertex1[4][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex1[5][0]+TAU*vertex1[5][1])/float(vertex1[5][2]))
 *     x0,y0,z0=tmp1a[3],tmp1a[4],tmp1a[5]
 */
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_10 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":283
 *                                     (vertex1[3][0]+TAU*vertex1[3][1])/float(vertex1[3][2]),\
 *                                     (vertex1[4][0]+TAU*vertex1[4][1])/float(vertex1[4][2]),\
 *                                     (vertex1[5][0]+TAU*vertex1[5][1])/float(vertex1[5][2]))             # <<<<<<<<<<<<<<
 *     x0,y0,z0=tmp1a[3],tmp1a[4],tmp1a[5]
 *     tmp1b=projection_numerical((vertex2[0][0]+TAU*vertex2[0][1])/float(vertex2[0][2]),\
 */
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex1), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_11 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/mics.pyx":278
 *     else:
 *         pass
 *     tmp1a=projection_numerical((vertex1[0][0]+TAU*vertex1[0][1])/float(vertex1[0][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex1[1][0]+TAU*vertex1[1][1])/float(vertex1[1][2]),\
 *                                     (vertex1[2][0]+TAU*vertex1[2][1])/float(vertex1[2][2]),\
 */
  __pyx_t_4 = __pyx_f_8pyqcstrc_6icosah_10numericalc_projection_numerical(__pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tmp1a = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/mics.pyx":284
 *                                     (vertex1[4][0]+TAU*vertex1[4][1])/float(vertex1[4][2]),\
 *                                     (vertex1[5][0]+TAU*vertex1[5][1])/float(vertex1[5][2]))
 *     x0,y0,z0=tmp1a[3],tmp1a[4],tmp1a[5]             # <<<<<<<<<<<<<<
 *     tmp1b=projection_numerical((vertex2[0][0]+TAU*vertex2[0][1])/float(vertex2[0][2]),\
 *                                     (vertex2[1][0]+TAU*vertex2[1][1])/float(vertex2[1][2]),\
 */
  if (unlikely(__pyx_v_tmp1a == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 284, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_tmp1a, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_v_tmp1a == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 284, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_tmp1a, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_v_tmp1a == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 284, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_tmp1a, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_x0 = __pyx_t_12;
  __pyx_v_y0 = __pyx_t_13;
  __pyx_v_z0 = __pyx_t_14;

  /* "pyqcstrc/icosah/mics.pyx":285
 *                                     (vertex1[5][0]+TAU*vertex1[5][1])/float(vertex1[5][2]))
 *     x0,y0,z0=tmp1a[3],tmp1a[4],tmp1a[5]
 *     tmp1b=projection_numerical((vertex2[0][0]+TAU*vertex2[0][1])/float(vertex2[0][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex2[1][0]+TAU*vertex2[1][1])/float(vertex2[1][2]),\
 *                                     (vertex2[2][0]+TAU*vertex2[2][1])/float(vertex2[2][2]),\
 */
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __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, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_11 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":286
 *     x0,y0,z0=tmp1a[3],tmp1a[4],tmp1a[5]
 *     tmp1b=projection_numerical((vertex2[0][0]+TAU*vertex2[0][1])/float(vertex2[0][2]),\
 *                                     (vertex2[1][0]+TAU*vertex2[1][1])/float(vertex2[1][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex2[2][0]+TAU*vertex2[2][1])/float(vertex2[2][2]),\
 *                                     (vertex2[3][0]+TAU*vertex2[3][1])/float(vertex2[3][2]),\
 */
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":287
 *     tmp1b=projection_numerical((vertex2[0][0]+TAU*vertex2[0][1])/float(vertex2[0][2]),\
 *                                     (vertex2[1][0]+TAU*vertex2[1][1])/float(vertex2[1][2]),\
 *                                     (vertex2[2][0]+TAU*vertex2[2][1])/float(vertex2[2][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex2[3][0]+TAU*vertex2[3][1])/float(vertex2[3][2]),\
 *                                     (vertex2[4][0]+TAU*vertex2[4][1])/float(vertex2[4][2]),\
 */
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_9 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":288
 *                                     (vertex2[1][0]+TAU*vertex2[1][1])/float(vertex2[1][2]),\
 *                                     (vertex2[2][0]+TAU*vertex2[2][1])/float(vertex2[2][2]),\
 *                                     (vertex2[3][0]+TAU*vertex2[3][1])/float(vertex2[3][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex2[4][0]+TAU*vertex2[4][1])/float(vertex2[4][2]),\
 *                                     (vertex2[5][0]+TAU*vertex2[5][1])/float(vertex2[5][2]))
 */
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); 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_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_8 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 288, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/mics.pyx":289
 *                                     (vertex2[2][0]+TAU*vertex2[2][1])/float(vertex2[2][2]),\
 *                                     (vertex2[3][0]+TAU*vertex2[3][1])/float(vertex2[3][2]),\
 *                                     (vertex2[4][0]+TAU*vertex2[4][1])/float(vertex2[4][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex2[5][0]+TAU*vertex2[5][1])/float(vertex2[5][2]))
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]
 */
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __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, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_7 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":290
 *                                     (vertex2[3][0]+TAU*vertex2[3][1])/float(vertex2[3][2]),\
 *                                     (vertex2[4][0]+TAU*vertex2[4][1])/float(vertex2[4][2]),\
 *                                     (vertex2[5][0]+TAU*vertex2[5][1])/float(vertex2[5][2]))             # <<<<<<<<<<<<<<
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:
 */
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_8pyqcstrc_6icosah_4mics_TAU); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex2), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":285
 *                                     (vertex1[5][0]+TAU*vertex1[5][1])/float(vertex1[5][2]))
 *     x0,y0,z0=tmp1a[3],tmp1a[4],tmp1a[5]
 *     tmp1b=projection_numerical((vertex2[0][0]+TAU*vertex2[0][1])/float(vertex2[0][2]),\             # <<<<<<<<<<<<<<
 *                                     (vertex2[1][0]+TAU*vertex2[1][1])/float(vertex2[1][2]),\
 *                                     (vertex2[2][0]+TAU*vertex2[2][1])/float(vertex2[2][2]),\
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_projection_numerical(__pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_6, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tmp1b = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":291
 *                                     (vertex2[4][0]+TAU*vertex2[4][1])/float(vertex2[4][2]),\
 *                                     (vertex2[5][0]+TAU*vertex2[5][1])/float(vertex2[5][2]))
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]             # <<<<<<<<<<<<<<
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:
 *         if verbose>1:
 */
  if (unlikely(__pyx_v_tmp1b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 291, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_tmp1b, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_v_tmp1b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 291, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_tmp1b, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_v_tmp1b == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 291, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_tmp1b, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_x1 = __pyx_t_14;
  __pyx_v_y1 = __pyx_t_13;
  __pyx_v_z1 = __pyx_t_12;

  /* "pyqcstrc/icosah/mics.pyx":292
 *                                     (vertex2[5][0]+TAU*vertex2[5][1])/float(vertex2[5][2]))
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('           equivalent')
 */
  __pyx_t_15 = ((fabs((__pyx_v_x0 - __pyx_v_x1)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
  if (__pyx_t_15) {
  } else {
    __pyx_t_1 = __pyx_t_15;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_15 = ((fabs((__pyx_v_y0 - __pyx_v_y1)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
  if (__pyx_t_15) {
  } else {
    __pyx_t_1 = __pyx_t_15;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_15 = ((fabs((__pyx_v_z0 - __pyx_v_z1)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
  __pyx_t_1 = __pyx_t_15;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":293
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('           equivalent')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":294
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:
 *         if verbose>1:
 *             print('           equivalent')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":293
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('           equivalent')
 *         else:
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/mics.pyx":296
 *             print('           equivalent')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return 1
 *     else:
 */
    /*else*/ {
    }
    __pyx_L8:;

    /* "pyqcstrc/icosah/mics.pyx":297
 *         else:
 *             pass
 *         return 1             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>1:
 */
    __pyx_r = 1;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":292
 *                                     (vertex2[5][0]+TAU*vertex2[5][1])/float(vertex2[5][2]))
 *     x1,y1,z1=tmp1b[3],tmp1b[4],tmp1b[5]
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('           equivalent')
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":299
 *         return 1
 *     else:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('           inequivalent')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":300
 *     else:
 *         if verbose>1:
 *             print('           inequivalent')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":299
 *         return 1
 *     else:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('           inequivalent')
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/mics.pyx":302
 *             print('           inequivalent')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
    /*else*/ {
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/mics.pyx":303
 *         else:
 *             pass
 *         return 0             # <<<<<<<<<<<<<<
 * 
 * cdef int check_two_edges(np.ndarray[DTYPE_int_t, ndim=3] edge1,
 */
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":243
 *     return surface_list
 * 
 * cdef int check_two_vertices(np.ndarray[DTYPE_int_t, ndim=2] vertex1,             # <<<<<<<<<<<<<<
 *                             np.ndarray[DTYPE_int_t, ndim=2] vertex2,
 *                             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);
  { 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_vertex1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertex2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.mics.check_two_vertices", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertex1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertex2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_tmp1a);
  __Pyx_XDECREF(__pyx_v_tmp1b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":305
 *         return 0
 * 
 * cdef int check_two_edges(np.ndarray[DTYPE_int_t, ndim=3] edge1,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=3] edge2,
 *                         int verbose):
 */

static int __pyx_f_8pyqcstrc_6icosah_4mics_check_two_edges(PyArrayObject *__pyx_v_edge1, PyArrayObject *__pyx_v_edge2, int __pyx_v_verbose) {
  int __pyx_v_flag1;
  int __pyx_v_flag2;
  long __pyx_v_i1;
  long __pyx_v_i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge1;
  __Pyx_Buffer __pyx_pybuffer_edge1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge2;
  __Pyx_Buffer __pyx_pybuffer_edge2;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  long __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_two_edges", 0);
  __pyx_pybuffer_edge1.pybuffer.buf = NULL;
  __pyx_pybuffer_edge1.refcount = 0;
  __pyx_pybuffernd_edge1.data = NULL;
  __pyx_pybuffernd_edge1.rcbuffer = &__pyx_pybuffer_edge1;
  __pyx_pybuffer_edge2.pybuffer.buf = NULL;
  __pyx_pybuffer_edge2.refcount = 0;
  __pyx_pybuffernd_edge2.data = NULL;
  __pyx_pybuffernd_edge2.rcbuffer = &__pyx_pybuffer_edge2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge1.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 305, __pyx_L1_error)
  }
  __pyx_pybuffernd_edge1.diminfo[0].strides = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge1.diminfo[0].shape = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge1.diminfo[1].strides = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge1.diminfo[1].shape = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edge1.diminfo[2].strides = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edge1.diminfo[2].shape = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge2.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 305, __pyx_L1_error)
  }
  __pyx_pybuffernd_edge2.diminfo[0].strides = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge2.diminfo[0].shape = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge2.diminfo[1].strides = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge2.diminfo[1].shape = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edge2.diminfo[2].strides = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edge2.diminfo[2].shape = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":311
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         check_two_edges()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":311
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         check_two_edges()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":314
 *         print('         check_two_edges()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     flag1=0
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":316
 *         pass
 * 
 *     flag1=0             # <<<<<<<<<<<<<<
 *     for i1 in range(2):
 *         for i2 in range(2):
 */
  __pyx_v_flag1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":317
 * 
 *     flag1=0
 *     for i1 in range(2):             # <<<<<<<<<<<<<<
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":318
 *     flag1=0
 *     for i1 in range(2):
 *         for i2 in range(2):             # <<<<<<<<<<<<<<
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)
 *     if flag1==2:
 */
    for (__pyx_t_4 = 0; __pyx_t_4 < 2; __pyx_t_4+=1) {
      __pyx_v_i2 = __pyx_t_4;

      /* "pyqcstrc/icosah/mics.pyx":319
 *     for i1 in range(2):
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)             # <<<<<<<<<<<<<<
 *     if flag1==2:
 *         if verbose>0:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), __pyx_v_i1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __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, 319, __pyx_L1_error)
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), __pyx_v_i2, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __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, 319, __pyx_L1_error)
      __pyx_v_flag1 = (__pyx_v_flag1 + __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), (__pyx_v_verbose - 1)));
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":320
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)
 *     if flag1==2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('          equivalent')
 */
  __pyx_t_1 = ((__pyx_v_flag1 == 2) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":321
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)
 *     if flag1==2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('          equivalent')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":322
 *     if flag1==2:
 *         if verbose>0:
 *             print('          equivalent')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":321
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)
 *     if flag1==2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('          equivalent')
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/mics.pyx":324
 *             print('          equivalent')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return 0
 *     else:
 */
    /*else*/ {
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/mics.pyx":325
 *         else:
 *             pass
 *         return 0             # <<<<<<<<<<<<<<
 *     else:
 *         # edge1   A==B
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":320
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge2[i2],verbose-1)
 *     if flag1==2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('          equivalent')
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":330
 *         # edge2   C==D
 *         # check, point C and A==B
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])             # <<<<<<<<<<<<<<
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 330, __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, 330, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __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, 330, __pyx_L1_error)
    __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 330, __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, 330, __pyx_L1_error)
    __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_6), 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyqcstrc/icosah/mics.pyx":331
 *         # check, point C and A==B
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('          inequivalent')
 */
    __pyx_t_1 = ((__pyx_v_flag1 == 2) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":332
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('          inequivalent')
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":333
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:
 *                 print('          inequivalent')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyqcstrc/icosah/mics.pyx":332
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('          inequivalent')
 *             else:
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/mics.pyx":335
 *                 print('          inequivalent')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return 2
 *         else:
 */
      /*else*/ {
      }
      __pyx_L11:;

      /* "pyqcstrc/icosah/mics.pyx":336
 *             else:
 *                 pass
 *             return 2             # <<<<<<<<<<<<<<
 *         else:
 *             # check, point D and A==B
 */
      __pyx_r = 2;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":331
 *         # check, point C and A==B
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('          inequivalent')
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":339
 *         else:
 *             # check, point D and A==B
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])             # <<<<<<<<<<<<<<
 *             if   flag2==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __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, 339, __pyx_L1_error)
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __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, 339, __pyx_L1_error)
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __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, 339, __pyx_L1_error)
      __pyx_v_flag2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment(((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), 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;

      /* "pyqcstrc/icosah/mics.pyx":340
 *             # check, point D and A==B
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag2==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('          inequivalent')
 */
      __pyx_t_1 = ((__pyx_v_flag2 == 2) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":341
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag2==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('          inequivalent')
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":342
 *             if   flag2==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:
 *                     print('          inequivalent')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/mics.pyx":341
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag2==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('          inequivalent')
 *                 else:
 */
          goto __pyx_L13;
        }

        /* "pyqcstrc/icosah/mics.pyx":344
 *                     print('          inequivalent')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return 2
 *             else:
 */
        /*else*/ {
        }
        __pyx_L13:;

        /* "pyqcstrc/icosah/mics.pyx":345
 *                 else:
 *                     pass
 *                 return 2             # <<<<<<<<<<<<<<
 *             else:
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 */
        __pyx_r = 2;
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":340
 *             # check, point D and A==B
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag2==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('          inequivalent')
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":347
 *                 return 2
 *             else:
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          A==CD=B')
 */
      /*else*/ {
        __pyx_t_7 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L15_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == 0) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L15_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":348
 *             else:
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          A==CD=B')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":349
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     if verbose>1:
 *                         print('          A==CD=B')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":348
 *             else:
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          A==CD=B')
 *                     else:
 */
            goto __pyx_L17;
          }

          /* "pyqcstrc/icosah/mics.pyx":351
 *                         print('          A==CD=B')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return 1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 */
          /*else*/ {
          }
          __pyx_L17:;

          /* "pyqcstrc/icosah/mics.pyx":352
 *                     else:
 *                         pass
 *                     return 1             # <<<<<<<<<<<<<<
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     if verbose>1:
 */
          __pyx_r = 1;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":347
 *                 return 2
 *             else:
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          A==CD=B')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":353
 *                         pass
 *                     return 1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          C A==D==B')
 */
        __pyx_t_7 = ((__pyx_v_flag1 == -1L) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L18_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == 0) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L18_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":354
 *                     return 1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          C A==D==B')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":355
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     if verbose>1:
 *                         print('          C A==D==B')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 355, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":354
 *                     return 1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          C A==D==B')
 *                     else:
 */
            goto __pyx_L20;
          }

          /* "pyqcstrc/icosah/mics.pyx":357
 *                         print('          C A==D==B')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return 2
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 */
          /*else*/ {
          }
          __pyx_L20:;

          /* "pyqcstrc/icosah/mics.pyx":358
 *                     else:
 *                         pass
 *                     return 2             # <<<<<<<<<<<<<<
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     if verbose>1:
 */
          __pyx_r = 2;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":353
 *                         pass
 *                     return 1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          C A==D==B')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":359
 *                         pass
 *                     return 2
 *                 elif flag1==-1 and flag2== 1: # C A=====B D             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          C A=====B D')
 */
        __pyx_t_7 = ((__pyx_v_flag1 == -1L) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L21_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == 1) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L21_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":360
 *                     return 2
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          C A=====B D')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":361
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     if verbose>1:
 *                         print('          C A=====B D')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":360
 *                     return 2
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          C A=====B D')
 *                     else:
 */
            goto __pyx_L23;
          }

          /* "pyqcstrc/icosah/mics.pyx":363
 *                         print('          C A=====B D')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return -1
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 */
          /*else*/ {
          }
          __pyx_L23:;

          /* "pyqcstrc/icosah/mics.pyx":364
 *                     else:
 *                         pass
 *                     return -1             # <<<<<<<<<<<<<<
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     if verbose>1:
 */
          __pyx_r = -1;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":359
 *                         pass
 *                     return 2
 *                 elif flag1==-1 and flag2== 1: # C A=====B D             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          C A=====B D')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":365
 *                         pass
 *                     return -1
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          A==C==B D')
 */
        __pyx_t_7 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == 1) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L24_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":366
 *                     return -1
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          A==C==B D')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":367
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     if verbose>1:
 *                         print('          A==C==B D')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":366
 *                     return -1
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          A==C==B D')
 *                     else:
 */
            goto __pyx_L26;
          }

          /* "pyqcstrc/icosah/mics.pyx":369
 *                         print('          A==C==B D')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return 2
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 */
          /*else*/ {
          }
          __pyx_L26:;

          /* "pyqcstrc/icosah/mics.pyx":370
 *                     else:
 *                         pass
 *                     return 2             # <<<<<<<<<<<<<<
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     if verbose>1:
 */
          __pyx_r = 2;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":365
 *                         pass
 *                     return -1
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          A==C==B D')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":371
 *                         pass
 *                     return 2
 *                 elif flag1== 0 and flag2==-1: # D A==C==B             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          D A==C==B')
 */
        __pyx_t_7 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L27_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == -1L) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L27_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":372
 *                     return 2
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          D A==C==B')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":373
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     if verbose>1:
 *                         print('          D A==C==B')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":372
 *                     return 2
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          D A==C==B')
 *                     else:
 */
            goto __pyx_L29;
          }

          /* "pyqcstrc/icosah/mics.pyx":375
 *                         print('          D A==C==B')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return 2
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 */
          /*else*/ {
          }
          __pyx_L29:;

          /* "pyqcstrc/icosah/mics.pyx":376
 *                     else:
 *                         pass
 *                     return 2             # <<<<<<<<<<<<<<
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     if verbose>1:
 */
          __pyx_r = 2;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":371
 *                         pass
 *                     return 2
 *                 elif flag1== 0 and flag2==-1: # D A==C==B             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          D A==C==B')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":377
 *                         pass
 *                     return 2
 *                 elif flag1== 1 and flag2==-1: # D A=====B C             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          D A=====B C')
 */
        __pyx_t_7 = ((__pyx_v_flag1 == 1) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L30_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == -1L) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L30_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":378
 *                     return 2
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          D A=====B C')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":379
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     if verbose>1:
 *                         print('          D A=====B C')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":378
 *                     return 2
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          D A=====B C')
 *                     else:
 */
            goto __pyx_L32;
          }

          /* "pyqcstrc/icosah/mics.pyx":381
 *                         print('          D A=====B C')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return 2
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 */
          /*else*/ {
          }
          __pyx_L32:;

          /* "pyqcstrc/icosah/mics.pyx":382
 *                     else:
 *                         pass
 *                     return 2             # <<<<<<<<<<<<<<
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     if verbose>1:
 */
          __pyx_r = 2;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":377
 *                         pass
 *                     return 2
 *                 elif flag1== 1 and flag2==-1: # D A=====B C             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          D A=====B C')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":383
 *                         pass
 *                     return 2
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          A==D==B C')
 */
        __pyx_t_7 = ((__pyx_v_flag1 == 1) != 0);
        if (__pyx_t_7) {
        } else {
          __pyx_t_1 = __pyx_t_7;
          goto __pyx_L33_bool_binop_done;
        }
        __pyx_t_7 = ((__pyx_v_flag2 == 0) != 0);
        __pyx_t_1 = __pyx_t_7;
        __pyx_L33_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":384
 *                     return 2
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          A==D==B C')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":385
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     if verbose>1:
 *                         print('          A==D==B C')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 385, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":384
 *                     return 2
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     if verbose>1:             # <<<<<<<<<<<<<<
 *                         print('          A==D==B C')
 *                     else:
 */
            goto __pyx_L35;
          }

          /* "pyqcstrc/icosah/mics.pyx":387
 *                         print('          A==D==B C')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return 2
 *                 else:
 */
          /*else*/ {
          }
          __pyx_L35:;

          /* "pyqcstrc/icosah/mics.pyx":388
 *                     else:
 *                         pass
 *                     return 2             # <<<<<<<<<<<<<<
 *                 else:
 *                     return 2
 */
          __pyx_r = 2;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":383
 *                         pass
 *                     return 2
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C             # <<<<<<<<<<<<<<
 *                     if verbose>1:
 *                         print('          A==D==B C')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":390
 *                     return 2
 *                 else:
 *                     return 2             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray merge_two_edges(np.ndarray[DTYPE_int_t, ndim=3] edge1,
 */
        /*else*/ {
          __pyx_r = 2;
          goto __pyx_L0;
        }
      }
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":305
 *         return 0
 * 
 * cdef int check_two_edges(np.ndarray[DTYPE_int_t, ndim=3] edge1,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=3] edge2,
 *                         int verbose):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.mics.check_two_edges", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":392
 *                     return 2
 * 
 * cdef np.ndarray merge_two_edges(np.ndarray[DTYPE_int_t, ndim=3] edge1,             # <<<<<<<<<<<<<<
 *                                 np.ndarray[DTYPE_int_t, ndim=3] edge2,
 *                                 int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_two_edges(PyArrayObject *__pyx_v_edge1, PyArrayObject *__pyx_v_edge2, int __pyx_v_verbose) {
  int __pyx_v_flag1;
  int __pyx_v_flag2;
  PyArrayObject *__pyx_v_tmp1a = 0;
  long __pyx_v_i1;
  long __pyx_v_i2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge1;
  __Pyx_Buffer __pyx_pybuffer_edge1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge2;
  __Pyx_Buffer __pyx_pybuffer_edge2;
  __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;
  long __pyx_t_3;
  long __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_two_edges", 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_edge1.pybuffer.buf = NULL;
  __pyx_pybuffer_edge1.refcount = 0;
  __pyx_pybuffernd_edge1.data = NULL;
  __pyx_pybuffernd_edge1.rcbuffer = &__pyx_pybuffer_edge1;
  __pyx_pybuffer_edge2.pybuffer.buf = NULL;
  __pyx_pybuffer_edge2.refcount = 0;
  __pyx_pybuffernd_edge2.data = NULL;
  __pyx_pybuffernd_edge2.rcbuffer = &__pyx_pybuffer_edge2;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge1.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 392, __pyx_L1_error)
  }
  __pyx_pybuffernd_edge1.diminfo[0].strides = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge1.diminfo[0].shape = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge1.diminfo[1].strides = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge1.diminfo[1].shape = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edge1.diminfo[2].strides = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edge1.diminfo[2].shape = __pyx_pybuffernd_edge1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge2.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 392, __pyx_L1_error)
  }
  __pyx_pybuffernd_edge2.diminfo[0].strides = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge2.diminfo[0].shape = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edge2.diminfo[1].strides = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edge2.diminfo[1].shape = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edge2.diminfo[2].strides = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edge2.diminfo[2].shape = __pyx_pybuffernd_edge2.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":398
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           merge_two_edges()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":398
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] tmp1a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           merge_two_edges()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":401
 *         print('           merge_two_edges()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     flag1=0
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":403
 *         pass
 * 
 *     flag1=0             # <<<<<<<<<<<<<<
 *     for i1 in range(2):
 *         for i2 in range(2):
 */
  __pyx_v_flag1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":404
 * 
 *     flag1=0
 *     for i1 in range(2):             # <<<<<<<<<<<<<<
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":405
 *     flag1=0
 *     for i1 in range(2):
 *         for i2 in range(2):             # <<<<<<<<<<<<<<
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)
 *     if flag1==2:
 */
    for (__pyx_t_4 = 0; __pyx_t_4 < 2; __pyx_t_4+=1) {
      __pyx_v_i2 = __pyx_t_4;

      /* "pyqcstrc/icosah/mics.pyx":406
 *     for i1 in range(2):
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)             # <<<<<<<<<<<<<<
 *     if flag1==2:
 *         if verbose>0:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), __pyx_v_i1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __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, 406, __pyx_L1_error)
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), __pyx_v_i2, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 406, __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, 406, __pyx_L1_error)
      __pyx_v_flag1 = (__pyx_v_flag1 + __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), __pyx_v_verbose));
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":407
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)
 *     if flag1==2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('           merged')
 */
  __pyx_t_1 = ((__pyx_v_flag1 == 2) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":408
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)
 *     if flag1==2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('           merged')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":409
 *     if flag1==2:
 *         if verbose>0:
 *             print('           merged')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":408
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)
 *     if flag1==2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('           merged')
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/mics.pyx":411
 *             print('           merged')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return edge1
 *     else:
 */
    /*else*/ {
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/mics.pyx":412
 *         else:
 *             pass
 *         return edge1             # <<<<<<<<<<<<<<
 *     else:
 *         # edge1   A==B
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_edge1));
    __pyx_r = ((PyArrayObject *)__pyx_v_edge1);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":407
 *         for i2 in range(2):
 *             flag1+=check_two_vertices(edge1[i1],edge1[i2],verbose)
 *     if flag1==2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('           merged')
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":417
 *         # edge2   C==D
 *         # check, point C and A==B
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])             # <<<<<<<<<<<<<<
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __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, 417, __pyx_L1_error)
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __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, 417, __pyx_L1_error)
    __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __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, 417, __pyx_L1_error)
    __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_6), 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyqcstrc/icosah/mics.pyx":418
 *         # check, point C and A==B
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('           cannot merged')
 */
    __pyx_t_1 = ((__pyx_v_flag1 == 2) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":419
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('           cannot merged')
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":420
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:
 *                 print('           cannot merged')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "pyqcstrc/icosah/mics.pyx":419
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('           cannot merged')
 *             else:
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/mics.pyx":422
 *                 print('           cannot merged')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return np.array([0]).reshape(1,1,1)
 *         else:
 */
      /*else*/ {
      }
      __pyx_L11:;

      /* "pyqcstrc/icosah/mics.pyx":423
 *             else:
 *                 pass
 *             return np.array([0]).reshape(1,1,1)             # <<<<<<<<<<<<<<
 *         else:
 *             # check, point D and A==B
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __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, 423, __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, 423, __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_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __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, 423, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":418
 *         # check, point C and A==B
 *         flag1=point_on_segment(edge2[0],edge1[0],edge1[1])
 *         if   flag1==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('           cannot merged')
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":426
 *         else:
 *             # check, point D and A==B
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])             # <<<<<<<<<<<<<<
 *             if   flag1==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __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, 426, __pyx_L1_error)
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __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, 426, __pyx_L1_error)
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __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, 426, __pyx_L1_error)
      __pyx_v_flag2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment(((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_2), 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":427
 *             # check, point D and A==B
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag1==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('           cannot merged')
 */
      __pyx_t_1 = ((__pyx_v_flag1 == 2) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":428
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag1==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('           cannot merged')
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":429
 *             if   flag1==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:
 *                     print('           cannot merged')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":428
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag1==2:  # C is not on a line passing through A and B.
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('           cannot merged')
 *                 else:
 */
          goto __pyx_L13;
        }

        /* "pyqcstrc/icosah/mics.pyx":431
 *                     print('           cannot merged')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return np.array([0]).reshape(1,1,1)
 *             else:
 */
        /*else*/ {
        }
        __pyx_L13:;

        /* "pyqcstrc/icosah/mics.pyx":432
 *                 else:
 *                     pass
 *                 return np.array([0]).reshape(1,1,1)             # <<<<<<<<<<<<<<
 *             else:
 *                 if verbose>0:
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __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, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __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_7 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __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, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 432, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":427
 *             # check, point D and A==B
 *             flag2=point_on_segment(edge2[0],edge1[0],edge1[1])
 *             if   flag1==2:  # C is not on a line passing through A and B.             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('           cannot merged')
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":434
 *                 return np.array([0]).reshape(1,1,1)
 *             else:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('           merged')
 *                 else:
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

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

          /* "pyqcstrc/icosah/mics.pyx":434
 *                 return np.array([0]).reshape(1,1,1)
 *             else:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('           merged')
 *                 else:
 */
          goto __pyx_L14;
        }

        /* "pyqcstrc/icosah/mics.pyx":437
 *                     print('           merged')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     return edge1
 */
        /*else*/ {
        }
        __pyx_L14:;

        /* "pyqcstrc/icosah/mics.pyx":438
 *                 else:
 *                     pass
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B             # <<<<<<<<<<<<<<
 *                     return edge1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 */
        __pyx_t_8 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L16_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == 0) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L16_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":439
 *                     pass
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     return edge1             # <<<<<<<<<<<<<<
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     tmp1a=np.append(edge2[0],edge1[1])
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __Pyx_INCREF(((PyObject *)__pyx_v_edge1));
          __pyx_r = ((PyArrayObject *)__pyx_v_edge1);
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":438
 *                 else:
 *                     pass
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B             # <<<<<<<<<<<<<<
 *                     return edge1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":440
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     return edge1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[0],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        __pyx_t_8 = ((__pyx_v_flag1 == -1L) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L18_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == 0) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L18_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":441
 *                     return edge1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     tmp1a=np.append(edge2[0],edge1[1])             # <<<<<<<<<<<<<<
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__pyx_t_9) {
              __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
            __pyx_t_6 = 0;
            __pyx_t_7 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 441, __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_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 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_4mics_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_10 < 0)) __PYX_ERR(0, 441, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":442
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     tmp1a=np.append(edge2[0],edge1[1])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     tmp1a=np.append(edge2[0],edge2[1])
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __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, 442, __pyx_L1_error)
          __pyx_r = ((PyArrayObject *)__pyx_t_5);
          __pyx_t_5 = 0;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":440
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     return edge1
 *                 elif flag1==-1 and flag2== 0: # C A==D==B             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[0],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":443
 *                     tmp1a=np.append(edge2[0],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1==-1 and flag2== 1: # C A=====B D             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        __pyx_t_8 = ((__pyx_v_flag1 == -1L) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L20_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == 1) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L20_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":444
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     tmp1a=np.append(edge2[0],edge2[1])             # <<<<<<<<<<<<<<
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 444, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 444, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_7};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_7};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 444, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (__pyx_t_6) {
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_7);
            __pyx_t_2 = 0;
            __pyx_t_7 = 0;
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 444, __pyx_L1_error)
          __pyx_t_12 = ((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_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 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_4mics_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_10 < 0)) __PYX_ERR(0, 444, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_5);
          __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/mics.pyx":445
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     tmp1a=np.append(edge2[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     tmp1a=np.append(edge1[0],edge2[1])
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 445, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 445, __pyx_L1_error)
          __pyx_r = ((PyArrayObject *)__pyx_t_11);
          __pyx_t_11 = 0;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":443
 *                     tmp1a=np.append(edge2[0],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1==-1 and flag2== 1: # C A=====B D             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":446
 *                     tmp1a=np.append(edge2[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge1[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        __pyx_t_8 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L22_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == 1) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L22_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":447
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     tmp1a=np.append(edge1[0],edge2[1])             # <<<<<<<<<<<<<<
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 */
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 447, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_2 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_9, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_7};
            __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 447, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_7};
            __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 447, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 447, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_7);
            __pyx_t_5 = 0;
            __pyx_t_7 = 0;
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 447, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 447, __pyx_L1_error)
          __pyx_t_12 = ((PyArrayObject *)__pyx_t_11);
          {
            __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_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 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_4mics_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_10 < 0)) __PYX_ERR(0, 447, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_11);
          __pyx_t_11 = 0;

          /* "pyqcstrc/icosah/mics.pyx":448
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     tmp1a=np.append(edge1[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     tmp1a=np.append(edge2[1],edge1[1])
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 448, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 448, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 448, __pyx_L1_error)
          __pyx_r = ((PyArrayObject *)__pyx_t_9);
          __pyx_t_9 = 0;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":446
 *                     tmp1a=np.append(edge2[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge1[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":449
 *                     tmp1a=np.append(edge1[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2==-1: # D A==C==B             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[1],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        __pyx_t_8 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == -1L) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L24_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":450
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     tmp1a=np.append(edge2[1],edge1[1])             # <<<<<<<<<<<<<<
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 */
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_append); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_5 = NULL;
          __pyx_t_10 = 0;
          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_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_11, __pyx_t_7};
            __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_11, __pyx_t_7};
            __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_11);
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_10, __pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_10, __pyx_t_7);
            __pyx_t_11 = 0;
            __pyx_t_7 = 0;
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 450, __pyx_L1_error)
          __pyx_t_12 = ((PyArrayObject *)__pyx_t_9);
          {
            __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_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 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_4mics_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_10 < 0)) __PYX_ERR(0, 450, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_9);
          __pyx_t_9 = 0;

          /* "pyqcstrc/icosah/mics.pyx":451
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     tmp1a=np.append(edge2[1],edge1[1])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     tmp1a=np.append(edge2[1],edge2[0])
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 451, __pyx_L1_error)
          __pyx_r = ((PyArrayObject *)__pyx_t_6);
          __pyx_t_6 = 0;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":449
 *                     tmp1a=np.append(edge1[0],edge2[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 0 and flag2==-1: # D A==C==B             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[1],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":452
 *                     tmp1a=np.append(edge2[1],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2==-1: # D A=====B C             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[1],edge2[0])
 *                     return tmp1a.reshape(2,6,3)
 */
        __pyx_t_8 = ((__pyx_v_flag1 == 1) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L26_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == -1L) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L26_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":453
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     tmp1a=np.append(edge2[1],edge2[0])             # <<<<<<<<<<<<<<
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 */
          __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge2), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_11 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_9, __pyx_t_7};
            __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_9, __pyx_t_7};
            __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            if (__pyx_t_11) {
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_9);
            PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_t_9);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_t_7);
            __pyx_t_9 = 0;
            __pyx_t_7 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 453, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __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, 453, __pyx_L1_error)
          __pyx_t_12 = ((PyArrayObject *)__pyx_t_6);
          {
            __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_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 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_4mics_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_10 < 0)) __PYX_ERR(0, 453, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_6);
          __pyx_t_6 = 0;

          /* "pyqcstrc/icosah/mics.pyx":454
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     tmp1a=np.append(edge2[1],edge2[0])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     tmp1a=np.append(edge1[0],edge1[0])
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 454, __pyx_L1_error)
          __pyx_r = ((PyArrayObject *)__pyx_t_2);
          __pyx_t_2 = 0;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":452
 *                     tmp1a=np.append(edge2[1],edge1[1])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2==-1: # D A=====B C             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge2[1],edge2[0])
 *                     return tmp1a.reshape(2,6,3)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":455
 *                     tmp1a=np.append(edge2[1],edge2[0])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge1[0],edge1[0])
 *                     return tmp1a.reshape(2,6,3)
 */
        __pyx_t_8 = ((__pyx_v_flag1 == 1) != 0);
        if (__pyx_t_8) {
        } else {
          __pyx_t_1 = __pyx_t_8;
          goto __pyx_L28_bool_binop_done;
        }
        __pyx_t_8 = ((__pyx_v_flag2 == 0) != 0);
        __pyx_t_1 = __pyx_t_8;
        __pyx_L28_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":456
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     tmp1a=np.append(edge1[0],edge1[0])             # <<<<<<<<<<<<<<
 *                     return tmp1a.reshape(2,6,3)
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edge1), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 = NULL;
          __pyx_t_10 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_9)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_10 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 456, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__pyx_t_9) {
              __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_7);
            PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
            __pyx_t_6 = 0;
            __pyx_t_7 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 456, __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_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_10 < 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_4mics_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_10 < 0)) __PYX_ERR(0, 456, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":457
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     tmp1a=np.append(edge1[0],edge1[0])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray triangles_to_edges(np.ndarray[DTYPE_int_t, ndim=4] triangles,int verbose):
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __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, 457, __pyx_L1_error)
          __pyx_r = ((PyArrayObject *)__pyx_t_5);
          __pyx_t_5 = 0;
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":455
 *                     tmp1a=np.append(edge2[1],edge2[0])
 *                     return tmp1a.reshape(2,6,3)
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(edge1[0],edge1[0])
 *                     return tmp1a.reshape(2,6,3)
 */
        }
      }
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":392
 *                     return 2
 * 
 * cdef np.ndarray merge_two_edges(np.ndarray[DTYPE_int_t, ndim=3] edge1,             # <<<<<<<<<<<<<<
 *                                 np.ndarray[DTYPE_int_t, ndim=3] edge2,
 *                                 int verbose):
 */

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __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_edge1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.merge_two_edges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge2.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/mics.pyx":459
 *                     return tmp1a.reshape(2,6,3)
 * 
 * cdef np.ndarray triangles_to_edges(np.ndarray[DTYPE_int_t, ndim=4] triangles,int verbose):             # <<<<<<<<<<<<<<
 *     # parameter, set of triangles
 *     # returns, set of vertices
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_triangles_to_edges(PyArrayObject *__pyx_v_triangles, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_j2;
  PyObject *__pyx_v_combination = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyObject *__pyx_v_j1 = NULL;
  __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_triangles;
  __Pyx_Buffer __pyx_pybuffer_triangles;
  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;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangles_to_edges", 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_triangles.pybuffer.buf = NULL;
  __pyx_pybuffer_triangles.refcount = 0;
  __pyx_pybuffernd_triangles.data = NULL;
  __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 459, __pyx_L1_error)
  }
  __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triangles.diminfo[1].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triangles.diminfo[1].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triangles.diminfo[2].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triangles.diminfo[2].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_triangles.diminfo[3].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_triangles.diminfo[3].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":467
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       triangles_to_edges()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":467
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       triangles_to_edges()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":470
 *         print('       triangles_to_edges()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1b=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":472
 *         pass
 * 
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     combination=[[0,1],[0,2],[1,2]]
 *     for i1 in range(len(triangles)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __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, 472, __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, 472, __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, 472, __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, 472, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_7 < 0)) __PYX_ERR(0, 472, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":473
 * 
 *     tmp1b=np.array([0])
 *     combination=[[0,1],[0,2],[1,2]]             # <<<<<<<<<<<<<<
 *     for i1 in range(len(triangles)):
 *         for i2 in range(3):
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __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_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __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_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_v_combination = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":474
 *     tmp1b=np.array([0])
 *     combination=[[0,1],[0,2],[1,2]]
 *     for i1 in range(len(triangles)):             # <<<<<<<<<<<<<<
 *         for i2 in range(3):
 *             j1=combination[i2][0]
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_triangles)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 474, __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/mics.pyx":475
 *     combination=[[0,1],[0,2],[1,2]]
 *     for i1 in range(len(triangles)):
 *         for i2 in range(3):             # <<<<<<<<<<<<<<
 *             j1=combination[i2][0]
 *             j2=combination[i2][1]
 */
    for (__pyx_t_13 = 0; __pyx_t_13 < 3; __pyx_t_13+=1) {
      __pyx_v_i2 = __pyx_t_13;

      /* "pyqcstrc/icosah/mics.pyx":476
 *     for i1 in range(len(triangles)):
 *         for i2 in range(3):
 *             j1=combination[i2][0]             # <<<<<<<<<<<<<<
 *             j2=combination[i2][1]
 *             tmp1a=np.append(triangles[i1][j1],triangles[i1][j2])
 */
      __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_combination, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_j1, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":477
 *         for i2 in range(3):
 *             j1=combination[i2][0]
 *             j2=combination[i2][1]             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(triangles[i1][j1],triangles[i1][j2])
 *             if len(tmp1b)==1:
 */
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_combination, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 477, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_j2 = __pyx_t_14;

      /* "pyqcstrc/icosah/mics.pyx":478
 *             j1=combination[i2][0]
 *             j2=combination[i2][1]
 *             tmp1a=np.append(triangles[i1][j1],triangles[i1][j2])             # <<<<<<<<<<<<<<
 *             if len(tmp1b)==1:
 *                 tmp1b=tmp1a
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __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, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangles), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_j1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangles), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_j2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_14 = 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_14 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_15};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_15};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      {
        __pyx_t_16 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_14, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_14, __pyx_t_15);
        __pyx_t_2 = 0;
        __pyx_t_15 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 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, 478, __pyx_L1_error)
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
      {
        __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_14 < 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_4mics_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_14 < 0)) __PYX_ERR(0, 478, __pyx_L1_error)
      }
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":479
 *             j2=combination[i2][1]
 *             tmp1a=np.append(triangles[i1][j1],triangles[i1][j2])
 *             if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp1a
 *             else:
 */
      __pyx_t_17 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 479, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_17 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":480
 *             tmp1a=np.append(triangles[i1][j1],triangles[i1][j2])
 *             if len(tmp1b)==1:
 *                 tmp1b=tmp1a             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp1a)
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_14 < 0)) {
            PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_14 < 0)) __PYX_ERR(0, 480, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
        __Pyx_DECREF_SET(__pyx_v_tmp1b, __pyx_v_tmp1a);

        /* "pyqcstrc/icosah/mics.pyx":479
 *             j2=combination[i2][1]
 *             tmp1a=np.append(triangles[i1][j1],triangles[i1][j2])
 *             if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp1a
 *             else:
 */
        goto __pyx_L8;
      }

      /* "pyqcstrc/icosah/mics.pyx":482
 *                 tmp1b=tmp1a
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp1a)             # <<<<<<<<<<<<<<
 *     return tmp1b.reshape(int(len(tmp1b)/36),2,6,3)
 * 
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        __pyx_t_14 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_16, function);
            __pyx_t_14 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __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_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 482, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 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_15, 0+__pyx_t_14, ((PyObject *)__pyx_v_tmp1b));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, ((PyObject *)__pyx_v_tmp1a));
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 482, __pyx_L1_error)
        __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_14 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_14 < 0)) __PYX_ERR(0, 482, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;
      }
      __pyx_L8:;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":483
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp1a)
 *     return tmp1b.reshape(int(len(tmp1b)/36),2,6,3)             # <<<<<<<<<<<<<<
 * 
 * cdef list surface_cleaner(np.ndarray[DTYPE_int_t, ndim=4] surface,
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 483, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 36.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_16)) {
    PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_15, __pyx_int_2, __pyx_int_6, __pyx_int_3};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __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[5] = {__pyx_t_4, __pyx_t_15, __pyx_int_2, __pyx_int_6, __pyx_int_3};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_15);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_int_2);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_7, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_7, __pyx_int_3);
    __pyx_t_15 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 483, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":459
 *                     return tmp1a.reshape(2,6,3)
 * 
 * cdef np.ndarray triangles_to_edges(np.ndarray[DTYPE_int_t, ndim=4] triangles,int verbose):             # <<<<<<<<<<<<<<
 *     # parameter, set of triangles
 *     # returns, set of vertices
 */

  /* 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_15);
  __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_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.triangles_to_edges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangles.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_combination);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF(__pyx_v_j1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":485
 *     return tmp1b.reshape(int(len(tmp1b)/36),2,6,3)
 * 
 * cdef list surface_cleaner(np.ndarray[DTYPE_int_t, ndim=4] surface,             # <<<<<<<<<<<<<<
 *                             int num_cycle,
 *                             int verbose):
 */

static PyObject *__pyx_f_8pyqcstrc_6icosah_4mics_surface_cleaner(PyArrayObject *__pyx_v_surface, int __pyx_v_num_cycle, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_i0;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  PyObject *__pyx_v_list_0 = 0;
  PyObject *__pyx_v_list_1 = 0;
  PyObject *__pyx_v_list_2 = 0;
  PyObject *__pyx_v_skip_list = 0;
  PyObject *__pyx_v_combination = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1c = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_tmp1d = 0;
  PyArrayObject *__pyx_v_tmp1e = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_tmp4c = 0;
  CYTHON_UNUSED PyObject *__pyx_v_obj_edge_all = NULL;
  PyObject *__pyx_v_j1 = NULL;
  PyObject *__pyx_v_j2 = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_surface;
  __Pyx_Buffer __pyx_pybuffer_surface;
  __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_tmp1d;
  __Pyx_Buffer __pyx_pybuffer_tmp1d;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1e;
  __Pyx_Buffer __pyx_pybuffer_tmp1e;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4c;
  __Pyx_Buffer __pyx_pybuffer_tmp4c;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  Py_UCS4 __pyx_t_19;
  int __pyx_t_20;
  PyObject *(*__pyx_t_21)(PyObject *);
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyArrayObject *__pyx_t_24 = NULL;
  Py_ssize_t __pyx_t_25;
  int __pyx_t_26;
  PyArrayObject *__pyx_t_27 = NULL;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  int __pyx_t_30;
  int __pyx_t_31;
  int __pyx_t_32;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("surface_cleaner", 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_tmp1d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1d.refcount = 0;
  __pyx_pybuffernd_tmp1d.data = NULL;
  __pyx_pybuffernd_tmp1d.rcbuffer = &__pyx_pybuffer_tmp1d;
  __pyx_pybuffer_tmp1e.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1e.refcount = 0;
  __pyx_pybuffernd_tmp1e.data = NULL;
  __pyx_pybuffernd_tmp1e.rcbuffer = &__pyx_pybuffer_tmp1e;
  __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_tmp4b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4b.refcount = 0;
  __pyx_pybuffernd_tmp4b.data = NULL;
  __pyx_pybuffernd_tmp4b.rcbuffer = &__pyx_pybuffer_tmp4b;
  __pyx_pybuffer_tmp4c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4c.refcount = 0;
  __pyx_pybuffernd_tmp4c.data = NULL;
  __pyx_pybuffernd_tmp4c.rcbuffer = &__pyx_pybuffer_tmp4c;
  __pyx_pybuffer_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_surface.refcount = 0;
  __pyx_pybuffernd_surface.data = NULL;
  __pyx_pybuffernd_surface.rcbuffer = &__pyx_pybuffer_surface;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 485, __pyx_L1_error)
  }
  __pyx_pybuffernd_surface.diminfo[0].strides = __pyx_pybuffernd_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surface.diminfo[0].shape = __pyx_pybuffernd_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_surface.diminfo[1].strides = __pyx_pybuffernd_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_surface.diminfo[1].shape = __pyx_pybuffernd_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_surface.diminfo[2].strides = __pyx_pybuffernd_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_surface.diminfo[2].shape = __pyx_pybuffernd_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_surface.diminfo[3].strides = __pyx_pybuffernd_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_surface.diminfo[3].shape = __pyx_pybuffernd_surface.rcbuffer->pybuffer.shape[3];

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

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

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

  /* "pyqcstrc/icosah/mics.pyx":505
 *         print('       surface_cleaner()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     obj_edge_all=np.array([[[[0]]]])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":507
 *         pass
 * 
 *     obj_edge_all=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     combination=[[0,1],[0,2],[1,2]]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __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, 507, __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, 507, __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, 507, __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, 507, __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, 507, __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, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_obj_edge_all = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":508
 * 
 *     obj_edge_all=np.array([[[[0]]]])
 *     combination=[[0,1],[0,2],[1,2]]             # <<<<<<<<<<<<<<
 * 
 *     # A
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __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_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __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_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __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_4);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_v_combination = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":511
 * 
 *     # A
 *     list_0=[]             # <<<<<<<<<<<<<<
 *     list_2=[]
 *     skip_list=[-1]
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_list_0 = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":512
 *     # A
 *     list_0=[]
 *     list_2=[]             # <<<<<<<<<<<<<<
 *     skip_list=[-1]
 *     for i1 in range(len(surface)-1):
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_list_2 = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":513
 *     list_0=[]
 *     list_2=[]
 *     skip_list=[-1]             # <<<<<<<<<<<<<<
 *     for i1 in range(len(surface)-1):
 *         tmp1a=np.array([0])
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_neg_1);
  __pyx_v_skip_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":514
 *     list_2=[]
 *     skip_list=[-1]
 *     for i1 in range(len(surface)-1):             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_surface)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 514, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 - 1);
  __pyx_t_6 = __pyx_t_7;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_6; __pyx_t_8+=1) {
    __pyx_v_i1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":515
 *     skip_list=[-1]
 *     for i1 in range(len(surface)-1):
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1b=np.array([0])
 *         tmp1c=np.array([0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __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 = NULL;
    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_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(0, 515, __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, 515, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
    {
      __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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 515, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":516
 *     for i1 in range(len(surface)-1):
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1c=np.array([0])
 *         counter2=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __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, 516, __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, 516, __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 = 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_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __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, 516, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
    {
      __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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 516, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":517
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 *         tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 *         counter2=0
 *         list_1=[]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __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 = NULL;
    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_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(0, 517, __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, 517, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_10 < 0)) __PYX_ERR(0, 517, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":518
 *         tmp1b=np.array([0])
 *         tmp1c=np.array([0])
 *         counter2=0             # <<<<<<<<<<<<<<
 *         list_1=[]
 *         counter2=0
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":519
 *         tmp1c=np.array([0])
 *         counter2=0
 *         list_1=[]             # <<<<<<<<<<<<<<
 *         counter2=0
 *         for i2 in range(i1+1,len(surface)):
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_list_1, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":520
 *         counter2=0
 *         list_1=[]
 *         counter2=0             # <<<<<<<<<<<<<<
 *         for i2 in range(i1+1,len(surface)):
 *             counter1=0
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":521
 *         list_1=[]
 *         counter2=0
 *         for i2 in range(i1+1,len(surface)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i3 in skip_list:
 */
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_surface)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 521, __pyx_L1_error)
    __pyx_t_15 = __pyx_t_14;
    for (__pyx_t_10 = (__pyx_v_i1 + 1); __pyx_t_10 < __pyx_t_15; __pyx_t_10+=1) {
      __pyx_v_i2 = __pyx_t_10;

      /* "pyqcstrc/icosah/mics.pyx":522
 *         counter2=0
 *         for i2 in range(i1+1,len(surface)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i3 in skip_list:
 *                 if i1==i3 or i2==i3:
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":523
 *         for i2 in range(i1+1,len(surface)):
 *             counter1=0
 *             for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                 if i1==i3 or i2==i3:
 *                     counter1+=1
 */
      __pyx_t_3 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_16 = 0;
      for (;;) {
        if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_16); __Pyx_INCREF(__pyx_t_4); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_i3 = __pyx_t_17;

        /* "pyqcstrc/icosah/mics.pyx":524
 *             counter1=0
 *             for i3 in skip_list:
 *                 if i1==i3 or i2==i3:             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_18 = ((__pyx_v_i1 == __pyx_v_i3) != 0);
        if (!__pyx_t_18) {
        } else {
          __pyx_t_1 = __pyx_t_18;
          goto __pyx_L11_bool_binop_done;
        }
        __pyx_t_18 = ((__pyx_v_i2 == __pyx_v_i3) != 0);
        __pyx_t_1 = __pyx_t_18;
        __pyx_L11_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":525
 *             for i3 in skip_list:
 *                 if i1==i3 or i2==i3:
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":526
 *                 if i1==i3 or i2==i3:
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L9_break;

          /* "pyqcstrc/icosah/mics.pyx":524
 *             counter1=0
 *             for i3 in skip_list:
 *                 if i1==i3 or i2==i3:             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":528
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)
 */
        /*else*/ {
        }

        /* "pyqcstrc/icosah/mics.pyx":523
 *         for i2 in range(i1+1,len(surface)):
 *             counter1=0
 *             for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                 if i1==i3 or i2==i3:
 *                     counter1+=1
 */
      }
      __pyx_L9_break:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":529
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)
 *                 if verbose>1:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":530
 *                     pass
 *             if counter1==0:
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('         %3d %3d %3d'%(i1,i2,flag))
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __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, 530, __pyx_L1_error)
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __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, 530, __pyx_L1_error)
        __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_coplanar_check_two_triangles(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), (__pyx_v_verbose - 1));
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/mics.pyx":531
 *             if counter1==0:
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('         %3d %3d %3d'%(i1,i2,flag))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":532
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)
 *                 if verbose>1:
 *                     print('         %3d %3d %3d'%(i1,i2,flag))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_16 = 0;
          __pyx_t_19 = 127;
          __Pyx_INCREF(__pyx_kp_u__40);
          __pyx_t_16 += 9;
          __Pyx_GIVEREF(__pyx_kp_u__40);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__40);
          __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 3, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__17);
          __pyx_t_16 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__17);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__17);
          __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 3, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__17);
          __pyx_t_16 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__17);
          PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__17);
          __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_flag, 3, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 6, __pyx_t_16, __pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __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, 532, __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/mics.pyx":531
 *             if counter1==0:
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('         %3d %3d %3d'%(i1,i2,flag))
 *                 else:
 */
          goto __pyx_L14;
        }

        /* "pyqcstrc/icosah/mics.pyx":534
 *                     print('         %3d %3d %3d'%(i1,i2,flag))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if flag==1: # coplanar
 *                     if len(list_1)==0:
 */
        /*else*/ {
        }
        __pyx_L14:;

        /* "pyqcstrc/icosah/mics.pyx":535
 *                 else:
 *                     pass
 *                 if flag==1: # coplanar             # <<<<<<<<<<<<<<
 *                     if len(list_1)==0:
 *                         list_1.append(i1)
 */
        __pyx_t_1 = ((__pyx_v_flag == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":536
 *                     pass
 *                 if flag==1: # coplanar
 *                     if len(list_1)==0:             # <<<<<<<<<<<<<<
 *                         list_1.append(i1)
 *                     else:
 */
          __pyx_t_16 = PyList_GET_SIZE(__pyx_v_list_1); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 536, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_t_16 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":537
 *                 if flag==1: # coplanar
 *                     if len(list_1)==0:
 *                         list_1.append(i1)             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_list_1, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 537, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "pyqcstrc/icosah/mics.pyx":536
 *                     pass
 *                 if flag==1: # coplanar
 *                     if len(list_1)==0:             # <<<<<<<<<<<<<<
 *                         list_1.append(i1)
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyqcstrc/icosah/mics.pyx":539
 *                         list_1.append(i1)
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     skip_list.append(i2)
 *                     list_1.append(i2)
 */
          /*else*/ {
          }
          __pyx_L16:;

          /* "pyqcstrc/icosah/mics.pyx":540
 *                     else:
 *                         pass
 *                     skip_list.append(i2)             # <<<<<<<<<<<<<<
 *                     list_1.append(i2)
 *                 counter2+=1
 */
          __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 540, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":541
 *                         pass
 *                     skip_list.append(i2)
 *                     list_1.append(i2)             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *         if counter2!=0:
 */
          __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_list_1, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 541, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":535
 *                 else:
 *                     pass
 *                 if flag==1: # coplanar             # <<<<<<<<<<<<<<
 *                     if len(list_1)==0:
 *                         list_1.append(i1)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":542
 *                     skip_list.append(i2)
 *                     list_1.append(i2)
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *         if counter2!=0:
 *             if len(list_1)!=0:
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);

        /* "pyqcstrc/icosah/mics.pyx":529
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 flag=coplanar_check_two_triangles(surface[i1],surface[i2],verbose-1)
 *                 if verbose>1:
 */
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":543
 *                     list_1.append(i2)
 *                 counter2+=1
 *         if counter2!=0:             # <<<<<<<<<<<<<<
 *             if len(list_1)!=0:
 *                 list_0.append(list_1)
 */
    __pyx_t_1 = ((__pyx_v_counter2 != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":544
 *                 counter2+=1
 *         if counter2!=0:
 *             if len(list_1)!=0:             # <<<<<<<<<<<<<<
 *                 list_0.append(list_1)
 *             else:
 */
      __pyx_t_14 = PyList_GET_SIZE(__pyx_v_list_1); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 544, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_14 != 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":545
 *         if counter2!=0:
 *             if len(list_1)!=0:
 *                 list_0.append(list_1)             # <<<<<<<<<<<<<<
 *             else:
 *                 list_0.append([i1])
 */
        __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_list_0, __pyx_v_list_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 545, __pyx_L1_error)

        /* "pyqcstrc/icosah/mics.pyx":544
 *                 counter2+=1
 *         if counter2!=0:
 *             if len(list_1)!=0:             # <<<<<<<<<<<<<<
 *                 list_0.append(list_1)
 *             else:
 */
        goto __pyx_L18;
      }

      /* "pyqcstrc/icosah/mics.pyx":547
 *                 list_0.append(list_1)
 *             else:
 *                 list_0.append([i1])             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_list_0, __pyx_t_3); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 547, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L18:;

      /* "pyqcstrc/icosah/mics.pyx":543
 *                     list_1.append(i2)
 *                 counter2+=1
 *         if counter2!=0:             # <<<<<<<<<<<<<<
 *             if len(list_1)!=0:
 *                 list_0.append(list_1)
 */
      goto __pyx_L17;
    }

    /* "pyqcstrc/icosah/mics.pyx":549
 *                 list_0.append([i1])
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     # check the last triangle in 'surface'
 *     counter1=0
 */
    /*else*/ {
    }
    __pyx_L17:;
  }

  /* "pyqcstrc/icosah/mics.pyx":551
 *             pass
 *     # check the last triangle in 'surface'
 *     counter1=0             # <<<<<<<<<<<<<<
 *     for i1 in skip_list:
 *         if i1==len(surface)-1:
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":552
 *     # check the last triangle in 'surface'
 *     counter1=0
 *     for i1 in skip_list:             # <<<<<<<<<<<<<<
 *         if i1==len(surface)-1:
 *             counter1+=1
 */
  __pyx_t_3 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 552, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_i1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":553
 *     counter1=0
 *     for i1 in skip_list:
 *         if i1==len(surface)-1:             # <<<<<<<<<<<<<<
 *             counter1+=1
 *             break
 */
    __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_surface)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 553, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_v_i1 == (__pyx_t_6 - 1)) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":554
 *     for i1 in skip_list:
 *         if i1==len(surface)-1:
 *             counter1+=1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/mics.pyx":555
 *         if i1==len(surface)-1:
 *             counter1+=1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      goto __pyx_L20_break;

      /* "pyqcstrc/icosah/mics.pyx":553
 *     counter1=0
 *     for i1 in skip_list:
 *         if i1==len(surface)-1:             # <<<<<<<<<<<<<<
 *             counter1+=1
 *             break
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":557
 *             break
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if counter1==0:
 *         list_0.append([len(surface)-1])
 */
    /*else*/ {
    }

    /* "pyqcstrc/icosah/mics.pyx":552
 *     # check the last triangle in 'surface'
 *     counter1=0
 *     for i1 in skip_list:             # <<<<<<<<<<<<<<
 *         if i1==len(surface)-1:
 *             counter1+=1
 */
  }
  __pyx_L20_break:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":558
 *         else:
 *             pass
 *     if counter1==0:             # <<<<<<<<<<<<<<
 *         list_0.append([len(surface)-1])
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":559
 *             pass
 *     if counter1==0:
 *         list_0.append([len(surface)-1])             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_surface)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 559, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_7 - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_list_0, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":558
 *         else:
 *             pass
 *     if counter1==0:             # <<<<<<<<<<<<<<
 *         list_0.append([len(surface)-1])
 *     else:
 */
    goto __pyx_L22;
  }

  /* "pyqcstrc/icosah/mics.pyx":561
 *         list_0.append([len(surface)-1])
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  /*else*/ {
  }
  __pyx_L22:;

  /* "pyqcstrc/icosah/mics.pyx":563
 *         pass
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        number of set of coplanar triangles, %d'%(len(list_0)))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":564
 * 
 *     if verbose>0:
 *         print('        number of set of coplanar triangles, %d'%(len(list_0)))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_7 = PyList_GET_SIZE(__pyx_v_list_0); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 564, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_number_of_set_of_coplanar_trian, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __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, 564, __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/mics.pyx":563
 *         pass
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        number of set of coplanar triangles, %d'%(len(list_0)))
 *     else:
 */
    goto __pyx_L23;
  }

  /* "pyqcstrc/icosah/mics.pyx":566
 *         print('        number of set of coplanar triangles, %d'%(len(list_0)))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1d=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L23:;

  /* "pyqcstrc/icosah/mics.pyx":568
 *         pass
 * 
 *     tmp1d=np.array([0])             # <<<<<<<<<<<<<<
 *     for i1 in range(len(list_0)):
 *         tmp1a=np.array([0])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __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, 568, __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, 568, __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 = 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_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __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_4)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 568, __pyx_L1_error)
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.diminfo[0].strides = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1d.diminfo[0].shape = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 568, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_tmp1d = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "pyqcstrc/icosah/mics.pyx":569
 * 
 *     tmp1d=np.array([0])
 *     for i1 in range(len(list_0)):             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         tmp1c=np.array([0])
 */
  __pyx_t_7 = PyList_GET_SIZE(__pyx_v_list_0); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 569, __pyx_L1_error)
  __pyx_t_6 = __pyx_t_7;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_6; __pyx_t_8+=1) {
    __pyx_v_i1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":570
 *     tmp1d=np.array([0])
 *     for i1 in range(len(list_0)):
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1c=np.array([0])
 *         tmp1e=np.array([0])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __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, 570, __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, 570, __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 = 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_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, 570, __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, 570, __pyx_L1_error)
    __pyx_t_9 = ((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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 570, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":571
 *     for i1 in range(len(list_0)):
 *         tmp1a=np.array([0])
 *         tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1e=np.array([0])
 *         if verbose>0:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __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, 571, __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, 571, __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 = 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_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __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_4)) __PYX_ERR(0, 571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 571, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_10 < 0)) __PYX_ERR(0, 571, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":572
 *         tmp1a=np.array([0])
 *         tmp1c=np.array([0])
 *         tmp1e=np.array([0])             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('          %d-th set of triangles'%(i1))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __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, 572, __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, 572, __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 = 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_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, 572, __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, 572, __pyx_L1_error)
    __pyx_t_9 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 572, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":573
 *         tmp1c=np.array([0])
 *         tmp1e=np.array([0])
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('          %d-th set of triangles'%(i1))
 *             print('            number of trianges, %d'%(len(list_0[i1])))
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":574
 *         tmp1e=np.array([0])
 *         if verbose>0:
 *             print('          %d-th set of triangles'%(i1))             # <<<<<<<<<<<<<<
 *             print('            number of trianges, %d'%(len(list_0[i1])))
 *             #print '            ',list_0[i1]
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_d_th_set_of_triangles, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __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, 574, __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/mics.pyx":575
 *         if verbose>0:
 *             print('          %d-th set of triangles'%(i1))
 *             print('            number of trianges, %d'%(len(list_0[i1])))             # <<<<<<<<<<<<<<
 *             #print '            ',list_0[i1]
 *         for i2 in list_0[i1]:
 */
      __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_list_0, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_number_of_trianges_d, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __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, 575, __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/mics.pyx":573
 *         tmp1c=np.array([0])
 *         tmp1e=np.array([0])
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('          %d-th set of triangles'%(i1))
 *             print('            number of trianges, %d'%(len(list_0[i1])))
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":577
 *             print('            number of trianges, %d'%(len(list_0[i1])))
 *             #print '            ',list_0[i1]
 *         for i2 in list_0[i1]:             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 tmp1a=surface[i2].reshape(54) #3*6*3
 */
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_list_0, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
      __pyx_t_21 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_21 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 577, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_21)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 577, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 577, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_21(__pyx_t_3);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 577, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_i2 = __pyx_t_10;

      /* "pyqcstrc/icosah/mics.pyx":578
 *             #print '            ',list_0[i1]
 *         for i2 in list_0[i1]:
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=surface[i2].reshape(54) #3*6*3
 *             else:
 */
      __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_15 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":579
 *         for i2 in list_0[i1]:
 *             if len(tmp1a)==1:
 *                 tmp1a=surface[i2].reshape(54) #3*6*3             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,surface[i2])
 */
        __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __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_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_int_54) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_54);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __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, 579, __pyx_L1_error)
        __pyx_t_9 = ((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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 579, __pyx_L1_error)
        }
        __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/mics.pyx":578
 *             #print '            ',list_0[i1]
 *         for i2 in list_0[i1]:
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=surface[i2].reshape(54) #3*6*3
 *             else:
 */
        goto __pyx_L29;
      }

      /* "pyqcstrc/icosah/mics.pyx":581
 *                 tmp1a=surface[i2].reshape(54) #3*6*3
 *             else:
 *                 tmp1a=np.append(tmp1a,surface[i2])             # <<<<<<<<<<<<<<
 * 
 *         #A
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_22 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_22)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_22);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_22, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 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[3] = {__pyx_t_22, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_23 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_23);
          if (__pyx_t_22) {
            __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_23, 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_23, 0+__pyx_t_10, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_10, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_23, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 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, 581, __pyx_L1_error)
        __pyx_t_9 = ((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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 581, __pyx_L1_error)
        }
        __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;
      }
      __pyx_L29:;

      /* "pyqcstrc/icosah/mics.pyx":577
 *             print('            number of trianges, %d'%(len(list_0[i1])))
 *             #print '            ',list_0[i1]
 *         for i2 in list_0[i1]:             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 tmp1a=surface[i2].reshape(54) #3*6*3
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":584
 * 
 *         #A
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/54),3,6,3) # set of triangles             # <<<<<<<<<<<<<<
 *         if len(list_0[i1])!=1:
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 584, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 54.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_23 = NULL;
    __pyx_t_10 = 0;
    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_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_23, __pyx_t_5, __pyx_int_3, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __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[5] = {__pyx_t_23, __pyx_t_5, __pyx_int_3, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_23) {
        __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_23); __pyx_t_23 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_10, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_10, __pyx_int_3);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_10, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_10, __pyx_int_3);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 584, __pyx_L1_error)
    __pyx_t_24 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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_10 < 0)) __PYX_ERR(0, 584, __pyx_L1_error)
    }
    __pyx_t_24 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":585
 *         #A
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/54),3,6,3) # set of triangles
 *         if len(list_0[i1])!=1:             # <<<<<<<<<<<<<<
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)
 *             if verbose>0:
 */
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_list_0, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_14 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = ((__pyx_t_14 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":586
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/54),3,6,3) # set of triangles
 *         if len(list_0[i1])!=1:
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('            number of edges, %d'%(len(tmp4b)))
 */
      __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_triangles_to_edges(((PyArrayObject *)__pyx_v_tmp4a), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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_10 < 0)) __PYX_ERR(0, 586, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":587
 *         if len(list_0[i1])!=1:
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('            number of edges, %d'%(len(tmp4b)))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":588
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)
 *             if verbose>0:
 *                 print('            number of edges, %d'%(len(tmp4b)))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 588, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_number_of_edges_d, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __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, 588, __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/mics.pyx":587
 *         if len(list_0[i1])!=1:
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('            number of edges, %d'%(len(tmp4b)))
 *             else:
 */
        goto __pyx_L31;
      }

      /* "pyqcstrc/icosah/mics.pyx":590
 *                 print('            number of edges, %d'%(len(tmp4b)))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             for i2 in range(len(tmp4a)):
 *                 for i3 in range(len(combination)):
 */
      /*else*/ {
      }
      __pyx_L31:;

      /* "pyqcstrc/icosah/mics.pyx":591
 *             else:
 *                 pass
 *             for i2 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                 for i3 in range(len(combination)):
 *                     j1=combination[i3][0]
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 591, __pyx_L1_error)
      __pyx_t_15 = __pyx_t_14;
      for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_15; __pyx_t_10+=1) {
        __pyx_v_i2 = __pyx_t_10;

        /* "pyqcstrc/icosah/mics.pyx":592
 *                 pass
 *             for i2 in range(len(tmp4a)):
 *                 for i3 in range(len(combination)):             # <<<<<<<<<<<<<<
 *                     j1=combination[i3][0]
 *                     j2=combination[i3][1]
 */
        __pyx_t_16 = PyList_GET_SIZE(__pyx_v_combination); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 592, __pyx_L1_error)
        __pyx_t_25 = __pyx_t_16;
        for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_25; __pyx_t_17+=1) {
          __pyx_v_i3 = __pyx_t_17;

          /* "pyqcstrc/icosah/mics.pyx":593
 *             for i2 in range(len(tmp4a)):
 *                 for i3 in range(len(combination)):
 *                     j1=combination[i3][0]             # <<<<<<<<<<<<<<
 *                     j2=combination[i3][1]
 *                     tmp1a=np.append(tmp4a[i2][j1],tmp4a[i2][j2])
 */
          __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_combination, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_j1, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":594
 *                 for i3 in range(len(combination)):
 *                     j1=combination[i3][0]
 *                     j2=combination[i3][1]             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp4a[i2][j1],tmp4a[i2][j2])
 *                     tmp3a=tmp1a.reshape(2,6,3)
 */
          __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_combination, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF_SET(__pyx_v_j2, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":595
 *                     j1=combination[i3][0]
 *                     j2=combination[i3][1]
 *                     tmp1a=np.append(tmp4a[i2][j1],tmp4a[i2][j2])             # <<<<<<<<<<<<<<
 *                     tmp3a=tmp1a.reshape(2,6,3)
 *                     counter1=0
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __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, 595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_j1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_23 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_j2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_23);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          __pyx_t_26 = 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_26 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_5, __pyx_t_23};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_26, 2+__pyx_t_26); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __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_4, __pyx_t_5, __pyx_t_23};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_26, 2+__pyx_t_26); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
          } else
          #endif
          {
            __pyx_t_22 = PyTuple_New(2+__pyx_t_26); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 595, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_22);
            if (__pyx_t_4) {
              __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4); __pyx_t_4 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_26, __pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_23);
            PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_26, __pyx_t_23);
            __pyx_t_5 = 0;
            __pyx_t_23 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 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, 595, __pyx_L1_error)
          __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_26 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_26 < 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_4mics_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_26 < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
          }
          __pyx_t_9 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":596
 *                     j2=combination[i3][1]
 *                     tmp1a=np.append(tmp4a[i2][j1],tmp4a[i2][j2])
 *                     tmp3a=tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     for i4 in range(len(tmp4b)):
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __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, 596, __pyx_L1_error)
          __pyx_t_27 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
            __pyx_t_26 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_27, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
            if (unlikely(__pyx_t_26 < 0)) {
              PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_26 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
          }
          __pyx_t_27 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":597
 *                     tmp1a=np.append(tmp4a[i2][j1],tmp4a[i2][j2])
 *                     tmp3a=tmp1a.reshape(2,6,3)
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     for i4 in range(len(tmp4b)):
 *                         flag=check_two_edges(tmp3a,tmp4b[i4],verbose-1)
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":598
 *                     tmp3a=tmp1a.reshape(2,6,3)
 *                     counter1=0
 *                     for i4 in range(len(tmp4b)):             # <<<<<<<<<<<<<<
 *                         flag=check_two_edges(tmp3a,tmp4b[i4],verbose-1)
 *                         if flag==0: # equivalent
 */
          __pyx_t_28 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 598, __pyx_L1_error)
          __pyx_t_29 = __pyx_t_28;
          for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_29; __pyx_t_26+=1) {
            __pyx_v_i4 = __pyx_t_26;

            /* "pyqcstrc/icosah/mics.pyx":599
 *                     counter1=0
 *                     for i4 in range(len(tmp4b)):
 *                         flag=check_two_edges(tmp3a,tmp4b[i4],verbose-1)             # <<<<<<<<<<<<<<
 *                         if flag==0: # equivalent
 *                             counter1+=1
 */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4b), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __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, 599, __pyx_L1_error)
            __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_check_two_edges(((PyArrayObject *)__pyx_v_tmp3a), ((PyArrayObject *)__pyx_t_2), (__pyx_v_verbose - 1));
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":600
 *                     for i4 in range(len(tmp4b)):
 *                         flag=check_two_edges(tmp3a,tmp4b[i4],verbose-1)
 *                         if flag==0: # equivalent             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":601
 *                         flag=check_two_edges(tmp3a,tmp4b[i4],verbose-1)
 *                         if flag==0: # equivalent
 *                             counter1+=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_v_counter1 = (__pyx_v_counter1 + 1);

              /* "pyqcstrc/icosah/mics.pyx":600
 *                     for i4 in range(len(tmp4b)):
 *                         flag=check_two_edges(tmp3a,tmp4b[i4],verbose-1)
 *                         if flag==0: # equivalent             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                         else:
 */
              goto __pyx_L38;
            }

            /* "pyqcstrc/icosah/mics.pyx":603
 *                             counter1+=1
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                         if counter1==2:
 *                             break
 */
            /*else*/ {
            }
            __pyx_L38:;

            /* "pyqcstrc/icosah/mics.pyx":604
 *                         else:
 *                             pass
 *                         if counter1==2:             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_counter1 == 2) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":605
 *                             pass
 *                         if counter1==2:
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L37_break;

              /* "pyqcstrc/icosah/mics.pyx":604
 *                         else:
 *                             pass
 *                         if counter1==2:             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":607
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter1==1:
 *                         if len(tmp1c)==1:
 */
            /*else*/ {
            }
          }
          __pyx_L37_break:;

          /* "pyqcstrc/icosah/mics.pyx":608
 *                         else:
 *                             pass
 *                     if counter1==1:             # <<<<<<<<<<<<<<
 *                         if len(tmp1c)==1:
 *                             tmp1c=tmp1a
 */
          __pyx_t_1 = ((__pyx_v_counter1 == 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":609
 *                             pass
 *                     if counter1==1:
 *                         if len(tmp1c)==1:             # <<<<<<<<<<<<<<
 *                             tmp1c=tmp1a
 *                         else:
 */
            __pyx_t_28 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 609, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_28 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":610
 *                     if counter1==1:
 *                         if len(tmp1c)==1:
 *                             tmp1c=tmp1a             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1c=np.append(tmp1c,tmp1a)
 */
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
                __pyx_t_26 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_26 < 0)) {
                  PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_26 < 0)) __PYX_ERR(0, 610, __pyx_L1_error)
              }
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
              __Pyx_DECREF_SET(__pyx_v_tmp1c, __pyx_v_tmp1a);

              /* "pyqcstrc/icosah/mics.pyx":609
 *                             pass
 *                     if counter1==1:
 *                         if len(tmp1c)==1:             # <<<<<<<<<<<<<<
 *                             tmp1c=tmp1a
 *                         else:
 */
              goto __pyx_L41;
            }

            /* "pyqcstrc/icosah/mics.pyx":612
 *                             tmp1c=tmp1a
 *                         else:
 *                             tmp1c=np.append(tmp1c,tmp1a)             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 612, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_22);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_26 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_22);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_22, function);
                  __pyx_t_26 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_22)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp1a)};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_26, 2+__pyx_t_26); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp1a)};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_26, 2+__pyx_t_26); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              {
                __pyx_t_23 = PyTuple_New(2+__pyx_t_26); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 612, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_23, 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_23, 0+__pyx_t_26, ((PyObject *)__pyx_v_tmp1c));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_26, ((PyObject *)__pyx_v_tmp1a));
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
              }
              __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
              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_9 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
                __pyx_t_26 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_26 < 0)) {
                  PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_26 < 0)) __PYX_ERR(0, 612, __pyx_L1_error)
              }
              __pyx_t_9 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L41:;

            /* "pyqcstrc/icosah/mics.pyx":608
 *                         else:
 *                             pass
 *                     if counter1==1:             # <<<<<<<<<<<<<<
 *                         if len(tmp1c)==1:
 *                             tmp1c=tmp1a
 */
            goto __pyx_L40;
          }

          /* "pyqcstrc/icosah/mics.pyx":614
 *                             tmp1c=np.append(tmp1c,tmp1a)
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('            number of independent edges, %d'%(int(len(tmp1c)/36)))
 */
          /*else*/ {
          }
          __pyx_L40:;
        }
      }

      /* "pyqcstrc/icosah/mics.pyx":615
 *                     else:
 *                         pass
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('            number of independent edges, %d'%(int(len(tmp1c)/36)))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":616
 *                         pass
 *             if verbose>0:
 *                 print('            number of independent edges, %d'%(int(len(tmp1c)/36)))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 616, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 36.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_22 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_number_of_independent_edges_d, __pyx_t_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_22);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_22); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":615
 *                     else:
 *                         pass
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('            number of independent edges, %d'%(int(len(tmp1c)/36)))
 *             else:
 */
        goto __pyx_L42;
      }

      /* "pyqcstrc/icosah/mics.pyx":618
 *                 print('            number of independent edges, %d'%(int(len(tmp1c)/36)))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             #
 *             if len(tmp1c)!=1:
 */
      /*else*/ {
      }
      __pyx_L42:;

      /* "pyqcstrc/icosah/mics.pyx":620
 *                 pass
 *             #
 *             if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *                 tmp4c=tmp1c.reshape(int(len(tmp1c)/36),2,6,3)
 *                 for i0 in range(num_cycle):
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 620, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_14 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":621
 *             #
 *             if len(tmp1c)!=1:
 *                 tmp4c=tmp1c.reshape(int(len(tmp1c)/36),2,6,3)             # <<<<<<<<<<<<<<
 *                 for i0 in range(num_cycle):
 *                     tmp1e=np.array([0])
 */
        __pyx_t_22 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_22);
        __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 621, __pyx_L1_error)
        __pyx_t_23 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 36.0)); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_3 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_22))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_22);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_22, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_22)) {
          PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_23, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_22)) {
          PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_23, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_22, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __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_GIVEREF(__pyx_t_23);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_t_23);
          __Pyx_INCREF(__pyx_int_2);
          __Pyx_GIVEREF(__pyx_int_2);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_int_2);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_10, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_10, __pyx_int_3);
          __pyx_t_23 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 621, __pyx_L1_error)
        __pyx_t_24 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
          __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 621, __pyx_L1_error)
        }
        __pyx_t_24 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":622
 *             if len(tmp1c)!=1:
 *                 tmp4c=tmp1c.reshape(int(len(tmp1c)/36),2,6,3)
 *                 for i0 in range(num_cycle):             # <<<<<<<<<<<<<<
 *                     tmp1e=np.array([0])
 *                     skip_list=[-1]
 */
        __pyx_t_10 = __pyx_v_num_cycle;
        __pyx_t_17 = __pyx_t_10;
        for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_17; __pyx_t_26+=1) {
          __pyx_v_i0 = __pyx_t_26;

          /* "pyqcstrc/icosah/mics.pyx":623
 *                 tmp4c=tmp1c.reshape(int(len(tmp1c)/36),2,6,3)
 *                 for i0 in range(num_cycle):
 *                     tmp1e=np.array([0])             # <<<<<<<<<<<<<<
 *                     skip_list=[-1]
 *                     for i2 in range(len(tmp4c)-1):
 */
          __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_np); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 623, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_22);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
          __pyx_t_22 = PyList_New(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 623, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_22);
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_GIVEREF(__pyx_int_0);
          PyList_SET_ITEM(__pyx_t_22, 0, __pyx_int_0);
          __pyx_t_23 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_23)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_23);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          __pyx_t_2 = (__pyx_t_23) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_23, __pyx_t_22) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_22);
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __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, 623, __pyx_L1_error)
          __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
            __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_30 < 0)) {
              PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 623, __pyx_L1_error)
          }
          __pyx_t_9 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":624
 *                 for i0 in range(num_cycle):
 *                     tmp1e=np.array([0])
 *                     skip_list=[-1]             # <<<<<<<<<<<<<<
 *                     for i2 in range(len(tmp4c)-1):
 *                         for i3 in range(i2+1,len(tmp4c)):
 */
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_int_neg_1);
          __Pyx_GIVEREF(__pyx_int_neg_1);
          PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
          __Pyx_DECREF_SET(__pyx_v_skip_list, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":625
 *                     tmp1e=np.array([0])
 *                     skip_list=[-1]
 *                     for i2 in range(len(tmp4c)-1):             # <<<<<<<<<<<<<<
 *                         for i3 in range(i2+1,len(tmp4c)):
 *                             counter1=0
 */
          __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 625, __pyx_L1_error)
          __pyx_t_15 = (__pyx_t_14 - 1);
          __pyx_t_14 = __pyx_t_15;
          for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_14; __pyx_t_30+=1) {
            __pyx_v_i2 = __pyx_t_30;

            /* "pyqcstrc/icosah/mics.pyx":626
 *                     skip_list=[-1]
 *                     for i2 in range(len(tmp4c)-1):
 *                         for i3 in range(i2+1,len(tmp4c)):             # <<<<<<<<<<<<<<
 *                             counter1=0
 *                             for i4 in skip_list:
 */
            __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 626, __pyx_L1_error)
            __pyx_t_25 = __pyx_t_16;
            for (__pyx_t_31 = (__pyx_v_i2 + 1); __pyx_t_31 < __pyx_t_25; __pyx_t_31+=1) {
              __pyx_v_i3 = __pyx_t_31;

              /* "pyqcstrc/icosah/mics.pyx":627
 *                     for i2 in range(len(tmp4c)-1):
 *                         for i3 in range(i2+1,len(tmp4c)):
 *                             counter1=0             # <<<<<<<<<<<<<<
 *                             for i4 in skip_list:
 *                                 if i2==i4 or i3==i4:
 */
              __pyx_v_counter1 = 0;

              /* "pyqcstrc/icosah/mics.pyx":628
 *                         for i3 in range(i2+1,len(tmp4c)):
 *                             counter1=0
 *                             for i4 in skip_list:             # <<<<<<<<<<<<<<
 *                                 if i2==i4 or i3==i4:
 *                                     counter1+=1
 */
              __pyx_t_2 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_2); __pyx_t_28 = 0;
              for (;;) {
                if (__pyx_t_28 >= PyList_GET_SIZE(__pyx_t_2)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_28); __Pyx_INCREF(__pyx_t_5); __pyx_t_28++; if (unlikely(0 < 0)) __PYX_ERR(0, 628, __pyx_L1_error)
                #else
                __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_28); __pyx_t_28++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                #endif
                __pyx_t_32 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_32 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 628, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_v_i4 = __pyx_t_32;

                /* "pyqcstrc/icosah/mics.pyx":629
 *                             counter1=0
 *                             for i4 in skip_list:
 *                                 if i2==i4 or i3==i4:             # <<<<<<<<<<<<<<
 *                                     counter1+=1
 *                                     break
 */
                __pyx_t_18 = ((__pyx_v_i2 == __pyx_v_i4) != 0);
                if (!__pyx_t_18) {
                } else {
                  __pyx_t_1 = __pyx_t_18;
                  goto __pyx_L53_bool_binop_done;
                }
                __pyx_t_18 = ((__pyx_v_i3 == __pyx_v_i4) != 0);
                __pyx_t_1 = __pyx_t_18;
                __pyx_L53_bool_binop_done:;
                if (__pyx_t_1) {

                  /* "pyqcstrc/icosah/mics.pyx":630
 *                             for i4 in skip_list:
 *                                 if i2==i4 or i3==i4:
 *                                     counter1+=1             # <<<<<<<<<<<<<<
 *                                     break
 *                                 else:
 */
                  __pyx_v_counter1 = (__pyx_v_counter1 + 1);

                  /* "pyqcstrc/icosah/mics.pyx":631
 *                                 if i2==i4 or i3==i4:
 *                                     counter1+=1
 *                                     break             # <<<<<<<<<<<<<<
 *                                 else:
 *                                     pass
 */
                  goto __pyx_L51_break;

                  /* "pyqcstrc/icosah/mics.pyx":629
 *                             counter1=0
 *                             for i4 in skip_list:
 *                                 if i2==i4 or i3==i4:             # <<<<<<<<<<<<<<
 *                                     counter1+=1
 *                                     break
 */
                }

                /* "pyqcstrc/icosah/mics.pyx":633
 *                                     break
 *                                 else:
 *                                     pass             # <<<<<<<<<<<<<<
 *                             if counter1==0:
 *                                 tmp3a=two_segment_into_one(tmp4c[i2],tmp4c[i3],verbose-1)
 */
                /*else*/ {
                }

                /* "pyqcstrc/icosah/mics.pyx":628
 *                         for i3 in range(i2+1,len(tmp4c)):
 *                             counter1=0
 *                             for i4 in skip_list:             # <<<<<<<<<<<<<<
 *                                 if i2==i4 or i3==i4:
 *                                     counter1+=1
 */
              }
              __pyx_L51_break:;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":634
 *                                 else:
 *                                     pass
 *                             if counter1==0:             # <<<<<<<<<<<<<<
 *                                 tmp3a=two_segment_into_one(tmp4c[i2],tmp4c[i3],verbose-1)
 *                                 #tmp3a=merge_two_edges(tmp4c[i2],tmp4c[i3],verbose)
 */
              __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":635
 *                                     pass
 *                             if counter1==0:
 *                                 tmp3a=two_segment_into_one(tmp4c[i2],tmp4c[i3],verbose-1)             # <<<<<<<<<<<<<<
 *                                 #tmp3a=merge_two_edges(tmp4c[i2],tmp4c[i3],verbose)
 *                                 if len(tmp3a)!=1:
 */
                __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __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, 635, __pyx_L1_error)
                __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 635, __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, 635, __pyx_L1_error)
                __pyx_t_22 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 635, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
                  __pyx_t_32 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_22), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
                  if (unlikely(__pyx_t_32 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_32 < 0)) __PYX_ERR(0, 635, __pyx_L1_error)
                }
                __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_22));
                __pyx_t_22 = 0;

                /* "pyqcstrc/icosah/mics.pyx":637
 *                                 tmp3a=two_segment_into_one(tmp4c[i2],tmp4c[i3],verbose-1)
 *                                 #tmp3a=merge_two_edges(tmp4c[i2],tmp4c[i3],verbose)
 *                                 if len(tmp3a)!=1:             # <<<<<<<<<<<<<<
 *                                     #if len(skip_list)==1:
 *                                     #    skip_list.append(i2)
 */
                __pyx_t_28 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 637, __pyx_L1_error)
                __pyx_t_1 = ((__pyx_t_28 != 1) != 0);
                if (__pyx_t_1) {

                  /* "pyqcstrc/icosah/mics.pyx":642
 *                                     #else:
 *                                     #    pass
 *                                     skip_list.append(i2)             # <<<<<<<<<<<<<<
 *                                     skip_list.append(i3)
 *                                     if len(tmp1e)==1:
 */
                  __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 642, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_22);
                  __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_22); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 642, __pyx_L1_error)
                  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

                  /* "pyqcstrc/icosah/mics.pyx":643
 *                                     #    pass
 *                                     skip_list.append(i2)
 *                                     skip_list.append(i3)             # <<<<<<<<<<<<<<
 *                                     if len(tmp1e)==1:
 *                                         tmp1e=np.append(tmp3a[0],tmp3a[1])
 */
                  __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_i3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 643, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_22);
                  __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_22); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 643, __pyx_L1_error)
                  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

                  /* "pyqcstrc/icosah/mics.pyx":644
 *                                     skip_list.append(i2)
 *                                     skip_list.append(i3)
 *                                     if len(tmp1e)==1:             # <<<<<<<<<<<<<<
 *                                         tmp1e=np.append(tmp3a[0],tmp3a[1])
 *                                     else:
 */
                  __pyx_t_28 = PyObject_Length(((PyObject *)__pyx_v_tmp1e)); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 644, __pyx_L1_error)
                  __pyx_t_1 = ((__pyx_t_28 == 1) != 0);
                  if (__pyx_t_1) {

                    /* "pyqcstrc/icosah/mics.pyx":645
 *                                     skip_list.append(i3)
 *                                     if len(tmp1e)==1:
 *                                         tmp1e=np.append(tmp3a[0],tmp3a[1])             # <<<<<<<<<<<<<<
 *                                     else:
 *                                         tmp1e=np.append(tmp1e,tmp3a[0])
 */
                    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __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, 645, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                    __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_5);
                    __pyx_t_23 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 645, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_23);
                    __pyx_t_3 = NULL;
                    __pyx_t_32 = 0;
                    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
                      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                      if (likely(__pyx_t_3)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                        __Pyx_INCREF(__pyx_t_3);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_2, function);
                        __pyx_t_32 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_2)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_23};
                      __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_32, 2+__pyx_t_32); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 645, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __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_3, __pyx_t_5, __pyx_t_23};
                      __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_32, 2+__pyx_t_32); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 645, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_4 = PyTuple_New(2+__pyx_t_32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_4);
                      if (__pyx_t_3) {
                        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
                      }
                      __Pyx_GIVEREF(__pyx_t_5);
                      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_32, __pyx_t_5);
                      __Pyx_GIVEREF(__pyx_t_23);
                      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_32, __pyx_t_23);
                      __pyx_t_5 = 0;
                      __pyx_t_23 = 0;
                      __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 645, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 645, __pyx_L1_error)
                    __pyx_t_9 = ((PyArrayObject *)__pyx_t_22);
                    {
                      __Pyx_BufFmt_StackElem __pyx_stack[1];
                      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
                      __pyx_t_32 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                      if (unlikely(__pyx_t_32 < 0)) {
                        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
                        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
                      if (unlikely(__pyx_t_32 < 0)) __PYX_ERR(0, 645, __pyx_L1_error)
                    }
                    __pyx_t_9 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_22));
                    __pyx_t_22 = 0;

                    /* "pyqcstrc/icosah/mics.pyx":644
 *                                     skip_list.append(i2)
 *                                     skip_list.append(i3)
 *                                     if len(tmp1e)==1:             # <<<<<<<<<<<<<<
 *                                         tmp1e=np.append(tmp3a[0],tmp3a[1])
 *                                     else:
 */
                    goto __pyx_L57;
                  }

                  /* "pyqcstrc/icosah/mics.pyx":647
 *                                         tmp1e=np.append(tmp3a[0],tmp3a[1])
 *                                     else:
 *                                         tmp1e=np.append(tmp1e,tmp3a[0])             # <<<<<<<<<<<<<<
 *                                         tmp1e=np.append(tmp1e,tmp3a[1])
 *                                     break
 */
                  /*else*/ {
                    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __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, 647, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __pyx_t_23 = NULL;
                    __pyx_t_32 = 0;
                    if (CYTHON_UNPACK_METHODS && unlikely(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_32 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_4)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_23, ((PyObject *)__pyx_v_tmp1e), __pyx_t_2};
                      __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_32, 2+__pyx_t_32); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 647, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_23, ((PyObject *)__pyx_v_tmp1e), __pyx_t_2};
                      __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_32, 2+__pyx_t_32); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 647, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_5 = PyTuple_New(2+__pyx_t_32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_5);
                      if (__pyx_t_23) {
                        __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_23); __pyx_t_23 = NULL;
                      }
                      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1e));
                      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1e));
                      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_32, ((PyObject *)__pyx_v_tmp1e));
                      __Pyx_GIVEREF(__pyx_t_2);
                      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_32, __pyx_t_2);
                      __pyx_t_2 = 0;
                      __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 647, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 647, __pyx_L1_error)
                    __pyx_t_9 = ((PyArrayObject *)__pyx_t_22);
                    {
                      __Pyx_BufFmt_StackElem __pyx_stack[1];
                      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
                      __pyx_t_32 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                      if (unlikely(__pyx_t_32 < 0)) {
                        PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
                        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
                      if (unlikely(__pyx_t_32 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
                    }
                    __pyx_t_9 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_22));
                    __pyx_t_22 = 0;

                    /* "pyqcstrc/icosah/mics.pyx":648
 *                                     else:
 *                                         tmp1e=np.append(tmp1e,tmp3a[0])
 *                                         tmp1e=np.append(tmp1e,tmp3a[1])             # <<<<<<<<<<<<<<
 *                                     break
 *                                 else:
 */
                    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 648, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_2 = NULL;
                    __pyx_t_32 = 0;
                    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_32 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_5)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1e), __pyx_t_4};
                      __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_32, 2+__pyx_t_32); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 648, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1e), __pyx_t_4};
                      __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_32, 2+__pyx_t_32); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 648, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_23 = PyTuple_New(2+__pyx_t_32); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 648, __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_tmp1e));
                      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1e));
                      PyTuple_SET_ITEM(__pyx_t_23, 0+__pyx_t_32, ((PyObject *)__pyx_v_tmp1e));
                      __Pyx_GIVEREF(__pyx_t_4);
                      PyTuple_SET_ITEM(__pyx_t_23, 1+__pyx_t_32, __pyx_t_4);
                      __pyx_t_4 = 0;
                      __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_23, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 648, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_22);
                      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                    if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 648, __pyx_L1_error)
                    __pyx_t_9 = ((PyArrayObject *)__pyx_t_22);
                    {
                      __Pyx_BufFmt_StackElem __pyx_stack[1];
                      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
                      __pyx_t_32 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                      if (unlikely(__pyx_t_32 < 0)) {
                        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
                        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
                      if (unlikely(__pyx_t_32 < 0)) __PYX_ERR(0, 648, __pyx_L1_error)
                    }
                    __pyx_t_9 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_22));
                    __pyx_t_22 = 0;
                  }
                  __pyx_L57:;

                  /* "pyqcstrc/icosah/mics.pyx":649
 *                                         tmp1e=np.append(tmp1e,tmp3a[0])
 *                                         tmp1e=np.append(tmp1e,tmp3a[1])
 *                                     break             # <<<<<<<<<<<<<<
 *                                 else:
 *                                     pass
 */
                  goto __pyx_L49_break;

                  /* "pyqcstrc/icosah/mics.pyx":637
 *                                 tmp3a=two_segment_into_one(tmp4c[i2],tmp4c[i3],verbose-1)
 *                                 #tmp3a=merge_two_edges(tmp4c[i2],tmp4c[i3],verbose)
 *                                 if len(tmp3a)!=1:             # <<<<<<<<<<<<<<
 *                                     #if len(skip_list)==1:
 *                                     #    skip_list.append(i2)
 */
                }

                /* "pyqcstrc/icosah/mics.pyx":651
 *                                     break
 *                                 else:
 *                                     pass             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                /*else*/ {
                }

                /* "pyqcstrc/icosah/mics.pyx":634
 *                                 else:
 *                                     pass
 *                             if counter1==0:             # <<<<<<<<<<<<<<
 *                                 tmp3a=two_segment_into_one(tmp4c[i2],tmp4c[i3],verbose-1)
 *                                 #tmp3a=merge_two_edges(tmp4c[i2],tmp4c[i3],verbose)
 */
                goto __pyx_L55;
              }

              /* "pyqcstrc/icosah/mics.pyx":653
 *                                     pass
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                     for i2 in range(len(tmp4c)):
 *                         counter1=0
 */
              /*else*/ {
              }
              __pyx_L55:;
            }
            __pyx_L49_break:;
          }

          /* "pyqcstrc/icosah/mics.pyx":654
 *                             else:
 *                                 pass
 *                     for i2 in range(len(tmp4c)):             # <<<<<<<<<<<<<<
 *                         counter1=0
 *                         for i3 in skip_list:
 */
          __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 654, __pyx_L1_error)
          __pyx_t_14 = __pyx_t_15;
          for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_14; __pyx_t_30+=1) {
            __pyx_v_i2 = __pyx_t_30;

            /* "pyqcstrc/icosah/mics.pyx":655
 *                                 pass
 *                     for i2 in range(len(tmp4c)):
 *                         counter1=0             # <<<<<<<<<<<<<<
 *                         for i3 in skip_list:
 *                             if i2==i3:
 */
            __pyx_v_counter1 = 0;

            /* "pyqcstrc/icosah/mics.pyx":656
 *                     for i2 in range(len(tmp4c)):
 *                         counter1=0
 *                         for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                             if i2==i3:
 *                                 counter1+=1
 */
            __pyx_t_22 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_22); __pyx_t_16 = 0;
            for (;;) {
              if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_22)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = PyList_GET_ITEM(__pyx_t_22, __pyx_t_16); __Pyx_INCREF(__pyx_t_5); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 656, __pyx_L1_error)
              #else
              __pyx_t_5 = PySequence_ITEM(__pyx_t_22, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 656, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              #endif
              __pyx_t_31 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_31 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_v_i3 = __pyx_t_31;

              /* "pyqcstrc/icosah/mics.pyx":657
 *                         counter1=0
 *                         for i3 in skip_list:
 *                             if i2==i3:             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 break
 */
              __pyx_t_1 = ((__pyx_v_i2 == __pyx_v_i3) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":658
 *                         for i3 in skip_list:
 *                             if i2==i3:
 *                                 counter1+=1             # <<<<<<<<<<<<<<
 *                                 break
 *                             else:
 */
                __pyx_v_counter1 = (__pyx_v_counter1 + 1);

                /* "pyqcstrc/icosah/mics.pyx":659
 *                             if i2==i3:
 *                                 counter1+=1
 *                                 break             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                goto __pyx_L61_break;

                /* "pyqcstrc/icosah/mics.pyx":657
 *                         counter1=0
 *                         for i3 in skip_list:
 *                             if i2==i3:             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 break
 */
              }

              /* "pyqcstrc/icosah/mics.pyx":661
 *                                 break
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                         if counter1==0:
 *                             if len(tmp1e)==1:
 */
              /*else*/ {
              }

              /* "pyqcstrc/icosah/mics.pyx":656
 *                     for i2 in range(len(tmp4c)):
 *                         counter1=0
 *                         for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                             if i2==i3:
 *                                 counter1+=1
 */
            }
            __pyx_L61_break:;
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

            /* "pyqcstrc/icosah/mics.pyx":662
 *                             else:
 *                                 pass
 *                         if counter1==0:             # <<<<<<<<<<<<<<
 *                             if len(tmp1e)==1:
 *                                 tmp1e=tmp4c[i2].reshape(36) # 2*6*3=36
 */
            __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":663
 *                                 pass
 *                         if counter1==0:
 *                             if len(tmp1e)==1:             # <<<<<<<<<<<<<<
 *                                 tmp1e=tmp4c[i2].reshape(36) # 2*6*3=36
 *                             else:
 */
              __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp1e)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 663, __pyx_L1_error)
              __pyx_t_1 = ((__pyx_t_16 == 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":664
 *                         if counter1==0:
 *                             if len(tmp1e)==1:
 *                                 tmp1e=tmp4c[i2].reshape(36) # 2*6*3=36             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1e=np.append(tmp1e,tmp4c[i2])
 */
                __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reshape); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 664, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_23))) {
                  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_23);
                  if (likely(__pyx_t_5)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
                    __Pyx_INCREF(__pyx_t_5);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_23, function);
                  }
                }
                __pyx_t_22 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_23, __pyx_t_5, __pyx_int_36) : __Pyx_PyObject_CallOneArg(__pyx_t_23, __pyx_int_36);
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 664, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 664, __pyx_L1_error)
                __pyx_t_9 = ((PyArrayObject *)__pyx_t_22);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
                  __pyx_t_31 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_31 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_31 < 0)) __PYX_ERR(0, 664, __pyx_L1_error)
                }
                __pyx_t_9 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_22));
                __pyx_t_22 = 0;

                /* "pyqcstrc/icosah/mics.pyx":663
 *                                 pass
 *                         if counter1==0:
 *                             if len(tmp1e)==1:             # <<<<<<<<<<<<<<
 *                                 tmp1e=tmp4c[i2].reshape(36) # 2*6*3=36
 *                             else:
 */
                goto __pyx_L64;
              }

              /* "pyqcstrc/icosah/mics.pyx":666
 *                                 tmp1e=tmp4c[i2].reshape(36) # 2*6*3=36
 *                             else:
 *                                 tmp1e=np.append(tmp1e,tmp4c[i2])             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_23, __pyx_n_s_np); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 666, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                __pyx_t_23 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 666, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_23);
                __pyx_t_4 = NULL;
                __pyx_t_31 = 0;
                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_31 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1e), __pyx_t_23};
                  __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_31, 2+__pyx_t_31); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 666, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_22);
                  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1e), __pyx_t_23};
                  __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_31, 2+__pyx_t_31); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 666, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_GOTREF(__pyx_t_22);
                  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
                } else
                #endif
                {
                  __pyx_t_2 = PyTuple_New(2+__pyx_t_31); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  if (__pyx_t_4) {
                    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp1e));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1e));
                  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_31, ((PyObject *)__pyx_v_tmp1e));
                  __Pyx_GIVEREF(__pyx_t_23);
                  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_31, __pyx_t_23);
                  __pyx_t_23 = 0;
                  __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 666, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_22);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                }
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 666, __pyx_L1_error)
                __pyx_t_9 = ((PyArrayObject *)__pyx_t_22);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
                  __pyx_t_31 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_31 < 0)) {
                    PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1e.diminfo[0].strides = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1e.diminfo[0].shape = __pyx_pybuffernd_tmp1e.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_31 < 0)) __PYX_ERR(0, 666, __pyx_L1_error)
                }
                __pyx_t_9 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1e, ((PyArrayObject *)__pyx_t_22));
                __pyx_t_22 = 0;
              }
              __pyx_L64:;

              /* "pyqcstrc/icosah/mics.pyx":662
 *                             else:
 *                                 pass
 *                         if counter1==0:             # <<<<<<<<<<<<<<
 *                             if len(tmp1e)==1:
 *                                 tmp1e=tmp4c[i2].reshape(36) # 2*6*3=36
 */
              goto __pyx_L63;
            }

            /* "pyqcstrc/icosah/mics.pyx":668
 *                                 tmp1e=np.append(tmp1e,tmp4c[i2])
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if verbose>0:
 *                         print('            %d cycle %d -> %d'%(i0,len(tmp4c),int(len(tmp1e)/36)))
 */
            /*else*/ {
            }
            __pyx_L63:;
          }

          /* "pyqcstrc/icosah/mics.pyx":669
 *                         else:
 *                             pass
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('            %d cycle %d -> %d'%(i0,len(tmp4c),int(len(tmp1e)/36)))
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":670
 *                             pass
 *                     if verbose>0:
 *                         print('            %d cycle %d -> %d'%(i0,len(tmp4c),int(len(tmp1e)/36)))             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_22 = PyTuple_New(6); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_15 = 0;
            __pyx_t_19 = 127;
            __Pyx_INCREF(__pyx_kp_u__41);
            __pyx_t_15 += 12;
            __Pyx_GIVEREF(__pyx_kp_u__41);
            PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_kp_u__41);
            __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_5);
            __pyx_t_5 = 0;
            __Pyx_INCREF(__pyx_kp_u_cycle);
            __pyx_t_15 += 7;
            __Pyx_GIVEREF(__pyx_kp_u_cycle);
            PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_kp_u_cycle);
            __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 670, __pyx_L1_error)
            __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_14, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_22, 3, __pyx_t_5);
            __pyx_t_5 = 0;
            __Pyx_INCREF(__pyx_kp_u__42);
            __pyx_t_15 += 4;
            __Pyx_GIVEREF(__pyx_kp_u__42);
            PyTuple_SET_ITEM(__pyx_t_22, 4, __pyx_kp_u__42);
            __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1e)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 670, __pyx_L1_error)
            __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 36.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_IntOrLong(__pyx_t_5), __pyx_n_u_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_19 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_19) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_19;
            __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_22, 5, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_22, 6, __pyx_t_15, __pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            __pyx_t_22 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 670, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

            /* "pyqcstrc/icosah/mics.pyx":669
 *                         else:
 *                             pass
 *                     if verbose>0:             # <<<<<<<<<<<<<<
 *                         print('            %d cycle %d -> %d'%(i0,len(tmp4c),int(len(tmp1e)/36)))
 *                     else:
 */
            goto __pyx_L65;
          }

          /* "pyqcstrc/icosah/mics.pyx":672
 *                         print('            %d cycle %d -> %d'%(i0,len(tmp4c),int(len(tmp1e)/36)))
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     if len(tmp4c)==len(tmp1e)/36:
 *                         break
 */
          /*else*/ {
          }
          __pyx_L65:;

          /* "pyqcstrc/icosah/mics.pyx":673
 *                     else:
 *                         pass
 *                     if len(tmp4c)==len(tmp1e)/36:             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
          __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 673, __pyx_L1_error)
          __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1e)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 673, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_t_15 == (((double)__pyx_t_14) / 36.0)) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":674
 *                         pass
 *                     if len(tmp4c)==len(tmp1e)/36:
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L45_break;

            /* "pyqcstrc/icosah/mics.pyx":673
 *                     else:
 *                         pass
 *                     if len(tmp4c)==len(tmp1e)/36:             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":676
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     tmp4c=tmp1e.reshape(int(len(tmp1e)/36),2,6,3)
 * 
 */
          /*else*/ {
          }

          /* "pyqcstrc/icosah/mics.pyx":677
 *                     else:
 *                         pass
 *                     tmp4c=tmp1e.reshape(int(len(tmp1e)/36),2,6,3)             # <<<<<<<<<<<<<<
 * 
 *         else: #
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1e), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1e)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 677, __pyx_L1_error)
          __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 36.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_23 = NULL;
          __pyx_t_30 = 0;
          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_30 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[5] = {__pyx_t_23, __pyx_t_5, __pyx_int_2, __pyx_int_6, __pyx_int_3};
            __pyx_t_22 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_30, 4+__pyx_t_30); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 677, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
            __Pyx_GOTREF(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[5] = {__pyx_t_23, __pyx_t_5, __pyx_int_2, __pyx_int_6, __pyx_int_3};
            __pyx_t_22 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_30, 4+__pyx_t_30); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 677, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
            __Pyx_GOTREF(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(4+__pyx_t_30); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __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_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_30, __pyx_t_5);
            __Pyx_INCREF(__pyx_int_2);
            __Pyx_GIVEREF(__pyx_int_2);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_30, __pyx_int_2);
            __Pyx_INCREF(__pyx_int_6);
            __Pyx_GIVEREF(__pyx_int_6);
            PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_30, __pyx_int_6);
            __Pyx_INCREF(__pyx_int_3);
            __Pyx_GIVEREF(__pyx_int_3);
            PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_30, __pyx_int_3);
            __pyx_t_5 = 0;
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 677, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_22) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_22, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 677, __pyx_L1_error)
          __pyx_t_24 = ((PyArrayObject *)__pyx_t_22);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
            __pyx_t_30 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_t_24, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_30 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 677, __pyx_L1_error)
          }
          __pyx_t_24 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_22));
          __pyx_t_22 = 0;
        }
        __pyx_L45_break:;

        /* "pyqcstrc/icosah/mics.pyx":620
 *                 pass
 *             #
 *             if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *                 tmp4c=tmp1c.reshape(int(len(tmp1c)/36),2,6,3)
 *                 for i0 in range(num_cycle):
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":585
 *         #A
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/54),3,6,3) # set of triangles
 *         if len(list_0[i1])!=1:             # <<<<<<<<<<<<<<
 *             tmp4b=triangles_to_edges(tmp4a,verbose-1)
 *             if verbose>0:
 */
      goto __pyx_L30;
    }

    /* "pyqcstrc/icosah/mics.pyx":680
 * 
 *         else: #
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('            number of independent edges, 3')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":681
 *         else: #
 *             if verbose>0:
 *                 print('            number of independent edges, 3')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_22 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_22);
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

        /* "pyqcstrc/icosah/mics.pyx":680
 * 
 *         else: #
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('            number of independent edges, 3')
 *             else:
 */
        goto __pyx_L67;
      }

      /* "pyqcstrc/icosah/mics.pyx":683
 *                 print('            number of independent edges, 3')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             tmp4c=triangles_to_edges(tmp4a,verbose-1)
 * 
 */
      /*else*/ {
      }
      __pyx_L67:;

      /* "pyqcstrc/icosah/mics.pyx":684
 *             else:
 *                 pass
 *             tmp4c=triangles_to_edges(tmp4a,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *         # Merge
 */
      __pyx_t_22 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_triangles_to_edges(((PyArrayObject *)__pyx_v_tmp4a), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
        __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_22), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 684, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_22));
      __pyx_t_22 = 0;
    }
    __pyx_L30:;

    /* "pyqcstrc/icosah/mics.pyx":687
 * 
 *         # Merge
 *         list_2.append(tmp4c)             # <<<<<<<<<<<<<<
 * 
 *     return list_2
 */
    __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_list_2, ((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 687, __pyx_L1_error)
  }

  /* "pyqcstrc/icosah/mics.pyx":689
 *         list_2.append(tmp4c)
 * 
 *     return list_2             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray chech_four_edges_forms_tetrahedron(np.ndarray[DTYPE_int_t, ndim=3] edges1,\
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_list_2);
  __pyx_r = __pyx_v_list_2;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":485
 *     return tmp1b.reshape(int(len(tmp1b)/36),2,6,3)
 * 
 * cdef list surface_cleaner(np.ndarray[DTYPE_int_t, ndim=4] surface,             # <<<<<<<<<<<<<<
 *                             int num_cycle,
 *                             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_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_surface.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_tmp1d.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.surface_cleaner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface.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_tmp1d.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1e.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_list_0);
  __Pyx_XDECREF(__pyx_v_list_1);
  __Pyx_XDECREF(__pyx_v_list_2);
  __Pyx_XDECREF(__pyx_v_skip_list);
  __Pyx_XDECREF(__pyx_v_combination);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1d);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1e);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XDECREF(__pyx_v_obj_edge_all);
  __Pyx_XDECREF(__pyx_v_j1);
  __Pyx_XDECREF(__pyx_v_j2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":691
 *     return list_2
 * 
 * cdef np.ndarray chech_four_edges_forms_tetrahedron(np.ndarray[DTYPE_int_t, ndim=3] edges1,\             # <<<<<<<<<<<<<<
 *                                             np.ndarray[DTYPE_int_t, ndim=3] edges2,\
 *                                             np.ndarray[DTYPE_int_t, ndim=3] edges3,\
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_chech_four_edges_forms_tetrahedron(PyArrayObject *__pyx_v_edges1, PyArrayObject *__pyx_v_edges2, PyArrayObject *__pyx_v_edges3, PyArrayObject *__pyx_v_edges4, PyArrayObject *__pyx_v_edges5, PyArrayObject *__pyx_v_edges6, int __pyx_v_verbose) {
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges1;
  __Pyx_Buffer __pyx_pybuffer_edges1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges2;
  __Pyx_Buffer __pyx_pybuffer_edges2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges3;
  __Pyx_Buffer __pyx_pybuffer_edges3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges4;
  __Pyx_Buffer __pyx_pybuffer_edges4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges5;
  __Pyx_Buffer __pyx_pybuffer_edges5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges6;
  __Pyx_Buffer __pyx_pybuffer_edges6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __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;
  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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chech_four_edges_forms_tetrahedron", 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_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_edges1.pybuffer.buf = NULL;
  __pyx_pybuffer_edges1.refcount = 0;
  __pyx_pybuffernd_edges1.data = NULL;
  __pyx_pybuffernd_edges1.rcbuffer = &__pyx_pybuffer_edges1;
  __pyx_pybuffer_edges2.pybuffer.buf = NULL;
  __pyx_pybuffer_edges2.refcount = 0;
  __pyx_pybuffernd_edges2.data = NULL;
  __pyx_pybuffernd_edges2.rcbuffer = &__pyx_pybuffer_edges2;
  __pyx_pybuffer_edges3.pybuffer.buf = NULL;
  __pyx_pybuffer_edges3.refcount = 0;
  __pyx_pybuffernd_edges3.data = NULL;
  __pyx_pybuffernd_edges3.rcbuffer = &__pyx_pybuffer_edges3;
  __pyx_pybuffer_edges4.pybuffer.buf = NULL;
  __pyx_pybuffer_edges4.refcount = 0;
  __pyx_pybuffernd_edges4.data = NULL;
  __pyx_pybuffernd_edges4.rcbuffer = &__pyx_pybuffer_edges4;
  __pyx_pybuffer_edges5.pybuffer.buf = NULL;
  __pyx_pybuffer_edges5.refcount = 0;
  __pyx_pybuffernd_edges5.data = NULL;
  __pyx_pybuffernd_edges5.rcbuffer = &__pyx_pybuffer_edges5;
  __pyx_pybuffer_edges6.pybuffer.buf = NULL;
  __pyx_pybuffer_edges6.refcount = 0;
  __pyx_pybuffernd_edges6.data = NULL;
  __pyx_pybuffernd_edges6.rcbuffer = &__pyx_pybuffer_edges6;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges1.diminfo[0].strides = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges1.diminfo[0].shape = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges1.diminfo[1].strides = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges1.diminfo[1].shape = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges1.diminfo[2].strides = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges1.diminfo[2].shape = __pyx_pybuffernd_edges1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges2.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges2.diminfo[0].strides = __pyx_pybuffernd_edges2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges2.diminfo[0].shape = __pyx_pybuffernd_edges2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges2.diminfo[1].strides = __pyx_pybuffernd_edges2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges2.diminfo[1].shape = __pyx_pybuffernd_edges2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges2.diminfo[2].strides = __pyx_pybuffernd_edges2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges2.diminfo[2].shape = __pyx_pybuffernd_edges2.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges3.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges3.diminfo[0].strides = __pyx_pybuffernd_edges3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges3.diminfo[0].shape = __pyx_pybuffernd_edges3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges3.diminfo[1].strides = __pyx_pybuffernd_edges3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges3.diminfo[1].shape = __pyx_pybuffernd_edges3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges3.diminfo[2].strides = __pyx_pybuffernd_edges3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges3.diminfo[2].shape = __pyx_pybuffernd_edges3.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges4.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges4.diminfo[0].strides = __pyx_pybuffernd_edges4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges4.diminfo[0].shape = __pyx_pybuffernd_edges4.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges4.diminfo[1].strides = __pyx_pybuffernd_edges4.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges4.diminfo[1].shape = __pyx_pybuffernd_edges4.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges4.diminfo[2].strides = __pyx_pybuffernd_edges4.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges4.diminfo[2].shape = __pyx_pybuffernd_edges4.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges5.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges5.diminfo[0].strides = __pyx_pybuffernd_edges5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges5.diminfo[0].shape = __pyx_pybuffernd_edges5.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges5.diminfo[1].strides = __pyx_pybuffernd_edges5.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges5.diminfo[1].shape = __pyx_pybuffernd_edges5.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges5.diminfo[2].strides = __pyx_pybuffernd_edges5.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges5.diminfo[2].shape = __pyx_pybuffernd_edges5.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges6.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 691, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges6.diminfo[0].strides = __pyx_pybuffernd_edges6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges6.diminfo[0].shape = __pyx_pybuffernd_edges6.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges6.diminfo[1].strides = __pyx_pybuffernd_edges6.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges6.diminfo[1].shape = __pyx_pybuffernd_edges6.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges6.diminfo[2].strides = __pyx_pybuffernd_edges6.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges6.diminfo[2].shape = __pyx_pybuffernd_edges6.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":700
 *     # 44
 *     # Judgement: whether given four edges form a tetrahedron or not.
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       chech_four_edges_forms_tetrahedron()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":701
 *     # Judgement: whether given four edges form a tetrahedron or not.
 *     if verbose>0:
 *         print('       chech_four_edges_forms_tetrahedron()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":700
 *     # 44
 *     # Judgement: whether given four edges form a tetrahedron or not.
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       chech_four_edges_forms_tetrahedron()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":703
 *         print('       chech_four_edges_forms_tetrahedron()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     cdef np.ndarray[DTYPE_int_t, ndim=1] tmp1a
 *     cdef np.ndarray[DTYPE_int_t, ndim=3] tmp3a,tmp3b
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":708
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a
 * 
 *     tmp1a=np.append(edges1,edges2)             # <<<<<<<<<<<<<<
 *     tmp1a=np.append(tmp1a,edges3)
 *     tmp1a=np.append(tmp1a,edges4)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __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, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_edges1), ((PyObject *)__pyx_v_edges2)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_3, ((PyObject *)__pyx_v_edges1), ((PyObject *)__pyx_v_edges2)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_edges1));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_edges1));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_edges1));
    __Pyx_INCREF(((PyObject *)__pyx_v_edges2));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_edges2));
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_edges2));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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, 708, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 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_4mics_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_5 < 0)) __PYX_ERR(0, 708, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":709
 * 
 *     tmp1a=np.append(edges1,edges2)
 *     tmp1a=np.append(tmp1a,edges3)             # <<<<<<<<<<<<<<
 *     tmp1a=np.append(tmp1a,edges4)
 *     tmp1a=np.append(tmp1a,edges5)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges3)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __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_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges3)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __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_tmp1a));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1a));
    __Pyx_INCREF(((PyObject *)__pyx_v_edges3));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_edges3));
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, ((PyObject *)__pyx_v_edges3));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 709, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 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_4mics_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_5 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":710
 *     tmp1a=np.append(edges1,edges2)
 *     tmp1a=np.append(tmp1a,edges3)
 *     tmp1a=np.append(tmp1a,edges4)             # <<<<<<<<<<<<<<
 *     tmp1a=np.append(tmp1a,edges5)
 *     tmp1a=np.append(tmp1a,edges6)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges4)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges4)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1a));
    __Pyx_INCREF(((PyObject *)__pyx_v_edges4));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_edges4));
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, ((PyObject *)__pyx_v_edges4));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 710, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 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_4mics_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_5 < 0)) __PYX_ERR(0, 710, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":711
 *     tmp1a=np.append(tmp1a,edges3)
 *     tmp1a=np.append(tmp1a,edges4)
 *     tmp1a=np.append(tmp1a,edges5)             # <<<<<<<<<<<<<<
 *     tmp1a=np.append(tmp1a,edges6)
 *     tmp3b=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __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, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges5)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_3, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges5)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1a));
    __Pyx_INCREF(((PyObject *)__pyx_v_edges5));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_edges5));
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_edges5));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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, 711, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 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_4mics_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_5 < 0)) __PYX_ERR(0, 711, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":712
 *     tmp1a=np.append(tmp1a,edges4)
 *     tmp1a=np.append(tmp1a,edges5)
 *     tmp1a=np.append(tmp1a,edges6)             # <<<<<<<<<<<<<<
 *     tmp3b=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges6)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __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_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_edges6)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __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_tmp1a));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1a));
    __Pyx_INCREF(((PyObject *)__pyx_v_edges6));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_edges6));
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, ((PyObject *)__pyx_v_edges6));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 712, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 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_4mics_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_5 < 0)) __PYX_ERR(0, 712, __pyx_L1_error)
  }
  __pyx_t_7 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":713
 *     tmp1a=np.append(tmp1a,edges5)
 *     tmp1a=np.append(tmp1a,edges6)
 *     tmp3b=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 * 
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3b)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 713, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 18.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_5, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_5, __pyx_int_3);
    __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 713, __pyx_L1_error)
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_5 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
  }
  __pyx_t_13 = 0;
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":715
 *     tmp3b=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 * 
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3b)             # <<<<<<<<<<<<<<
 * 
 *     if len(tmp3a)==4:
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3b), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __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_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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, 715, __pyx_L1_error)
  }
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":717
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3b)
 * 
 *     if len(tmp3a)==4:             # <<<<<<<<<<<<<<
 *         # 444
 *         # Given four edges form a tetrahedron
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 717, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_11 == 4) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":720
 *         # 444
 *         # Given four edges form a tetrahedron
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        found')
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__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*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
      if (unlikely(__pyx_t_5 < 0)) {
        PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 720, __pyx_L1_error)
    }
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":721
 *         # Given four edges form a tetrahedron
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        found')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":722
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         if verbose>0:
 *             print('        found')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":721
 *         # Given four edges form a tetrahedron
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        found')
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":724
 *             print('        found')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4a
 *     else:
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":725
 *         else:
 *             pass
 *         return tmp4a             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":717
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3b)
 * 
 *     if len(tmp3a)==4:             # <<<<<<<<<<<<<<
 *         # 444
 *         # Given four edges form a tetrahedron
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":727
 *         return tmp4a
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        not found')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":728
 *     else:
 *         if verbose>0:
 *             print('        not found')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":727
 *         return tmp4a
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        not found')
 *         else:
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/mics.pyx":730
 *             print('        not found')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 * 
 */
    /*else*/ {
    }
    __pyx_L6:;

    /* "pyqcstrc/icosah/mics.pyx":731
 *         else:
 *             pass
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray search_polyhedron_in_surfaces(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 731, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":691
 *     return list_2
 * 
 * cdef np.ndarray chech_four_edges_forms_tetrahedron(np.ndarray[DTYPE_int_t, ndim=3] edges1,\             # <<<<<<<<<<<<<<
 *                                             np.ndarray[DTYPE_int_t, ndim=3] edges2,\
 *                                             np.ndarray[DTYPE_int_t, ndim=3] edges3,\
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  { 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_edges1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.chech_four_edges_forms_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":733
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray search_polyhedron_in_surfaces(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):             # <<<<<<<<<<<<<<
 *     # 4
 *     return 0
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_search_polyhedron_in_surfaces(CYTHON_UNUSED PyArrayObject *__pyx_v_edges, CYTHON_UNUSED int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges;
  __Pyx_Buffer __pyx_pybuffer_edges;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("search_polyhedron_in_surfaces", 0);
  __pyx_pybuffer_edges.pybuffer.buf = NULL;
  __pyx_pybuffer_edges.refcount = 0;
  __pyx_pybuffernd_edges.data = NULL;
  __pyx_pybuffernd_edges.rcbuffer = &__pyx_pybuffer_edges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 733, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges.diminfo[0].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges.diminfo[0].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges.diminfo[1].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges.diminfo[1].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges.diminfo[2].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges.diminfo[2].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_edges.diminfo[3].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_edges.diminfo[3].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":735
 * cdef np.ndarray search_polyhedron_in_surfaces(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):
 *     # 4
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray search_tetrahedron_in_edges(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(__Pyx_TypeTest(__pyx_int_0, __pyx_ptype_5numpy_ndarray)))) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_INCREF(__pyx_int_0);
  __pyx_r = ((PyArrayObject *)__pyx_int_0);
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":733
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray search_polyhedron_in_surfaces(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):             # <<<<<<<<<<<<<<
 *     # 4
 *     return 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.search_polyhedron_in_surfaces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":737
 *     return 0
 * 
 * cdef np.ndarray search_tetrahedron_in_edges(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):             # <<<<<<<<<<<<<<
 *     # 4
 *     cdef int flag,i1,i2,i3,i4,i5,i6
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_search_tetrahedron_in_edges(PyArrayObject *__pyx_v_edges, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_i5;
  int __pyx_v_i6;
  double __pyx_v_vol1;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyObject *__pyx_v_tmp1b = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edges;
  __Pyx_Buffer __pyx_pybuffer_edges;
  __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;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __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;
  Py_ssize_t __pyx_t_22;
  int __pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_t_27;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  Py_ssize_t __pyx_t_31;
  PyArrayObject *__pyx_t_32 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("search_tetrahedron_in_edges", 0);
  __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_edges.pybuffer.buf = NULL;
  __pyx_pybuffer_edges.refcount = 0;
  __pyx_pybuffernd_edges.data = NULL;
  __pyx_pybuffernd_edges.rcbuffer = &__pyx_pybuffer_edges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edges.rcbuffer->pybuffer, (PyObject*)__pyx_v_edges, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 737, __pyx_L1_error)
  }
  __pyx_pybuffernd_edges.diminfo[0].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edges.diminfo[0].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_edges.diminfo[1].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_edges.diminfo[1].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_edges.diminfo[2].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_edges.diminfo[2].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_edges.diminfo[3].strides = __pyx_pybuffernd_edges.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_edges.diminfo[3].shape = __pyx_pybuffernd_edges.rcbuffer->pybuffer.shape[3];

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

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

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

  /* "pyqcstrc/icosah/mics.pyx":747
 *         print('          search_tetrahedron_in_edges()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":749
 *         pass
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           number of egses, %d'%(len(edges)))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":750
 * 
 *     if verbose>0:
 *         print('           number of egses, %d'%(len(edges)))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 750, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_number_of_egses_d, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __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, 750, __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/mics.pyx":749
 *         pass
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('           number of egses, %d'%(len(edges)))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":752
 *         print('           number of egses, %d'%(len(edges)))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1b=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":754
 *         pass
 * 
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     if len(edges)>5:
 *         for i1 in range(len(edges)-5):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __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, 754, __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, 754, __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_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_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_tmp1b = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":755
 * 
 *     tmp1b=np.array([0])
 *     if len(edges)>5:             # <<<<<<<<<<<<<<
 *         for i1 in range(len(edges)-5):
 *             for i2 in range(i1+1,len(edges)-4):
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 755, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_3 > 5) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":756
 *     tmp1b=np.array([0])
 *     if len(edges)>5:
 *         for i1 in range(len(edges)-5):             # <<<<<<<<<<<<<<
 *             for i2 in range(i1+1,len(edges)-4):
 *                 for i3 in range(i1+2,len(edges)-3):
 */
    __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 756, __pyx_L1_error)
    __pyx_t_7 = (__pyx_t_3 - 5);
    __pyx_t_3 = __pyx_t_7;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_3; __pyx_t_8+=1) {
      __pyx_v_i1 = __pyx_t_8;

      /* "pyqcstrc/icosah/mics.pyx":757
 *     if len(edges)>5:
 *         for i1 in range(len(edges)-5):
 *             for i2 in range(i1+1,len(edges)-4):             # <<<<<<<<<<<<<<
 *                 for i3 in range(i1+2,len(edges)-3):
 *                     for i4 in range(i1+3,len(edges)-2):
 */
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 757, __pyx_L1_error)
      __pyx_t_10 = (__pyx_t_9 - 4);
      __pyx_t_9 = __pyx_t_10;
      for (__pyx_t_11 = (__pyx_v_i1 + 1); __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
        __pyx_v_i2 = __pyx_t_11;

        /* "pyqcstrc/icosah/mics.pyx":758
 *         for i1 in range(len(edges)-5):
 *             for i2 in range(i1+1,len(edges)-4):
 *                 for i3 in range(i1+2,len(edges)-3):             # <<<<<<<<<<<<<<
 *                     for i4 in range(i1+3,len(edges)-2):
 *                         for i5 in range(i1+3,len(edges)-1):
 */
        __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 758, __pyx_L1_error)
        __pyx_t_13 = (__pyx_t_12 - 3);
        __pyx_t_12 = __pyx_t_13;
        for (__pyx_t_14 = (__pyx_v_i1 + 2); __pyx_t_14 < __pyx_t_12; __pyx_t_14+=1) {
          __pyx_v_i3 = __pyx_t_14;

          /* "pyqcstrc/icosah/mics.pyx":759
 *             for i2 in range(i1+1,len(edges)-4):
 *                 for i3 in range(i1+2,len(edges)-3):
 *                     for i4 in range(i1+3,len(edges)-2):             # <<<<<<<<<<<<<<
 *                         for i5 in range(i1+3,len(edges)-1):
 *                             for i6 in range(i1+3,len(edges)):
 */
          __pyx_t_15 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 759, __pyx_L1_error)
          __pyx_t_16 = (__pyx_t_15 - 2);
          __pyx_t_15 = __pyx_t_16;
          for (__pyx_t_17 = (__pyx_v_i1 + 3); __pyx_t_17 < __pyx_t_15; __pyx_t_17+=1) {
            __pyx_v_i4 = __pyx_t_17;

            /* "pyqcstrc/icosah/mics.pyx":760
 *                 for i3 in range(i1+2,len(edges)-3):
 *                     for i4 in range(i1+3,len(edges)-2):
 *                         for i5 in range(i1+3,len(edges)-1):             # <<<<<<<<<<<<<<
 *                             for i6 in range(i1+3,len(edges)):
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)
 */
            __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 760, __pyx_L1_error)
            __pyx_t_19 = (__pyx_t_18 - 1);
            __pyx_t_18 = __pyx_t_19;
            for (__pyx_t_20 = (__pyx_v_i1 + 3); __pyx_t_20 < __pyx_t_18; __pyx_t_20+=1) {
              __pyx_v_i5 = __pyx_t_20;

              /* "pyqcstrc/icosah/mics.pyx":761
 *                     for i4 in range(i1+3,len(edges)-2):
 *                         for i5 in range(i1+3,len(edges)-1):
 *                             for i6 in range(i1+3,len(edges)):             # <<<<<<<<<<<<<<
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)
 *                                 if len(tmp4a)!=1:
 */
              __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_edges)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 761, __pyx_L1_error)
              __pyx_t_22 = __pyx_t_21;
              for (__pyx_t_23 = (__pyx_v_i1 + 3); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
                __pyx_v_i6 = __pyx_t_23;

                /* "pyqcstrc/icosah/mics.pyx":762
 *                         for i5 in range(i1+3,len(edges)-1):
 *                             for i6 in range(i1+3,len(edges)):
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)             # <<<<<<<<<<<<<<
 *                                 if len(tmp4a)!=1:
 *                                     if verbose>0:
 */
                __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edges), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __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, 762, __pyx_L1_error)
                __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edges), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 762, __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, 762, __pyx_L1_error)
                __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edges), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __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, 762, __pyx_L1_error)
                __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edges), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __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, 762, __pyx_L1_error)
                __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edges), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 762, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_24);
                if (!(likely(((__pyx_t_24) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_24, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 762, __pyx_L1_error)
                __pyx_t_25 = __Pyx_GetItemInt(((PyObject *)__pyx_v_edges), __pyx_v_i6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 762, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_25);
                if (!(likely(((__pyx_t_25) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_25, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 762, __pyx_L1_error)
                __pyx_t_26 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_chech_four_edges_forms_tetrahedron(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_6), ((PyArrayObject *)__pyx_t_24), ((PyArrayObject *)__pyx_t_25), (__pyx_v_verbose + 1))); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 762, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_26);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
                  __pyx_t_27 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_26), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
                  if (unlikely(__pyx_t_27 < 0)) {
                    PyErr_Fetch(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_28); Py_XDECREF(__pyx_t_29); Py_XDECREF(__pyx_t_30);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_28, __pyx_t_29, __pyx_t_30);
                    }
                    __pyx_t_28 = __pyx_t_29 = __pyx_t_30 = 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_27 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
                }
                __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_26));
                __pyx_t_26 = 0;

                /* "pyqcstrc/icosah/mics.pyx":763
 *                             for i6 in range(i1+3,len(edges)):
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)
 *                                 if len(tmp4a)!=1:             # <<<<<<<<<<<<<<
 *                                     if verbose>0:
 *                                         vol1=tetrahedron_volume_6d_numerical(tmp4a)
 */
                __pyx_t_31 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_31 == ((Py_ssize_t)-1))) __PYX_ERR(0, 763, __pyx_L1_error)
                __pyx_t_1 = ((__pyx_t_31 != 1) != 0);
                if (__pyx_t_1) {

                  /* "pyqcstrc/icosah/mics.pyx":764
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)
 *                                 if len(tmp4a)!=1:
 *                                     if verbose>0:             # <<<<<<<<<<<<<<
 *                                         vol1=tetrahedron_volume_6d_numerical(tmp4a)
 *                                         print('            volume, %10.8f'%(vol1))
 */
                  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
                  if (__pyx_t_1) {

                    /* "pyqcstrc/icosah/mics.pyx":765
 *                                 if len(tmp4a)!=1:
 *                                     if verbose>0:
 *                                         vol1=tetrahedron_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *                                         print('            volume, %10.8f'%(vol1))
 *                                     else:
 */
                    __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

                    /* "pyqcstrc/icosah/mics.pyx":766
 *                                     if verbose>0:
 *                                         vol1=tetrahedron_volume_6d_numerical(tmp4a)
 *                                         print('            volume, %10.8f'%(vol1))             # <<<<<<<<<<<<<<
 *                                     else:
 *                                         pass
 */
                    __pyx_t_26 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 766, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_26);
                    __pyx_t_25 = PyUnicode_Format(__pyx_kp_u_volume_10_8f, __pyx_t_26); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 766, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_25);
                    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
                    __pyx_t_26 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_25); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 766, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_26);
                    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;

                    /* "pyqcstrc/icosah/mics.pyx":764
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)
 *                                 if len(tmp4a)!=1:
 *                                     if verbose>0:             # <<<<<<<<<<<<<<
 *                                         vol1=tetrahedron_volume_6d_numerical(tmp4a)
 *                                         print('            volume, %10.8f'%(vol1))
 */
                    goto __pyx_L19;
                  }

                  /* "pyqcstrc/icosah/mics.pyx":768
 *                                         print('            volume, %10.8f'%(vol1))
 *                                     else:
 *                                         pass             # <<<<<<<<<<<<<<
 *                                     if len(tmp1b)==1:
 *                                         tmp1b=tmp4a.reshape(72)
 */
                  /*else*/ {
                  }
                  __pyx_L19:;

                  /* "pyqcstrc/icosah/mics.pyx":769
 *                                     else:
 *                                         pass
 *                                     if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                                         tmp1b=tmp4a.reshape(72)
 *                                     else:
 */
                  __pyx_t_31 = PyObject_Length(__pyx_v_tmp1b); if (unlikely(__pyx_t_31 == ((Py_ssize_t)-1))) __PYX_ERR(0, 769, __pyx_L1_error)
                  __pyx_t_1 = ((__pyx_t_31 == 1) != 0);
                  if (__pyx_t_1) {

                    /* "pyqcstrc/icosah/mics.pyx":770
 *                                         pass
 *                                     if len(tmp1b)==1:
 *                                         tmp1b=tmp4a.reshape(72)             # <<<<<<<<<<<<<<
 *                                     else:
 *                                         tmp1b=np.append(tmp1b,tmp4a)
 */
                    __pyx_t_25 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 770, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_25);
                    __pyx_t_24 = NULL;
                    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_25))) {
                      __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_25);
                      if (likely(__pyx_t_24)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
                        __Pyx_INCREF(__pyx_t_24);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_25, function);
                      }
                    }
                    __pyx_t_26 = (__pyx_t_24) ? __Pyx_PyObject_Call2Args(__pyx_t_25, __pyx_t_24, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_int_72);
                    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                    if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 770, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_26);
                    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1b, __pyx_t_26);
                    __pyx_t_26 = 0;

                    /* "pyqcstrc/icosah/mics.pyx":769
 *                                     else:
 *                                         pass
 *                                     if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                                         tmp1b=tmp4a.reshape(72)
 *                                     else:
 */
                    goto __pyx_L20;
                  }

                  /* "pyqcstrc/icosah/mics.pyx":772
 *                                         tmp1b=tmp4a.reshape(72)
 *                                     else:
 *                                         tmp1b=np.append(tmp1b,tmp4a)             # <<<<<<<<<<<<<<
 *                                 else:
 *                                     pass
 */
                  /*else*/ {
                    __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 772, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_25);
                    __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_append); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 772, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                    __pyx_t_25 = NULL;
                    __pyx_t_27 = 0;
                    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_27 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_24)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_25, __pyx_v_tmp1b, ((PyObject *)__pyx_v_tmp4a)};
                      __pyx_t_26 = __Pyx_PyFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_27, 2+__pyx_t_27); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 772, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                      __Pyx_GOTREF(__pyx_t_26);
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_24)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_25, __pyx_v_tmp1b, ((PyObject *)__pyx_v_tmp4a)};
                      __pyx_t_26 = __Pyx_PyCFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_27, 2+__pyx_t_27); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 772, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                      __Pyx_GOTREF(__pyx_t_26);
                    } else
                    #endif
                    {
                      __pyx_t_6 = PyTuple_New(2+__pyx_t_27); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      if (__pyx_t_25) {
                        __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_25); __pyx_t_25 = NULL;
                      }
                      __Pyx_INCREF(__pyx_v_tmp1b);
                      __Pyx_GIVEREF(__pyx_v_tmp1b);
                      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_27, __pyx_v_tmp1b);
                      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
                      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
                      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_27, ((PyObject *)__pyx_v_tmp4a));
                      __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_6, NULL); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 772, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_26);
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1b, __pyx_t_26);
                    __pyx_t_26 = 0;
                  }
                  __pyx_L20:;

                  /* "pyqcstrc/icosah/mics.pyx":763
 *                             for i6 in range(i1+3,len(edges)):
 *                                 tmp4a=chech_four_edges_forms_tetrahedron(edges[i1],edges[i2],edges[i3],edges[i4],edges[i5],edges[i6],verbose+1)
 *                                 if len(tmp4a)!=1:             # <<<<<<<<<<<<<<
 *                                     if verbose>0:
 *                                         vol1=tetrahedron_volume_6d_numerical(tmp4a)
 */
                  goto __pyx_L18;
                }

                /* "pyqcstrc/icosah/mics.pyx":774
 *                                         tmp1b=np.append(tmp1b,tmp4a)
 *                                 else:
 *                                     pass             # <<<<<<<<<<<<<<
 *         if len(tmp1b)!=1:
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 */
                /*else*/ {
                }
                __pyx_L18:;
              }
            }
          }
        }
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":775
 *                                 else:
 *                                     pass
 *         if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_tmp1b); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 775, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_7 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":776
 *                                     pass
 *         if len(tmp1b)!=1:
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('          number of tetrahedron, %d'%(len(tmp4a)))
 */
      __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmp1b, __pyx_n_s_reshape); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_7 = PyObject_Length(__pyx_v_tmp1b); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 776, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 72.0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_25 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(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_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_24)) {
        PyObject *__pyx_temp[5] = {__pyx_t_25, __pyx_t_6, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_26 = __Pyx_PyFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 776, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_24)) {
        PyObject *__pyx_temp[5] = {__pyx_t_25, __pyx_t_6, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_26 = __Pyx_PyCFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 776, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_25) {
          __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_25); __pyx_t_25 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_6);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_8, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_8, __pyx_int_3);
        __pyx_t_6 = 0;
        __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_4, NULL); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 776, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 776, __pyx_L1_error)
      __pyx_t_32 = ((PyArrayObject *)__pyx_t_26);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_8 < 0)) {
          PyErr_Fetch(&__pyx_t_30, &__pyx_t_29, &__pyx_t_28);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_30); Py_XDECREF(__pyx_t_29); Py_XDECREF(__pyx_t_28);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_30, __pyx_t_29, __pyx_t_28);
          }
          __pyx_t_30 = __pyx_t_29 = __pyx_t_28 = 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_8 < 0)) __PYX_ERR(0, 776, __pyx_L1_error)
      }
      __pyx_t_32 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_26));
      __pyx_t_26 = 0;

      /* "pyqcstrc/icosah/mics.pyx":777
 *         if len(tmp1b)!=1:
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('          number of tetrahedron, %d'%(len(tmp4a)))
 *                 vol1=obj_volume_6d_numerical(tmp4a)
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":778
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:
 *                 print('          number of tetrahedron, %d'%(len(tmp4a)))             # <<<<<<<<<<<<<<
 *                 vol1=obj_volume_6d_numerical(tmp4a)
 *                 print('            total volume, %10.8f'%(vol1))
 */
        __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 778, __pyx_L1_error)
        __pyx_t_26 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __pyx_t_24 = PyUnicode_Format(__pyx_kp_u_number_of_tetrahedron_d, __pyx_t_26); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_24);
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        __pyx_t_26 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_24); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;

        /* "pyqcstrc/icosah/mics.pyx":779
 *             if verbose>0:
 *                 print('          number of tetrahedron, %d'%(len(tmp4a)))
 *                 vol1=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *                 print('            total volume, %10.8f'%(vol1))
 *             else:
 */
        __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

        /* "pyqcstrc/icosah/mics.pyx":780
 *                 print('          number of tetrahedron, %d'%(len(tmp4a)))
 *                 vol1=obj_volume_6d_numerical(tmp4a)
 *                 print('            total volume, %10.8f'%(vol1))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_26 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __pyx_t_24 = PyUnicode_Format(__pyx_kp_u_total_volume_10_8f, __pyx_t_26); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_24);
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
        __pyx_t_26 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_24); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 780, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;

        /* "pyqcstrc/icosah/mics.pyx":777
 *         if len(tmp1b)!=1:
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('          number of tetrahedron, %d'%(len(tmp4a)))
 *                 vol1=obj_volume_6d_numerical(tmp4a)
 */
        goto __pyx_L22;
      }

      /* "pyqcstrc/icosah/mics.pyx":782
 *                 print('            total volume, %10.8f'%(vol1))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         else:
 */
      /*else*/ {
      }
      __pyx_L22:;

      /* "pyqcstrc/icosah/mics.pyx":783
 *             else:
 *                 pass
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[[0]]]])
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmp1b, __pyx_n_s_reshape); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_7 = PyObject_Length(__pyx_v_tmp1b); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 783, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_7) / 72.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_24))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_24);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_24, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_24)) {
        PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_26 = __Pyx_PyFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 783, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_24)) {
        PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_26 = __Pyx_PyCFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 783, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_25 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 783, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_25);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_8, __pyx_t_4);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_8, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_25, 2+__pyx_t_8, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_25, 3+__pyx_t_8, __pyx_int_3);
        __pyx_t_4 = 0;
        __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_25, NULL); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 783, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_26);
        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      }
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 783, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_26);
      __pyx_t_26 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":775
 *                                 else:
 *                                     pass
 *         if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             if verbose>0:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":785
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[[0]]]])
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_np); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_array); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_24, 0, __pyx_int_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_GIVEREF(__pyx_t_24);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_24);
      __pyx_t_24 = 0;
      __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_24, 0, __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_GIVEREF(__pyx_t_24);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_24);
      __pyx_t_24 = 0;
      __pyx_t_24 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_25))) {
        __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_25);
        if (likely(__pyx_t_24)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
          __Pyx_INCREF(__pyx_t_24);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_25, function);
        }
      }
      __pyx_t_26 = (__pyx_t_24) ? __Pyx_PyObject_Call2Args(__pyx_t_25, __pyx_t_24, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 785, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_26);
      __pyx_t_26 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":755
 * 
 *     tmp1b=np.array([0])
 *     if len(edges)>5:             # <<<<<<<<<<<<<<
 *         for i1 in range(len(edges)-5):
 *             for i2 in range(i1+1,len(edges)-4):
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":787
 *             return np.array([[[[0]]]])
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray extract_common_vertex(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 787, __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, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __pyx_t_25 = PyList_New(1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_25, 0, __pyx_int_0);
    __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __Pyx_GIVEREF(__pyx_t_25);
    PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_25);
    __pyx_t_25 = 0;
    __pyx_t_25 = PyList_New(1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __Pyx_GIVEREF(__pyx_t_24);
    PyList_SET_ITEM(__pyx_t_25, 0, __pyx_t_24);
    __pyx_t_24 = 0;
    __pyx_t_24 = PyList_New(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
    __Pyx_GIVEREF(__pyx_t_25);
    PyList_SET_ITEM(__pyx_t_24, 0, __pyx_t_25);
    __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_24) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_26)) __PYX_ERR(0, 787, __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, 787, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_26);
    __pyx_t_26 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":737
 *     return 0
 * 
 * cdef np.ndarray search_tetrahedron_in_edges(np.ndarray[DTYPE_int_t, ndim=4] edges,int verbose):             # <<<<<<<<<<<<<<
 *     # 4
 *     cdef int flag,i1,i2,i3,i4,i5,i6
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  { 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_edges.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.search_tetrahedron_in_edges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edges.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF(__pyx_v_tmp1b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":789
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray extract_common_vertex(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     #
 *     cdef int flag1,counter1,counter2
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_extract_common_vertex(PyArrayObject *__pyx_v_obj, int __pyx_v_verbose) {
  int __pyx_v_flag1;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  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_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;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extract_common_vertex", 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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 789, __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/mics.pyx":796
 *     cdef np.ndarray[DTYPE_int_t, ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       extract_common_vertex()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":796
 *     cdef np.ndarray[DTYPE_int_t, ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       extract_common_vertex()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":799
 *         print('       extract_common_vertex()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":801
 *         pass
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp3a=remove_doubling_dim4_in_perp_space(obj)
 *     for i1 in range(len(tmp3a)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __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, 801, __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, 801, __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, 801, __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, 801, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 801, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":802
 * 
 *     tmp1a=np.array([0])
 *     tmp3a=remove_doubling_dim4_in_perp_space(obj)             # <<<<<<<<<<<<<<
 *     for i1 in range(len(tmp3a)):
 *         counter2=0
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space(((PyArrayObject *)__pyx_v_obj), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
  }
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":803
 *     tmp1a=np.array([0])
 *     tmp3a=remove_doubling_dim4_in_perp_space(obj)
 *     for i1 in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *         counter2=0
 *         for i2 in range(len(obj)):
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 803, __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/mics.pyx":804
 *     tmp3a=remove_doubling_dim4_in_perp_space(obj)
 *     for i1 in range(len(tmp3a)):
 *         counter2=0             # <<<<<<<<<<<<<<
 *         for i2 in range(len(obj)):
 *             counter1=0
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":805
 *     for i1 in range(len(tmp3a)):
 *         counter2=0
 *         for i2 in range(len(obj)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i3 in range(4):
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 805, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":806
 *         counter2=0
 *         for i2 in range(len(obj)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i3 in range(4):
 *                 flag1=check_two_vertices(tmp3a[i1],obj[i2][i3],verbose-1)
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":807
 *         for i2 in range(len(obj)):
 *             counter1=0
 *             for i3 in range(4):             # <<<<<<<<<<<<<<
 *                 flag1=check_two_vertices(tmp3a[i1],obj[i2][i3],verbose-1)
 *                 if flag1==1: # equivalent
 */
      for (__pyx_t_16 = 0; __pyx_t_16 < 4; __pyx_t_16+=1) {
        __pyx_v_i3 = __pyx_t_16;

        /* "pyqcstrc/icosah/mics.pyx":808
 *             counter1=0
 *             for i3 in range(4):
 *                 flag1=check_two_vertices(tmp3a[i1],obj[i2][i3],verbose-1)             # <<<<<<<<<<<<<<
 *                 if flag1==1: # equivalent
 *                     counter1+=1
 */
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __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, 808, __pyx_L1_error)
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __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, 808, __pyx_L1_error)
        __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), (__pyx_v_verbose - 1));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":809
 *             for i3 in range(4):
 *                 flag1=check_two_vertices(tmp3a[i1],obj[i2][i3],verbose-1)
 *                 if flag1==1: # equivalent             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_1 = ((__pyx_v_flag1 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":810
 *                 flag1=check_two_vertices(tmp3a[i1],obj[i2][i3],verbose-1)
 *                 if flag1==1: # equivalent
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":811
 *                 if flag1==1: # equivalent
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L9_break;

          /* "pyqcstrc/icosah/mics.pyx":809
 *             for i3 in range(4):
 *                 flag1=check_two_vertices(tmp3a[i1],obj[i2][i3],verbose-1)
 *                 if flag1==1: # equivalent             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":813
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1!=0:
 *                 pass
 */
        /*else*/ {
        }
      }
      __pyx_L9_break:;

      /* "pyqcstrc/icosah/mics.pyx":814
 *                 else:
 *                     pass
 *             if counter1!=0:             # <<<<<<<<<<<<<<
 *                 pass
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
      if (__pyx_t_1) {
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/mics.pyx":817
 *                 pass
 *             else:
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *         if counter2==0:
 *             if len(tmp1a)==1:
 */
      /*else*/ {
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);
      }
      __pyx_L11:;
    }

    /* "pyqcstrc/icosah/mics.pyx":818
 *             else:
 *                 counter2+=1
 *         if counter2==0:             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp3a[i1].reshape(18)
 */
    __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":819
 *                 counter2+=1
 *         if counter2==0:
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp3a[i1].reshape(18)
 *             else:
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 819, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_13 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":820
 *         if counter2==0:
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp3a[i1].reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 */
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 820, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __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_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __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, 820, __pyx_L1_error)
        __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":819
 *                 counter2+=1
 *         if counter2==0:
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp3a[i1].reshape(18)
 *             else:
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/mics.pyx":822
 *                 tmp1a=tmp3a[i1].reshape(18)
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*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_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        __pyx_t_15 = 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_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        {
          __pyx_t_17 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_17, 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_17, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_15, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 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, 822, __pyx_L1_error)
        __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 822, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;
      }
      __pyx_L13:;

      /* "pyqcstrc/icosah/mics.pyx":818
 *             else:
 *                 counter2+=1
 *         if counter2==0:             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp3a[i1].reshape(18)
 */
      goto __pyx_L12;
    }

    /* "pyqcstrc/icosah/mics.pyx":824
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if len(tmp1a)!=1:
 *         if verbose>0:
 */
    /*else*/ {
    }
    __pyx_L12:;
  }

  /* "pyqcstrc/icosah/mics.pyx":825
 *         else:
 *             pass
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        number of common vertex, %d'%(int(len(tmp1a)/18)))
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 825, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_11 != 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":826
 *             pass
 *     if len(tmp1a)!=1:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of common vertex, %d'%(int(len(tmp1a)/18)))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":827
 *     if len(tmp1a)!=1:
 *         if verbose>0:
 *             print('        number of common vertex, %d'%(int(len(tmp1a)/18)))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 827, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 18.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_number_of_common_vertex_d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __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/mics.pyx":826
 *             pass
 *     if len(tmp1a)!=1:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of common vertex, %d'%(int(len(tmp1a)/18)))
 *         else:
 */
      goto __pyx_L15;
    }

    /* "pyqcstrc/icosah/mics.pyx":829
 *             print('        number of common vertex, %d'%(int(len(tmp1a)/18)))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     else:
 */
    /*else*/ {
    }
    __pyx_L15:;

    /* "pyqcstrc/icosah/mics.pyx":830
 *         else:
 *             pass
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 830, __pyx_L1_error)
    __pyx_t_17 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 18.0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 830, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_17, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __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_4, __pyx_t_17, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_17);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_int_3);
      __pyx_t_17 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 830, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":825
 *         else:
 *             pass
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        number of common vertex, %d'%(int(len(tmp1a)/18)))
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":832
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of common vertex, 0')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":833
 *     else:
 *         if verbose>0:
 *             print('        number of common vertex, 0')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":832
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of common vertex, 0')
 *         else:
 */
      goto __pyx_L16;
    }

    /* "pyqcstrc/icosah/mics.pyx":835
 *             print('        number of common vertex, 0')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         return np.array([[[0]]])
 */
    /*else*/ {
    }
    __pyx_L16:;

    /* "pyqcstrc/icosah/mics.pyx":837
 *             pass
 * 
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray extract_surface_without_specific_vertx(np.ndarray[DTYPE_int_t, ndim=4] triangles,
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __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, 837, __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, 837, __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_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_17);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_17, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __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, 837, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":789
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray extract_common_vertex(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     #
 *     cdef int flag1,counter1,counter2
 */

  /* 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_17);
  { 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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.extract_common_vertex", __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_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;
}

/* "pyqcstrc/icosah/mics.pyx":839
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray extract_surface_without_specific_vertx(np.ndarray[DTYPE_int_t, ndim=4] triangles,             # <<<<<<<<<<<<<<
 *                                                         np.ndarray[DTYPE_int_t, ndim=3] points,
 *                                                         int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_extract_surface_without_specific_vertx(PyArrayObject *__pyx_v_triangles, PyArrayObject *__pyx_v_points, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_flag;
  int __pyx_v_counter1;
  PyArrayObject *__pyx_v_tmp1a = 0;
  __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_triangles;
  __Pyx_Buffer __pyx_pybuffer_triangles;
  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;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extract_surface_without_specific_vertx", 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_triangles.pybuffer.buf = NULL;
  __pyx_pybuffer_triangles.refcount = 0;
  __pyx_pybuffernd_triangles.data = NULL;
  __pyx_pybuffernd_triangles.rcbuffer = &__pyx_pybuffer_triangles;
  __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_triangles.rcbuffer->pybuffer, (PyObject*)__pyx_v_triangles, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 839, __pyx_L1_error)
  }
  __pyx_pybuffernd_triangles.diminfo[0].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_triangles.diminfo[0].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_triangles.diminfo[1].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_triangles.diminfo[1].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_triangles.diminfo[2].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_triangles.diminfo[2].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_triangles.diminfo[3].strides = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_triangles.diminfo[3].shape = __pyx_pybuffernd_triangles.rcbuffer->pybuffer.shape[3];
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 839, __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/mics.pyx":847
 *     cdef np.ndarray[DTYPE_int_t, ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       extract_surface_without_specific_vertx()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":847
 *     cdef np.ndarray[DTYPE_int_t, ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       extract_surface_without_specific_vertx()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":850
 *         print('       extract_surface_without_specific_vertx()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":852
 *         pass
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     for i1 in range(len(points)):
 *         for i2 in range(len(triangles)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __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, 852, __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, 852, __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, 852, __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, 852, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 852, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":853
 * 
 *     tmp1a=np.array([0])
 *     for i1 in range(len(points)):             # <<<<<<<<<<<<<<
 *         for i2 in range(len(triangles)):
 *             counter1=0
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_points)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 853, __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/mics.pyx":854
 *     tmp1a=np.array([0])
 *     for i1 in range(len(points)):
 *         for i2 in range(len(triangles)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i3 in range(3):
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_triangles)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 854, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":855
 *     for i1 in range(len(points)):
 *         for i2 in range(len(triangles)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i3 in range(3):
 *                 flag=check_two_vertices(points[i1],triangles[i2][i3],verbose-1)
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":856
 *         for i2 in range(len(triangles)):
 *             counter1=0
 *             for i3 in range(3):             # <<<<<<<<<<<<<<
 *                 flag=check_two_vertices(points[i1],triangles[i2][i3],verbose-1)
 *                 if flag==1: # equivalent
 */
      for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
        __pyx_v_i3 = __pyx_t_16;

        /* "pyqcstrc/icosah/mics.pyx":857
 *             counter1=0
 *             for i3 in range(3):
 *                 flag=check_two_vertices(points[i1],triangles[i2][i3],verbose-1)             # <<<<<<<<<<<<<<
 *                 if flag==1: # equivalent
 *                     counter1+=1
 */
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_points), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __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, 857, __pyx_L1_error)
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangles), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __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, 857, __pyx_L1_error)
        __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_check_two_vertices(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), (__pyx_v_verbose - 1));
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":858
 *             for i3 in range(3):
 *                 flag=check_two_vertices(points[i1],triangles[i2][i3],verbose-1)
 *                 if flag==1: # equivalent             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_1 = ((__pyx_v_flag == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":859
 *                 flag=check_two_vertices(points[i1],triangles[i2][i3],verbose-1)
 *                 if flag==1: # equivalent
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":860
 *                 if flag==1: # equivalent
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L9_break;

          /* "pyqcstrc/icosah/mics.pyx":858
 *             for i3 in range(3):
 *                 flag=check_two_vertices(points[i1],triangles[i2][i3],verbose-1)
 *                 if flag==1: # equivalent             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":862
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if len(tmp1a)==1:
 */
        /*else*/ {
        }
      }
      __pyx_L9_break:;

      /* "pyqcstrc/icosah/mics.pyx":863
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=triangles[i2].reshape(54) # 3*6*3
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":864
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=triangles[i2].reshape(54) # 3*6*3
 *                 else:
 */
        __pyx_t_17 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 864, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_17 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":865
 *             if counter1==0:
 *                 if len(tmp1a)==1:
 *                     tmp1a=triangles[i2].reshape(54) # 3*6*3             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,triangles[i2])
 */
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangles), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __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_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_int_54) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_54);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __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, 865, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
          {
            __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 865, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":864
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=triangles[i2].reshape(54) # 3*6*3
 *                 else:
 */
          goto __pyx_L12;
        }

        /* "pyqcstrc/icosah/mics.pyx":867
 *                     tmp1a=triangles[i2].reshape(54) # 3*6*3
 *                 else:
 *                     tmp1a=np.append(tmp1a,triangles[i2])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __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, 867, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangles), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = NULL;
          __pyx_t_16 = 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_16 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          {
            __pyx_t_18 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 867, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 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_18, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_16, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 867, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
          {
            __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 867, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;
        }
        __pyx_L12:;

        /* "pyqcstrc/icosah/mics.pyx":863
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=triangles[i2].reshape(54) # 3*6*3
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/mics.pyx":869
 *                     tmp1a=np.append(tmp1a,triangles[i2])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *     if len(tmp1a)!=1:
 *         if verbose>0:
 */
      /*else*/ {
      }
      __pyx_L11:;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":870
 *             else:
 *                 pass
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        number of triangles, %d'%(int(len(tmp1a)/54)))
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 870, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_11 != 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":871
 *                 pass
 *     if len(tmp1a)!=1:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of triangles, %d'%(int(len(tmp1a)/54)))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":872
 *     if len(tmp1a)!=1:
 *         if verbose>0:
 *             print('        number of triangles, %d'%(int(len(tmp1a)/54)))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 872, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 54.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_number_of_triangles_d, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __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/mics.pyx":871
 *                 pass
 *     if len(tmp1a)!=1:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of triangles, %d'%(int(len(tmp1a)/54)))
 *         else:
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/mics.pyx":874
 *             print('        number of triangles, %d'%(int(len(tmp1a)/54)))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp1a.reshape(int(len(tmp1a)/54),3,6,3)
 *     else:
 */
    /*else*/ {
    }
    __pyx_L14:;

    /* "pyqcstrc/icosah/mics.pyx":875
 *         else:
 *             pass
 *         return tmp1a.reshape(int(len(tmp1a)/54),3,6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 875, __pyx_L1_error)
    __pyx_t_18 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 54.0)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_18, __pyx_int_3, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_18, __pyx_int_3, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_18);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_18);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_3);
      __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_18 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 875, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":870
 *             else:
 *                 pass
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        number of triangles, %d'%(int(len(tmp1a)/54)))
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":877
 *         return tmp1a.reshape(int(len(tmp1a)/54),3,6,3)
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of triangles, 0')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":878
 *     else:
 *         if verbose>0:
 *             print('        number of triangles, 0')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":877
 *         return tmp1a.reshape(int(len(tmp1a)/54),3,6,3)
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        number of triangles, 0')
 *         else:
 */
      goto __pyx_L15;
    }

    /* "pyqcstrc/icosah/mics.pyx":880
 *             print('        number of triangles, 0')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 * 
 */
    /*else*/ {
    }
    __pyx_L15:;

    /* "pyqcstrc/icosah/mics.pyx":881
 *         else:
 *             pass
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray simplification_convex_polyhedron(np.ndarray[DTYPE_int_t, ndim=4] obj,
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __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, 881, __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, 881, __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_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_18);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_18);
    __pyx_t_18 = 0;
    __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_18, 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_18) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_18);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __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, 881, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":839
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray extract_surface_without_specific_vertx(np.ndarray[DTYPE_int_t, ndim=4] triangles,             # <<<<<<<<<<<<<<
 *                                                         np.ndarray[DTYPE_int_t, ndim=3] points,
 *                                                         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_18);
  { 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_triangles.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.extract_surface_without_specific_vertx", __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_triangles.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":883
 *         return np.array([[[[0]]]])
 * 
 * cpdef np.ndarray simplification_convex_polyhedron(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                                 int num_cycle,
 *                                                 int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_1simplification_convex_polyhedron(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_convex_polyhedron(PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  long __pyx_v_v0;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  long __pyx_v_v4;
  long __pyx_v_v5;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  PyObject *__pyx_v_surface_list = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  __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_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;
  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;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyArrayObject *__pyx_t_21 = NULL;
  int __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_convex_polyhedron", 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_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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 883, __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/mics.pyx":896
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_convex_polyhedron()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

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

  /* "pyqcstrc/icosah/mics.pyx":899
 *         print('      simplification_convex_polyhedron()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":901
 *         pass
 * 
 *     v0,v1,v2=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __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, 901, __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, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 901, __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, 901, __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, 901, __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, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v0 = __pyx_t_6;
  __pyx_v_v1 = __pyx_t_7;
  __pyx_v_v2 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":903
 *     v0,v1,v2=obj_volume_6d(obj)
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 */
  __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":904
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":906
 *     if verbose>0:
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_initial_volume);
    __pyx_t_9 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_initial_volume);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_initial_volume);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 906, __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__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 906, __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__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 906, __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__18);
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 906, __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, 906, __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__19);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __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, 906, __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/mics.pyx":904
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":908
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":910
 *         pass
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp4a=np.array([[[[0]]]])
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __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, 910, __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, 910, __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_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_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, 910, __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, 910, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 910, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":911
 * 
 *     tmp1a=np.array([0])
 *     tmp4a=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 *     for i1 in range(len(surface_list)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 911, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __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, 911, __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, 911, __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 = 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, 911, __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, 911, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_12 < 0)) __PYX_ERR(0, 911, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":912
 *     tmp1a=np.array([0])
 *     tmp4a=np.array([[[[0]]]])
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)             # <<<<<<<<<<<<<<
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_4mics_generate_obj_surface(((PyArrayObject *)__pyx_v_obj), __pyx_v_num_cycle, (__pyx_v_verbose - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_surface_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":913
 *     tmp4a=np.array([[[[0]]]])
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 *     for i1 in range(len(surface_list)):             # <<<<<<<<<<<<<<
 *         if len(tmp1a)==1:
 *             tmp4a=surface_list[i1]
 */
  if (unlikely(__pyx_v_surface_list == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 913, __pyx_L1_error)
  }
  __pyx_t_9 = PyList_GET_SIZE(__pyx_v_surface_list); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 913, __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/mics.pyx":914
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *             tmp4a=surface_list[i1]
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 */
    __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 914, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_18 == 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":915
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:
 *             tmp4a=surface_list[i1]             # <<<<<<<<<<<<<<
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 *         else:
 */
      if (unlikely(__pyx_v_surface_list == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 915, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_surface_list, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __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, 915, __pyx_L1_error)
      __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":916
 *         if len(tmp1a)==1:
 *             tmp4a=surface_list[i1]
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=np.append(tmp1a,surface_list[i1])
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __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, 916, __pyx_L1_error)
      __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_18 * 36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      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_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, 916, __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, 916, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 916, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":914
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *             tmp4a=surface_list[i1]
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 */
      goto __pyx_L7;
    }

    /* "pyqcstrc/icosah/mics.pyx":918
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 *         else:
 *             tmp1a=np.append(tmp1a,surface_list[i1])             # <<<<<<<<<<<<<<
 * 
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__pyx_v_surface_list == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 918, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_surface_list, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_19 = 0;
      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_19 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_20 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 918, __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_19, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      }
      __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, 918, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;
    }
    __pyx_L7:;
  }

  /* "pyqcstrc/icosah/mics.pyx":920
 *             tmp1a=np.append(tmp1a,surface_list[i1])
 * 
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 920, __pyx_L1_error)
  __pyx_t_20 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_4 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_20, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_20, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_t_20);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_12, __pyx_int_3);
    __pyx_t_20 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __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, 920, __pyx_L1_error)
  __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 920, __pyx_L1_error)
  }
  __pyx_t_21 = 0;
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":921
 * 
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __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_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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, 921, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":922
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     v3,v4,v5=obj_volume_6d(tmp4a)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_12 < 0)) __PYX_ERR(0, 922, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":924
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 * 
 *     v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol2=obj_volume_6d_numerical(tmp4a)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __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, 924, __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_20 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_20);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_20 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 924, __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, 924, __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, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __pyx_v_v3 = __pyx_t_8;
  __pyx_v_v4 = __pyx_t_7;
  __pyx_v_v5 = __pyx_t_6;

  /* "pyqcstrc/icosah/mics.pyx":926
 *     v3,v4,v5=obj_volume_6d(tmp4a)
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol2=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 * 
 *     if v3==v0 and v4==v1 and v5==v2 or abs(vol1-vol2)<vol2*TOL:
 */
  __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

  /* "pyqcstrc/icosah/mics.pyx":928
 *     vol2=obj_volume_6d_numerical(tmp4a)
 * 
 *     if v3==v0 and v4==v1 and v5==v2 or abs(vol1-vol2)<vol2*TOL:             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('        succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 */
  __pyx_t_22 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
  if (!__pyx_t_22) {
    goto __pyx_L10_next_or;
  } else {
  }
  __pyx_t_22 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
  if (!__pyx_t_22) {
    goto __pyx_L10_next_or;
  } else {
  }
  __pyx_t_22 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
  if (!__pyx_t_22) {
  } else {
    __pyx_t_1 = __pyx_t_22;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_L10_next_or:;
  __pyx_t_22 = ((fabs((__pyx_v_vol1 - __pyx_v_vol2)) < (__pyx_v_vol2 * __pyx_v_8pyqcstrc_6icosah_4mics_TOL)) != 0);
  __pyx_t_1 = __pyx_t_22;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":929
 * 
 *     if v3==v0 and v4==v1 and v5==v2 or abs(vol1-vol2)<vol2*TOL:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('        succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":930
 *     if v3==v0 and v4==v1 and v5==v2 or abs(vol1-vol2)<vol2*TOL:
 *         if verbose>1:
 *             print('        succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_succdeded_simplified_volume);
      __pyx_t_9 += 38;
      __Pyx_GIVEREF(__pyx_kp_u_succdeded_simplified_volume);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_succdeded_simplified_volume);
      __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_20);
      __pyx_t_20 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
      __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_20);
      __pyx_t_20 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
      __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_20);
      __pyx_t_20 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_9 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
      __pyx_t_20 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_20, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 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__19);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __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, 930, __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/mics.pyx":929
 * 
 *     if v3==v0 and v4==v1 and v5==v2 or abs(vol1-vol2)<vol2*TOL:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('        succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 *         else:
 */
      goto __pyx_L13;
    }

    /* "pyqcstrc/icosah/mics.pyx":932
 *             print('        succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4a
 * 
 */
    /*else*/ {
    }
    __pyx_L13:;

    /* "pyqcstrc/icosah/mics.pyx":933
 *         else:
 *             pass
 *         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/mics.pyx":928
 *     vol2=obj_volume_6d_numerical(tmp4a)
 * 
 *     if v3==v0 and v4==v1 and v5==v2 or abs(vol1-vol2)<vol2*TOL:             # <<<<<<<<<<<<<<
 *         if verbose>1:
 *             print('        succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":936
 * 
 *     else:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('        fail, initial obj returned')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":937
 *     else:
 *         if verbose>1:
 *             print('        fail, initial obj returned')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":936
 * 
 *     else:
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             print('        fail, initial obj returned')
 *         else:
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/mics.pyx":939
 *             print('        fail, initial obj returned')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    /*else*/ {
    }
    __pyx_L14:;

    /* "pyqcstrc/icosah/mics.pyx":940
 *         else:
 *             pass
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray simplification_obj_smart(np.ndarray[DTYPE_int_t, ndim=4] obj,
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":883
 *         return np.array([[[[0]]]])
 * 
 * cpdef np.ndarray simplification_convex_polyhedron(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                                 int num_cycle,
 *                                                 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_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_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.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.mics.simplification_convex_polyhedron", __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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_surface_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_1simplification_convex_polyhedron(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_1simplification_convex_polyhedron(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  int __pyx_v_num_cycle;
  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("simplification_convex_polyhedron (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_num_cycle,&__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_num_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_convex_polyhedron", 1, 3, 3, 1); __PYX_ERR(0, 883, __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("simplification_convex_polyhedron", 1, 3, 3, 2); __PYX_ERR(0, 883, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "simplification_convex_polyhedron") < 0)) __PYX_ERR(0, 883, __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_num_cycle = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L3_error)
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplification_convex_polyhedron", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 883, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_convex_polyhedron", __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, 883, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_simplification_convex_polyhedron(__pyx_self, __pyx_v_obj, __pyx_v_num_cycle, __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_4mics_simplification_convex_polyhedron(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_convex_polyhedron", 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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 883, __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_4mics_simplification_convex_polyhedron(((PyArrayObject *)__pyx_v_obj), __pyx_v_num_cycle, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __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_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_convex_polyhedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":942
 *         return obj
 * 
 * cpdef np.ndarray simplification_obj_smart(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                         int num_cycle,
 *                                         int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_3simplification_obj_smart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_smart(PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  long __pyx_v_v0;
  long __pyx_v_v1;
  long __pyx_v_v2;
  double __pyx_v_vol0;
  double __pyx_v_vol1;
  PyObject *__pyx_v_surface_list = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_vertex_common = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_obj_surface = 0;
  PyArrayObject *__pyx_v_obj_surface_new = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_surface;
  __Pyx_Buffer __pyx_pybuffer_obj_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_surface_new;
  __Pyx_Buffer __pyx_pybuffer_obj_surface_new;
  __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_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertex_common;
  __Pyx_Buffer __pyx_pybuffer_vertex_common;
  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;
  __pyx_t_5numpy_float64_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  Py_ssize_t __pyx_t_22;
  PyArrayObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_smart", 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_vertex_common.pybuffer.buf = NULL;
  __pyx_pybuffer_vertex_common.refcount = 0;
  __pyx_pybuffernd_vertex_common.data = NULL;
  __pyx_pybuffernd_vertex_common.rcbuffer = &__pyx_pybuffer_vertex_common;
  __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_obj_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_surface.refcount = 0;
  __pyx_pybuffernd_obj_surface.data = NULL;
  __pyx_pybuffernd_obj_surface.rcbuffer = &__pyx_pybuffer_obj_surface;
  __pyx_pybuffer_obj_surface_new.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_surface_new.refcount = 0;
  __pyx_pybuffernd_obj_surface_new.data = NULL;
  __pyx_pybuffernd_obj_surface_new.rcbuffer = &__pyx_pybuffer_obj_surface_new;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 942, __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/mics.pyx":957
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface,obj_surface_new,obj_tetrahedron
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_smart()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":957
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface,obj_surface_new,obj_tetrahedron
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_smart()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":960
 *         print('      simplification_obj_smart()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":962
 *         pass
 * 
 *     v0,v1,v2=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __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, 962, __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, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 962, __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, 962, __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, 962, __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, 962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v0 = __pyx_t_6;
  __pyx_v_v1 = __pyx_t_7;
  __pyx_v_v2 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":963
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 *     vol0=(v0+TAU*v1)/float(v2)             # <<<<<<<<<<<<<<
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:
 */
  __pyx_t_9 = (__pyx_v_v0 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v1));
  if (unlikely(((double)__pyx_v_v2) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 963, __pyx_L1_error)
  }
  __pyx_v_vol0 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)((double)__pyx_v_v2)));

  /* "pyqcstrc/icosah/mics.pyx":964
 *     v0,v1,v2=obj_volume_6d(obj)
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         print('       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1))
 */
  __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":965
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":966
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:
 *         print('       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_initial_volume);
    __pyx_t_10 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_initial_volume);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_initial_volume);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__17);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__17);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__18);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __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, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
    __pyx_t_10 += __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__55);
    __pyx_t_10 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__55);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__55);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __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, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__19);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_2, 10, __pyx_kp_u__19);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 11, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __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, 966, __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/mics.pyx":965
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":968
 *         print('       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     #obj_surface=generator_surface(obj,verbose-1)
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":971
 * 
 *     #obj_surface=generator_surface(obj,verbose-1)
 *     obj_surface=generator_surface_1(obj,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     vertex_common=extract_common_vertex(obj,verbose-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface.diminfo[0].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_surface.diminfo[0].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_surface.diminfo[1].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_surface.diminfo[1].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_surface.diminfo[2].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_surface.diminfo[2].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_surface.diminfo[3].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_surface.diminfo[3].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 971, __pyx_L1_error)
  }
  __pyx_v_obj_surface = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":973
 *     obj_surface=generator_surface_1(obj,verbose-1)
 * 
 *     vertex_common=extract_common_vertex(obj,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     obj_surface_new=extract_surface_without_specific_vertx(obj_surface,vertex_common,verbose-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_extract_common_vertex(((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertex_common.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertex_common.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_vertex_common.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertex_common, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_vertex_common.diminfo[0].strides = __pyx_pybuffernd_vertex_common.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertex_common.diminfo[0].shape = __pyx_pybuffernd_vertex_common.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertex_common.diminfo[1].strides = __pyx_pybuffernd_vertex_common.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertex_common.diminfo[1].shape = __pyx_pybuffernd_vertex_common.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vertex_common.diminfo[2].strides = __pyx_pybuffernd_vertex_common.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vertex_common.diminfo[2].shape = __pyx_pybuffernd_vertex_common.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
  }
  __pyx_v_vertex_common = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":975
 *     vertex_common=extract_common_vertex(obj,verbose-1)
 * 
 *     obj_surface_new=extract_surface_without_specific_vertx(obj_surface,vertex_common,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     surface_list=surface_cleaner(obj_surface_new,num_cycle,verbose-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_extract_surface_without_specific_vertx(((PyArrayObject *)__pyx_v_obj_surface), ((PyArrayObject *)__pyx_v_vertex_common), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_surface_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface_new.diminfo[0].strides = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_surface_new.diminfo[0].shape = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_surface_new.diminfo[1].strides = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_surface_new.diminfo[1].shape = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_surface_new.diminfo[2].strides = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_surface_new.diminfo[2].shape = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_surface_new.diminfo[3].strides = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_surface_new.diminfo[3].shape = __pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 975, __pyx_L1_error)
  }
  __pyx_v_obj_surface_new = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":977
 *     obj_surface_new=extract_surface_without_specific_vertx(obj_surface,vertex_common,verbose-1)
 * 
 *     surface_list=surface_cleaner(obj_surface_new,num_cycle,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_4mics_surface_cleaner(((PyArrayObject *)__pyx_v_obj_surface_new), __pyx_v_num_cycle, (__pyx_v_verbose - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_surface_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":979
 *     surface_list=surface_cleaner(obj_surface_new,num_cycle,verbose-1)
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     if len(vertex_common)==1 and vertex_common.tolist()!=[[[0]]]:
 *         for i1 in range(len(surface_list)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 979, __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_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, 979, __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, 979, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 979, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":980
 * 
 *     tmp1a=np.array([0])
 *     if len(vertex_common)==1 and vertex_common.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         for i1 in range(len(surface_list)):
 *             tmp4a=surface_list[i1]
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_vertex_common)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 980, __pyx_L1_error)
  __pyx_t_17 = ((__pyx_t_10 == 1) != 0);
  if (__pyx_t_17) {
  } else {
    __pyx_t_1 = __pyx_t_17;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_vertex_common), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  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_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __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, 980, __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, 980, __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, 980, __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, 980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __pyx_t_17;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":981
 *     tmp1a=np.array([0])
 *     if len(vertex_common)==1 and vertex_common.tolist()!=[[[0]]]:
 *         for i1 in range(len(surface_list)):             # <<<<<<<<<<<<<<
 *             tmp4a=surface_list[i1]
 *             tmp1b=np.append(tmp4a,vertex_common[0])
 */
    if (unlikely(__pyx_v_surface_list == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 981, __pyx_L1_error)
    }
    __pyx_t_10 = PyList_GET_SIZE(__pyx_v_surface_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 981, __pyx_L1_error)
    __pyx_t_18 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_18; __pyx_t_12+=1) {
      __pyx_v_i1 = __pyx_t_12;

      /* "pyqcstrc/icosah/mics.pyx":982
 *     if len(vertex_common)==1 and vertex_common.tolist()!=[[[0]]]:
 *         for i1 in range(len(surface_list)):
 *             tmp4a=surface_list[i1]             # <<<<<<<<<<<<<<
 *             tmp1b=np.append(tmp4a,vertex_common[0])
 *             tmp3a=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
      if (unlikely(__pyx_v_surface_list == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 982, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_surface_list, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __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, 982, __pyx_L1_error)
      __pyx_t_19 = ((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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 982, __pyx_L1_error)
      }
      __pyx_t_19 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":983
 *         for i1 in range(len(surface_list)):
 *             tmp4a=surface_list[i1]
 *             tmp1b=np.append(tmp4a,vertex_common[0])             # <<<<<<<<<<<<<<
 *             tmp3a=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __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, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertex_common), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_20 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_20 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp4a), __pyx_t_4};
        __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, 983, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp4a), __pyx_t_4};
        __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, 983, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_21);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
        PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp4a));
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_21, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 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, 983, __pyx_L1_error)
      __pyx_t_16 = ((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_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 983, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":984
 *             tmp4a=surface_list[i1]
 *             tmp1b=np.append(tmp4a,vertex_common[0])
 *             tmp3a=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 984, __pyx_L1_error)
      __pyx_t_21 = __Pyx_PyInt_FromDouble((((double)__pyx_t_22) / 18.0)); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __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[4] = {__pyx_t_4, __pyx_t_21, __pyx_int_6, __pyx_int_3};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __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[4] = {__pyx_t_4, __pyx_t_21, __pyx_int_6, __pyx_int_3};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __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_21);
        PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_20, __pyx_t_21);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_20, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_20, __pyx_int_3);
        __pyx_t_21 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __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, 984, __pyx_L1_error)
      __pyx_t_23 = ((PyArrayObject *)__pyx_t_5);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
        __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_20 < 0)) __PYX_ERR(0, 984, __pyx_L1_error)
      }
      __pyx_t_23 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":985
 *             tmp1b=np.append(tmp4a,vertex_common[0])
 *             tmp3a=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if len(tmp1a)==1:
 */
      __pyx_t_5 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
        __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_5), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_20 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
      }
      __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":986
 *             tmp3a=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
      __pyx_t_5 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__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*)((PyArrayObject *)__pyx_t_5), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 986, __pyx_L1_error)
      }
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":987
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *             else:
 */
      __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 987, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_22 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":988
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp4a)
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 988, __pyx_L1_error)
        __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_22 * 72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_21 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(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_5 = (__pyx_t_21) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_21, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_5)) __PYX_ERR(0, 988, __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, 988, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_20 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":987
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *             else:
 */
        goto __pyx_L10;
      }

      /* "pyqcstrc/icosah/mics.pyx":990
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp4a)             # <<<<<<<<<<<<<<
 *         if len(tmp1a)!=1:
 *             if verbose>0:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 990, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __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_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_20 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 990, __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_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4a)};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 990, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 990, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_21);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_21, 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_21, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
          PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, ((PyObject *)__pyx_v_tmp4a));
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_21, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 990, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        }
        __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, 990, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_20 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;
      }
      __pyx_L10:;
    }

    /* "pyqcstrc/icosah/mics.pyx":991
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp4a)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('        number of tetrahedron in reduced obj, %d'%(int(len(tmp1a)/72)))
 */
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 991, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_10 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":992
 *                 tmp1a=np.append(tmp1a,tmp4a)
 *         if len(tmp1a)!=1:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        number of tetrahedron in reduced obj, %d'%(int(len(tmp1a)/72)))
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":993
 *         if len(tmp1a)!=1:
 *             if verbose>0:
 *                 print('        number of tetrahedron in reduced obj, %d'%(int(len(tmp1a)/72)))             # <<<<<<<<<<<<<<
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 */
        __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 993, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_number_of_tetrahedron_in_reduce, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 993, __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, 993, __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/mics.pyx":992
 *                 tmp1a=np.append(tmp1a,tmp4a)
 *         if len(tmp1a)!=1:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        number of tetrahedron in reduced obj, %d'%(int(len(tmp1a)/72)))
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":994
 *             if verbose>0:
 *                 print('        number of tetrahedron in reduced obj, %d'%(int(len(tmp1a)/72)))
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>0:
 */
      __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, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 994, __pyx_L1_error)
      __pyx_t_21 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_2 = NULL;
      __pyx_t_12 = 0;
      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_12 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_21, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_21, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __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_GIVEREF(__pyx_t_21);
        PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_t_21);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_12, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_12, __pyx_int_3);
        __pyx_t_21 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 994, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 994, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":991
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp4a)
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('        number of tetrahedron in reduced obj, %d'%(int(len(tmp1a)/72)))
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":996
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail, initial obj returned')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":997
 *         else:
 *             if verbose>0:
 *                 print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":996
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail, initial obj returned')
 *             else:
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/mics.pyx":1000
 *             else:
 *                 pass
 *                 return obj             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_obj));
        __pyx_r = ((PyArrayObject *)__pyx_v_obj);
        goto __pyx_L0;
      }
      __pyx_L13:;
    }

    /* "pyqcstrc/icosah/mics.pyx":980
 * 
 *     tmp1a=np.array([0])
 *     if len(vertex_common)==1 and vertex_common.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         for i1 in range(len(surface_list)):
 *             tmp4a=surface_list[i1]
 */
    goto __pyx_L5;
  }

  /* "pyqcstrc/icosah/mics.pyx":1002
 *                 return obj
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         fail, initial obj returned')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1003
 *     else:
 *         if verbose>0:
 *             print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1002
 *                 return obj
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         fail, initial obj returned')
 *         else:
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/mics.pyx":1005
 *             print('         fail, initial obj returned')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    /*else*/ {
    }
    __pyx_L14:;

    /* "pyqcstrc/icosah/mics.pyx":1006
 *         else:
 *             pass
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     #
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }
  __pyx_L5:;

  /* "pyqcstrc/icosah/mics.pyx":942
 *         return obj
 * 
 * cpdef np.ndarray simplification_obj_smart(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                         int num_cycle,
 *                                         int verbose):
 */

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_21);
  { 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_obj_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertex_common.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_smart", __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_obj_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface_new.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertex_common.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_surface_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_vertex_common);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_surface);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_surface_new);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_3simplification_obj_smart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_3simplification_obj_smart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  int __pyx_v_num_cycle;
  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("simplification_obj_smart (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_num_cycle,&__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_num_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_smart", 1, 3, 3, 1); __PYX_ERR(0, 942, __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("simplification_obj_smart", 1, 3, 3, 2); __PYX_ERR(0, 942, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "simplification_obj_smart") < 0)) __PYX_ERR(0, 942, __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_num_cycle = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 943, __pyx_L3_error)
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplification_obj_smart", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 942, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_smart", __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, 942, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_2simplification_obj_smart(__pyx_self, __pyx_v_obj, __pyx_v_num_cycle, __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_4mics_2simplification_obj_smart(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_smart", 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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 942, __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_4mics_simplification_obj_smart(((PyArrayObject *)__pyx_v_obj), __pyx_v_num_cycle, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __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_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_smart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1042
 *     """
 * 
 * cpdef np.ndarray simplification_obj_edges_using_parents(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj3,
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_5simplification_obj_edges_using_parents(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_using_parents(PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_num_cycle, int __pyx_v_verbose_level, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_num;
  int __pyx_v_counter1;
  long __pyx_v_v0;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  long __pyx_v_v4;
  long __pyx_v_v5;
  long __pyx_v_w0;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  long __pyx_v_w4;
  long __pyx_v_w5;
  double __pyx_v_vol0;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  double __pyx_v_vol3;
  double __pyx_v_vol4;
  PyObject *__pyx_v_skip_list = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_edge_new = 0;
  PyArrayObject *__pyx_v_removed_vertices = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_a1 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_a2 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_a3 = 0;
  PyArrayObject *__pyx_v_a4 = 0;
  PyArrayObject *__pyx_v_a5 = 0;
  PyArrayObject *__pyx_v_a6 = 0;
  PyArrayObject *__pyx_v_b4 = 0;
  PyArrayObject *__pyx_v_b5 = 0;
  PyArrayObject *__pyx_v_b6 = 0;
  PyArrayObject *__pyx_v_c4 = 0;
  PyArrayObject *__pyx_v_c5 = 0;
  PyArrayObject *__pyx_v_c6 = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp3c = 0;
  PyArrayObject *__pyx_v_obj_surface = 0;
  PyArrayObject *__pyx_v_obj_edge = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_tmp4c = 0;
  PyArrayObject *__pyx_v_tmp4d = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a1;
  __Pyx_Buffer __pyx_pybuffer_a1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a2;
  __Pyx_Buffer __pyx_pybuffer_a2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a3;
  __Pyx_Buffer __pyx_pybuffer_a3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a4;
  __Pyx_Buffer __pyx_pybuffer_a4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a5;
  __Pyx_Buffer __pyx_pybuffer_a5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a6;
  __Pyx_Buffer __pyx_pybuffer_a6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b4;
  __Pyx_Buffer __pyx_pybuffer_b4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b5;
  __Pyx_Buffer __pyx_pybuffer_b5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b6;
  __Pyx_Buffer __pyx_pybuffer_b6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c4;
  __Pyx_Buffer __pyx_pybuffer_c4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c5;
  __Pyx_Buffer __pyx_pybuffer_c5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c6;
  __Pyx_Buffer __pyx_pybuffer_c6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge_new;
  __Pyx_Buffer __pyx_pybuffer_edge_new;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_edge;
  __Pyx_Buffer __pyx_pybuffer_obj_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_surface;
  __Pyx_Buffer __pyx_pybuffer_obj_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_removed_vertices;
  __Pyx_Buffer __pyx_pybuffer_removed_vertices;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __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_tmp3c;
  __Pyx_Buffer __pyx_pybuffer_tmp3c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4c;
  __Pyx_Buffer __pyx_pybuffer_tmp4c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4d;
  __Pyx_Buffer __pyx_pybuffer_tmp4d;
  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;
  __pyx_t_5numpy_float64_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  PyArrayObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  int __pyx_t_25;
  int __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_t_28;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyArrayObject *__pyx_t_32 = NULL;
  PyArrayObject *__pyx_t_33 = NULL;
  PyArrayObject *__pyx_t_34 = NULL;
  PyArrayObject *__pyx_t_35 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_edges_using_parents", 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_edge_new.pybuffer.buf = NULL;
  __pyx_pybuffer_edge_new.refcount = 0;
  __pyx_pybuffernd_edge_new.data = NULL;
  __pyx_pybuffernd_edge_new.rcbuffer = &__pyx_pybuffer_edge_new;
  __pyx_pybuffer_removed_vertices.pybuffer.buf = NULL;
  __pyx_pybuffer_removed_vertices.refcount = 0;
  __pyx_pybuffernd_removed_vertices.data = NULL;
  __pyx_pybuffernd_removed_vertices.rcbuffer = &__pyx_pybuffer_removed_vertices;
  __pyx_pybuffer_a1.pybuffer.buf = NULL;
  __pyx_pybuffer_a1.refcount = 0;
  __pyx_pybuffernd_a1.data = NULL;
  __pyx_pybuffernd_a1.rcbuffer = &__pyx_pybuffer_a1;
  __pyx_pybuffer_a2.pybuffer.buf = NULL;
  __pyx_pybuffer_a2.refcount = 0;
  __pyx_pybuffernd_a2.data = NULL;
  __pyx_pybuffernd_a2.rcbuffer = &__pyx_pybuffer_a2;
  __pyx_pybuffer_a3.pybuffer.buf = NULL;
  __pyx_pybuffer_a3.refcount = 0;
  __pyx_pybuffernd_a3.data = NULL;
  __pyx_pybuffernd_a3.rcbuffer = &__pyx_pybuffer_a3;
  __pyx_pybuffer_a4.pybuffer.buf = NULL;
  __pyx_pybuffer_a4.refcount = 0;
  __pyx_pybuffernd_a4.data = NULL;
  __pyx_pybuffernd_a4.rcbuffer = &__pyx_pybuffer_a4;
  __pyx_pybuffer_a5.pybuffer.buf = NULL;
  __pyx_pybuffer_a5.refcount = 0;
  __pyx_pybuffernd_a5.data = NULL;
  __pyx_pybuffernd_a5.rcbuffer = &__pyx_pybuffer_a5;
  __pyx_pybuffer_a6.pybuffer.buf = NULL;
  __pyx_pybuffer_a6.refcount = 0;
  __pyx_pybuffernd_a6.data = NULL;
  __pyx_pybuffernd_a6.rcbuffer = &__pyx_pybuffer_a6;
  __pyx_pybuffer_b4.pybuffer.buf = NULL;
  __pyx_pybuffer_b4.refcount = 0;
  __pyx_pybuffernd_b4.data = NULL;
  __pyx_pybuffernd_b4.rcbuffer = &__pyx_pybuffer_b4;
  __pyx_pybuffer_b5.pybuffer.buf = NULL;
  __pyx_pybuffer_b5.refcount = 0;
  __pyx_pybuffernd_b5.data = NULL;
  __pyx_pybuffernd_b5.rcbuffer = &__pyx_pybuffer_b5;
  __pyx_pybuffer_b6.pybuffer.buf = NULL;
  __pyx_pybuffer_b6.refcount = 0;
  __pyx_pybuffernd_b6.data = NULL;
  __pyx_pybuffernd_b6.rcbuffer = &__pyx_pybuffer_b6;
  __pyx_pybuffer_c4.pybuffer.buf = NULL;
  __pyx_pybuffer_c4.refcount = 0;
  __pyx_pybuffernd_c4.data = NULL;
  __pyx_pybuffernd_c4.rcbuffer = &__pyx_pybuffer_c4;
  __pyx_pybuffer_c5.pybuffer.buf = NULL;
  __pyx_pybuffer_c5.refcount = 0;
  __pyx_pybuffernd_c5.data = NULL;
  __pyx_pybuffernd_c5.rcbuffer = &__pyx_pybuffer_c5;
  __pyx_pybuffer_c6.pybuffer.buf = NULL;
  __pyx_pybuffer_c6.refcount = 0;
  __pyx_pybuffernd_c6.data = NULL;
  __pyx_pybuffernd_c6.rcbuffer = &__pyx_pybuffer_c6;
  __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_tmp3c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3c.refcount = 0;
  __pyx_pybuffernd_tmp3c.data = NULL;
  __pyx_pybuffernd_tmp3c.rcbuffer = &__pyx_pybuffer_tmp3c;
  __pyx_pybuffer_obj_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_surface.refcount = 0;
  __pyx_pybuffernd_obj_surface.data = NULL;
  __pyx_pybuffernd_obj_surface.rcbuffer = &__pyx_pybuffer_obj_surface;
  __pyx_pybuffer_obj_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_edge.refcount = 0;
  __pyx_pybuffernd_obj_edge.data = NULL;
  __pyx_pybuffernd_obj_edge.rcbuffer = &__pyx_pybuffer_obj_edge;
  __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_tmp4c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4c.refcount = 0;
  __pyx_pybuffernd_tmp4c.data = NULL;
  __pyx_pybuffernd_tmp4c.rcbuffer = &__pyx_pybuffer_tmp4c;
  __pyx_pybuffer_tmp4d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4d.refcount = 0;
  __pyx_pybuffernd_tmp4d.data = NULL;
  __pyx_pybuffernd_tmp4d.rcbuffer = &__pyx_pybuffer_tmp4d;
  __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_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  __pyx_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1042, __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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1042, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1042, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":1058
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface,obj_edge,tmp4a,tmp4b,tmp4c,tmp4d
 * 
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_edges_using_parents()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1059
 * 
 *     if verbose_level>0:
 *         print('      simplification_obj_edges_using_parents()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1058
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface,obj_edge,tmp4a,tmp4b,tmp4c,tmp4d
 * 
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_edges_using_parents()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":1061
 *         print('      simplification_obj_edges_using_parents()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":1063
 *         pass
 * 
 *     v0,v1,v2=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __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, 1063, __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, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1063, __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, 1063, __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, 1063, __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, 1063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v0 = __pyx_t_6;
  __pyx_v_v1 = __pyx_t_7;
  __pyx_v_v2 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":1064
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 *     vol0=(v0+TAU*v1)/float(v2)             # <<<<<<<<<<<<<<
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:
 */
  __pyx_t_9 = (__pyx_v_v0 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v1));
  if (unlikely(((double)__pyx_v_v2) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 1064, __pyx_L1_error)
  }
  __pyx_v_vol0 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)((double)__pyx_v_v2)));

  /* "pyqcstrc/icosah/mics.pyx":1065
 *     v0,v1,v2=obj_volume_6d(obj)
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose_level>0:
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 */
  __pyx_v_vol4 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":1066
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1067
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_initial_volume_2);
    __pyx_t_10 += 25;
    __Pyx_GIVEREF(__pyx_kp_u_initial_volume_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_initial_volume_2);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__17);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__17);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__18);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __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, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
    __pyx_t_10 += __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__58);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__58);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__58);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __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, 1067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__19);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_2, 10, __pyx_kp_u__19);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 11, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __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, 1067, __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/mics.pyx":1066
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":1069
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     #obj_surface=generator_surface(obj,verbose_level-1)
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":1072
 * 
 *     #obj_surface=generator_surface(obj,verbose_level-1)
 *     obj_surface=generator_surface_1(obj,verbose_level-1)             # <<<<<<<<<<<<<<
 * 
 *     obj_edge=generator_edge(obj_surface,verbose_level-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface.diminfo[0].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_surface.diminfo[0].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_surface.diminfo[1].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_surface.diminfo[1].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_surface.diminfo[2].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_surface.diminfo[2].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_surface.diminfo[3].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_surface.diminfo[3].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1072, __pyx_L1_error)
  }
  __pyx_v_obj_surface = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1074
 *     obj_surface=generator_surface_1(obj,verbose_level-1)
 * 
 *     obj_edge=generator_edge(obj_surface,verbose_level-1)             # <<<<<<<<<<<<<<
 * 
 *     for i4 in range(num_cycle):
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_edge(((PyArrayObject *)__pyx_v_obj_surface), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_edge.diminfo[0].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_edge.diminfo[0].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_edge.diminfo[1].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_edge.diminfo[1].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_edge.diminfo[2].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_edge.diminfo[2].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_edge.diminfo[3].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_edge.diminfo[3].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1074, __pyx_L1_error)
  }
  __pyx_v_obj_edge = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1076
 *     obj_edge=generator_edge(obj_surface,verbose_level-1)
 * 
 *     for i4 in range(num_cycle):             # <<<<<<<<<<<<<<
 *         skip_list=[-1] # initialize
 * 
 */
  __pyx_t_12 = __pyx_v_num_cycle;
  __pyx_t_16 = __pyx_t_12;
  for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
    __pyx_v_i4 = __pyx_t_17;

    /* "pyqcstrc/icosah/mics.pyx":1077
 * 
 *     for i4 in range(num_cycle):
 *         skip_list=[-1] # initialize             # <<<<<<<<<<<<<<
 * 
 *         edge_new=np.array([0])
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_neg_1);
    __Pyx_GIVEREF(__pyx_int_neg_1);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
    __Pyx_XDECREF_SET(__pyx_v_skip_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1079
 *         skip_list=[-1] # initialize
 * 
 *         edge_new=np.array([0])             # <<<<<<<<<<<<<<
 *         removed_vertices=np.array([0])
 *         for i1 in range(len(obj_edge)-1):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __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_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, 1079, __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, 1079, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
      __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_19 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1079, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1080
 * 
 *         edge_new=np.array([0])
 *         removed_vertices=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __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, 1080, __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, 1080, __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_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_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, 1080, __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, 1080, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
      __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_19 < 0)) {
        PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_removed_vertices, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_removed_vertices.diminfo[0].strides = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_removed_vertices.diminfo[0].shape = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1080, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_XDECREF_SET(__pyx_v_removed_vertices, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1081
 *         edge_new=np.array([0])
 *         removed_vertices=np.array([0])
 *         for i1 in range(len(obj_edge)-1):             # <<<<<<<<<<<<<<
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:
 */
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1081, __pyx_L1_error)
    __pyx_t_20 = (__pyx_t_10 - 1);
    __pyx_t_10 = __pyx_t_20;
    for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_10; __pyx_t_19+=1) {
      __pyx_v_i1 = __pyx_t_19;

      /* "pyqcstrc/icosah/mics.pyx":1082
 *         removed_vertices=np.array([0])
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):             # <<<<<<<<<<<<<<
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:
 */
      __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1082, __pyx_L1_error)
      __pyx_t_22 = __pyx_t_21;
      for (__pyx_t_23 = __pyx_v_i1; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_i2 = __pyx_t_23;

        /* "pyqcstrc/icosah/mics.pyx":1083
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                     if i1!=i3 and i2!=i3:
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 */
        __pyx_t_2 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_2); __pyx_t_24 = 0;
        for (;;) {
          if (__pyx_t_24 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_24); __Pyx_INCREF(__pyx_t_5); __pyx_t_24++; if (unlikely(0 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_24); __pyx_t_24++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1083, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __pyx_t_25 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_25 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_i3 = __pyx_t_25;

          /* "pyqcstrc/icosah/mics.pyx":1084
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:             # <<<<<<<<<<<<<<
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 */
          __pyx_t_26 = ((__pyx_v_i1 != __pyx_v_i3) != 0);
          if (__pyx_t_26) {
          } else {
            __pyx_t_1 = __pyx_t_26;
            goto __pyx_L14_bool_binop_done;
          }
          __pyx_t_26 = ((__pyx_v_i2 != __pyx_v_i3) != 0);
          __pyx_t_1 = __pyx_t_26;
          __pyx_L14_bool_binop_done:;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1086
 *                     if i1!=i3 and i2!=i3:
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)             # <<<<<<<<<<<<<<
 *                         if len(tmp3c)!=1:
 *                             skip_list.append(i1)
 */
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __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, 1086, __pyx_L1_error)
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __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, 1086, __pyx_L1_error)
            __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_4), (__pyx_v_verbose_level - 1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp3c, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1087
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:             # <<<<<<<<<<<<<<
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 */
            __pyx_t_27 = PyObject_Length(((PyObject *)__pyx_v_tmp3c)); if (unlikely(__pyx_t_27 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1087, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_27 != 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1088
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:
 *                             skip_list.append(i1)             # <<<<<<<<<<<<<<
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_3); if (unlikely(__pyx_t_28 == ((int)-1))) __PYX_ERR(0, 1088, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1089
 *                         if len(tmp3c)!=1:
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)             # <<<<<<<<<<<<<<
 *                             if len(edge_new)==1:
 *                                 #edge_new=tmp1a
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_3); if (unlikely(__pyx_t_28 == ((int)-1))) __PYX_ERR(0, 1089, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1090
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                                 #edge_new=tmp1a
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])
 */
              __pyx_t_27 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_27 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1090, __pyx_L1_error)
              __pyx_t_1 = ((__pyx_t_27 == 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":1092
 *                             if len(edge_new)==1:
 *                                 #edge_new=tmp1a
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])             # <<<<<<<<<<<<<<
 *                             else:
 *                                 #edge_new=np.append(edge_new,tmp1a)
 */
                __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1092, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __pyx_t_30 = NULL;
                __pyx_t_25 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                  __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_5);
                  if (likely(__pyx_t_30)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_30);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_5, function);
                    __pyx_t_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_30, __pyx_t_4, __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_30, __pyx_t_4, __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                {
                  __pyx_t_31 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1092, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_31);
                  if (__pyx_t_30) {
                    __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_30); __pyx_t_30 = NULL;
                  }
                  __Pyx_GIVEREF(__pyx_t_4);
                  PyTuple_SET_ITEM(__pyx_t_31, 0+__pyx_t_25, __pyx_t_4);
                  __Pyx_GIVEREF(__pyx_t_29);
                  PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_25, __pyx_t_29);
                  __pyx_t_4 = 0;
                  __pyx_t_29 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                }
                __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, 1092, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1090
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                                 #edge_new=tmp1a
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])
 */
                goto __pyx_L17;
              }

              /* "pyqcstrc/icosah/mics.pyx":1095
 *                             else:
 *                                 #edge_new=np.append(edge_new,tmp1a)
 *                                 edge_new=np.append(edge_new,tmp3c[0])             # <<<<<<<<<<<<<<
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1095, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_29 = NULL;
                __pyx_t_25 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_31))) {
                  __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_31);
                  if (likely(__pyx_t_29)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31);
                    __Pyx_INCREF(__pyx_t_29);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_31, function);
                    __pyx_t_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_31)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_29, ((PyObject *)__pyx_v_edge_new), __pyx_t_5};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_31)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_29, ((PyObject *)__pyx_v_edge_new), __pyx_t_5};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else
                #endif
                {
                  __pyx_t_4 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  if (__pyx_t_29) {
                    __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_29); __pyx_t_29 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
                  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_25, ((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(__pyx_t_5);
                  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_25, __pyx_t_5);
                  __pyx_t_5 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                }
                __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1095, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1095, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1096
 *                                 #edge_new=np.append(edge_new,tmp1a)
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 *                                 edge_new=np.append(edge_new,tmp3c[1])             # <<<<<<<<<<<<<<
 *                             if len(removed_vertices)==1:
 *                                 #removed_vertices=tmp1b
 */
                __Pyx_GetModuleGlobalName(__pyx_t_31, __pyx_n_s_np); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1096, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1096, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __pyx_t_5 = NULL;
                __pyx_t_25 = 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_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_31};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_31};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                } else
                #endif
                {
                  __pyx_t_29 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1096, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_29);
                  if (__pyx_t_5) {
                    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_5); __pyx_t_5 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
                  PyTuple_SET_ITEM(__pyx_t_29, 0+__pyx_t_25, ((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(__pyx_t_31);
                  PyTuple_SET_ITEM(__pyx_t_29, 1+__pyx_t_25, __pyx_t_31);
                  __pyx_t_31 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                }
                __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, 1096, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;
              }
              __pyx_L17:;

              /* "pyqcstrc/icosah/mics.pyx":1097
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:             # <<<<<<<<<<<<<<
 *                                 #removed_vertices=tmp1b
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36
 */
              __pyx_t_27 = PyObject_Length(((PyObject *)__pyx_v_removed_vertices)); if (unlikely(__pyx_t_27 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1097, __pyx_L1_error)
              __pyx_t_1 = ((__pyx_t_27 == 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":1099
 *                             if len(removed_vertices)==1:
 *                                 #removed_vertices=tmp1b
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36             # <<<<<<<<<<<<<<
 *                             else:
 *                                 #removed_vertices=np.append(removed_vertices,tmp1b)
 */
                __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1099, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_29))) {
                  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_29);
                  if (likely(__pyx_t_4)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_29);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_29, function);
                  }
                }
                __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_29, __pyx_t_4, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_29, __pyx_int_18);
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1099, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_removed_vertices, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_removed_vertices.diminfo[0].strides = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_removed_vertices.diminfo[0].shape = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1099, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_removed_vertices, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1097
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:             # <<<<<<<<<<<<<<
 *                                 #removed_vertices=tmp1b
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36
 */
                goto __pyx_L18;
              }

              /* "pyqcstrc/icosah/mics.pyx":1102
 *                             else:
 *                                 #removed_vertices=np.append(removed_vertices,tmp1b)
 *                                 removed_vertices=np.append(removed_vertices,tmp3c[2])             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_29, __pyx_n_s_np); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1102, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1102, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __pyx_t_31 = NULL;
                __pyx_t_25 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_31)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_31);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                    __pyx_t_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_31, ((PyObject *)__pyx_v_removed_vertices), __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_31, ((PyObject *)__pyx_v_removed_vertices), __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                {
                  __pyx_t_5 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1102, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  if (__pyx_t_31) {
                    __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_31); __pyx_t_31 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_removed_vertices));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_removed_vertices));
                  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_25, ((PyObject *)__pyx_v_removed_vertices));
                  __Pyx_GIVEREF(__pyx_t_29);
                  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_25, __pyx_t_29);
                  __pyx_t_29 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1102, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_removed_vertices, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_removed_vertices.diminfo[0].strides = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_removed_vertices.diminfo[0].shape = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1102, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_removed_vertices, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;
              }
              __pyx_L18:;

              /* "pyqcstrc/icosah/mics.pyx":1103
 *                                 #removed_vertices=np.append(removed_vertices,tmp1b)
 *                                 removed_vertices=np.append(removed_vertices,tmp3c[2])
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L12_break;

              /* "pyqcstrc/icosah/mics.pyx":1087
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:             # <<<<<<<<<<<<<<
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":1105
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
            }

            /* "pyqcstrc/icosah/mics.pyx":1084
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:             # <<<<<<<<<<<<<<
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 */
            goto __pyx_L13;
          }

          /* "pyqcstrc/icosah/mics.pyx":1107
 *                             pass
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 * 
 *         for i1 in range(len(obj_edge)):
 */
          /*else*/ {
          }
          __pyx_L13:;

          /* "pyqcstrc/icosah/mics.pyx":1083
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                     if i1!=i3 and i2!=i3:
 *                         #tmp1a,tmp1b=two_segment_into_one(obj_edge[i1],obj_edge[i2])
 */
        }
        __pyx_L12_break:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":1109
 *                         pass
 * 
 *         for i1 in range(len(obj_edge)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i2 in skip_list:
 */
    __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1109, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_20;
    for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_10; __pyx_t_19+=1) {
      __pyx_v_i1 = __pyx_t_19;

      /* "pyqcstrc/icosah/mics.pyx":1110
 * 
 *         for i1 in range(len(obj_edge)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i2 in skip_list:
 *                 if i1==i2:
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1111
 *         for i1 in range(len(obj_edge)):
 *             counter1=0
 *             for i2 in skip_list:             # <<<<<<<<<<<<<<
 *                 if i1==i2:
 *                     counter1+=1
 */
      __pyx_t_2 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_2); __pyx_t_21 = 0;
      for (;;) {
        if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_21); __Pyx_INCREF(__pyx_t_3); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 1111, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_i2 = __pyx_t_23;

        /* "pyqcstrc/icosah/mics.pyx":1112
 *             counter1=0
 *             for i2 in skip_list:
 *                 if i1==i2:             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_1 = ((__pyx_v_i1 == __pyx_v_i2) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1113
 *             for i2 in skip_list:
 *                 if i1==i2:
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":1114
 *                 if i1==i2:
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L22_break;

          /* "pyqcstrc/icosah/mics.pyx":1112
 *             counter1=0
 *             for i2 in skip_list:
 *                 if i1==i2:             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":1116
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if len(edge_new)==1:
 */
        /*else*/ {
        }

        /* "pyqcstrc/icosah/mics.pyx":1111
 *         for i1 in range(len(obj_edge)):
 *             counter1=0
 *             for i2 in skip_list:             # <<<<<<<<<<<<<<
 *                 if i1==i2:
 *                     counter1+=1
 */
      }
      __pyx_L22_break:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1117
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(edge_new)==1:
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1118
 *                     pass
 *             if counter1==0:
 *                 if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 *                 else:
 */
        __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1118, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1119
 *             if counter1==0:
 *                 if len(edge_new)==1:
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36             # <<<<<<<<<<<<<<
 *                 else:
 *                     edge_new=np.append(edge_new,obj_edge[i1])
 */
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1119, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1119, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_36) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_36);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __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, 1119, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
            __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_23 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1118
 *                     pass
 *             if counter1==0:
 *                 if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 *                 else:
 */
          goto __pyx_L25;
        }

        /* "pyqcstrc/icosah/mics.pyx":1121
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 *                 else:
 *                     edge_new=np.append(edge_new,obj_edge[i1])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = NULL;
          __pyx_t_23 = 0;
          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_23 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_4};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_4};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          {
            __pyx_t_29 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1121, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_edge_new));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
            PyTuple_SET_ITEM(__pyx_t_29, 0+__pyx_t_23, ((PyObject *)__pyx_v_edge_new));
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_29, 1+__pyx_t_23, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
          }
          __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, 1121, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
            __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_23 < 0)) {
              PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L25:;

        /* "pyqcstrc/icosah/mics.pyx":1117
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(edge_new)==1:
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 */
        goto __pyx_L24;
      }

      /* "pyqcstrc/icosah/mics.pyx":1123
 *                     edge_new=np.append(edge_new,obj_edge[i1])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)
 */
      /*else*/ {
      }
      __pyx_L24:;
    }

    /* "pyqcstrc/icosah/mics.pyx":1124
 *             else:
 *                 pass
 *         if len(edge_new)!=1:             # <<<<<<<<<<<<<<
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:
 */
    __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1124, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_20 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1125
 *                 pass
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)             # <<<<<<<<<<<<<<
 *             if len(removed_vertices)!=1:
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1125, __pyx_L1_error)
      __pyx_v_num = __pyx_t_20;

      /* "pyqcstrc/icosah/mics.pyx":1126
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:             # <<<<<<<<<<<<<<
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_removed_vertices)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1126, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_20 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1127
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)             # <<<<<<<<<<<<<<
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 *                 edge_new=np.array([0])
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_edge_new), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1127, __pyx_L1_error)
        __pyx_t_29 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 36.0)); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1127, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_29);
        __pyx_t_4 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_29, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_29, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(4+__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_29);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_19, __pyx_t_29);
          __Pyx_INCREF(__pyx_int_2);
          __Pyx_GIVEREF(__pyx_int_2);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_19, __pyx_int_2);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_19, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_19, __pyx_int_3);
          __pyx_t_29 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __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, 1127, __pyx_L1_error)
        __pyx_t_32 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_edge.diminfo[0].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_edge.diminfo[0].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_edge.diminfo[1].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_edge.diminfo[1].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_edge.diminfo[2].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_edge.diminfo[2].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_edge.diminfo[3].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_edge.diminfo[3].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1127, __pyx_L1_error)
        }
        __pyx_t_32 = 0;
        __Pyx_DECREF_SET(__pyx_v_obj_edge, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1128
 *             if len(removed_vertices)!=1:
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)             # <<<<<<<<<<<<<<
 *                 edge_new=np.array([0])
 *                 # remove unnecessary line segments
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_removed_vertices), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_removed_vertices)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1128, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_29 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_29)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_29);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_29, __pyx_t_5, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 3+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 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_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_29, __pyx_t_5, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 3+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(3+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_29) {
            __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_29); __pyx_t_29 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_19, __pyx_t_5);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_19, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_19, __pyx_int_3);
          __pyx_t_5 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1128, __pyx_L1_error)
        __pyx_t_33 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1128, __pyx_L1_error)
        }
        __pyx_t_33 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1129
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 *                 edge_new=np.array([0])             # <<<<<<<<<<<<<<
 *                 # remove unnecessary line segments
 *                 for i1 in range(len(obj_edge)):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __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, 1129, __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, 1129, __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, 1129, __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, 1129, __pyx_L1_error)
        __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1129, __pyx_L1_error)
        }
        __pyx_t_18 = 0;
        __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1131
 *                 edge_new=np.array([0])
 *                 # remove unnecessary line segments
 *                 for i1 in range(len(obj_edge)):             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     for i2 in range(len(tmp3a)):
 */
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1131, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_20;
        for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_10; __pyx_t_19+=1) {
          __pyx_v_i1 = __pyx_t_19;

          /* "pyqcstrc/icosah/mics.pyx":1132
 *                 # remove unnecessary line segments
 *                 for i1 in range(len(obj_edge)):
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     for i2 in range(len(tmp3a)):
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1133
 *                 for i1 in range(len(obj_edge)):
 *                     counter1=0
 *                     for i2 in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 */
          __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1133, __pyx_L1_error)
          __pyx_t_22 = __pyx_t_21;
          for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
            __pyx_v_i2 = __pyx_t_23;

            /* "pyqcstrc/icosah/mics.pyx":1134
 *                     counter1=0
 *                     for i2 in range(len(tmp3a)):
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])             # <<<<<<<<<<<<<<
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __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, 1134, __pyx_L1_error)
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __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, 1134, __pyx_L1_error)
            __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __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, 1134, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_29, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_29, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_31, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            __pyx_t_30 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_29), ((PyArrayObject *)__pyx_t_31), 0); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (likely(__pyx_t_30 != Py_None)) {
              PyObject* sequence = __pyx_t_30;
              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, 1134, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_31 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_29 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 4); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 5); 
              __Pyx_INCREF(__pyx_t_31);
              __Pyx_INCREF(__pyx_t_29);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[6] = {&__pyx_t_31,&__pyx_t_29,&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2};
                for (i=0; i < 6; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1134, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1134, __pyx_L1_error)
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_31);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_31));
            __pyx_t_31 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_29);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_29));
            __pyx_t_29 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a4.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a4.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a4.rcbuffer->pybuffer, (PyObject*)__pyx_v_a4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a4.diminfo[0].strides = __pyx_pybuffernd_a4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a4.diminfo[0].shape = __pyx_pybuffernd_a4.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a4, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_4);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a5.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a5.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a5.rcbuffer->pybuffer, (PyObject*)__pyx_v_a5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a5.diminfo[0].strides = __pyx_pybuffernd_a5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a5.diminfo[0].shape = __pyx_pybuffernd_a5.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a5, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a6.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a6.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a6.rcbuffer->pybuffer, (PyObject*)__pyx_v_a6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a6.diminfo[0].strides = __pyx_pybuffernd_a6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a6.diminfo[0].shape = __pyx_pybuffernd_a6.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a6, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1135
 *                     for i2 in range(len(tmp3a)):
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])             # <<<<<<<<<<<<<<
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 */
            __pyx_t_30 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_30, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __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, 1135, __pyx_L1_error)
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __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, 1135, __pyx_L1_error)
            __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __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, 1135, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_29, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_29, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_31, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_30), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_29), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1135, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (likely(__pyx_t_31 != Py_None)) {
              PyObject* sequence = __pyx_t_31;
              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, 1135, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_29 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
              __pyx_t_30 = PyList_GET_ITEM(sequence, 5); 
              __Pyx_INCREF(__pyx_t_29);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_30);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[6] = {&__pyx_t_29,&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2,&__pyx_t_30};
                for (i=0; i < 6; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1135, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1135, __pyx_L1_error)
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_29);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_29));
            __pyx_t_29 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_4);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b4.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b4.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b4.rcbuffer->pybuffer, (PyObject*)__pyx_v_b4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b4.diminfo[0].strides = __pyx_pybuffernd_b4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b4.diminfo[0].shape = __pyx_pybuffernd_b4.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_b4, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b5.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b5.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b5.rcbuffer->pybuffer, (PyObject*)__pyx_v_b5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b5.diminfo[0].strides = __pyx_pybuffernd_b5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b5.diminfo[0].shape = __pyx_pybuffernd_b5.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_b5, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_30);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b6.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b6.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b6.rcbuffer->pybuffer, (PyObject*)__pyx_v_b6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b6.diminfo[0].strides = __pyx_pybuffernd_b6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b6.diminfo[0].shape = __pyx_pybuffernd_b6.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_b6, ((PyArrayObject *)__pyx_t_30));
            __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1136
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])             # <<<<<<<<<<<<<<
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 *                             counter1+=1
 */
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_31, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_31, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_31, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_31, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_31, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_30), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_29), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1136, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (likely(__pyx_t_31 != Py_None)) {
              PyObject* sequence = __pyx_t_31;
              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, 1136, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_29 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
              __pyx_t_30 = PyList_GET_ITEM(sequence, 5); 
              __Pyx_INCREF(__pyx_t_29);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_30);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[6] = {&__pyx_t_29,&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2,&__pyx_t_30};
                for (i=0; i < 6; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1136, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1136, __pyx_L1_error)
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_29);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_29));
            __pyx_t_29 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_4);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c4.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c4.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c4.rcbuffer->pybuffer, (PyObject*)__pyx_v_c4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c4.diminfo[0].strides = __pyx_pybuffernd_c4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c4.diminfo[0].shape = __pyx_pybuffernd_c4.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_c4, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c5.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c5.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c5.rcbuffer->pybuffer, (PyObject*)__pyx_v_c5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c5.diminfo[0].strides = __pyx_pybuffernd_c5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c5.diminfo[0].shape = __pyx_pybuffernd_c5.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_c5, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_30);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c6.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c6.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c6.rcbuffer->pybuffer, (PyObject*)__pyx_v_c6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c6.diminfo[0].strides = __pyx_pybuffernd_c6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c6.diminfo[0].shape = __pyx_pybuffernd_c6.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_c6, ((PyArrayObject *)__pyx_t_30));
            __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1137
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = PyObject_RichCompare(((PyObject *)__pyx_v_a4), ((PyObject *)__pyx_v_c4), Py_EQ); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __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_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_30) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_30);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!__pyx_t_26) {
              goto __pyx_L34_next_or;
            } else {
            }
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_a5), ((PyObject *)__pyx_v_c5), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_30, function);
              }
            }
            __pyx_t_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __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_31)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!__pyx_t_26) {
              goto __pyx_L34_next_or;
            } else {
            }
            __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = PyObject_RichCompare(((PyObject *)__pyx_v_a6), ((PyObject *)__pyx_v_c6), Py_EQ); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __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_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_30) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_30);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!__pyx_t_26) {
            } else {
              __pyx_t_1 = __pyx_t_26;
              goto __pyx_L33_bool_binop_done;
            }
            __pyx_L34_next_or:;
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_b4), ((PyObject *)__pyx_v_c4), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_30, function);
              }
            }
            __pyx_t_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __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_31)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (__pyx_t_26) {
            } else {
              __pyx_t_1 = __pyx_t_26;
              goto __pyx_L33_bool_binop_done;
            }
            __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = PyObject_RichCompare(((PyObject *)__pyx_v_b5), ((PyObject *)__pyx_v_c5), Py_EQ); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __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_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_30) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_30);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (__pyx_t_26) {
            } else {
              __pyx_t_1 = __pyx_t_26;
              goto __pyx_L33_bool_binop_done;
            }
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_b6), ((PyObject *)__pyx_v_c6), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_30, function);
              }
            }
            __pyx_t_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __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_31)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            __pyx_t_1 = __pyx_t_26;
            __pyx_L33_bool_binop_done:;
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1138
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 *                             counter1+=1             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_v_counter1 = (__pyx_v_counter1 + 1);

              /* "pyqcstrc/icosah/mics.pyx":1139
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 *                             counter1+=1
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L31_break;

              /* "pyqcstrc/icosah/mics.pyx":1137
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":1141
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         if len(edge_new)==1:
 */
            /*else*/ {
            }
          }
          __pyx_L31_break:;

          /* "pyqcstrc/icosah/mics.pyx":1142
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if len(edge_new)==1:
 *                             edge_new=obj_edge[i1].reshape(36)
 */
          __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1143
 *                             pass
 *                     if counter1==0:
 *                         if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                             edge_new=obj_edge[i1].reshape(36)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1143, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1144
 *                     if counter1==0:
 *                         if len(edge_new)==1:
 *                             edge_new=obj_edge[i1].reshape(36)             # <<<<<<<<<<<<<<
 *                         else:
 *                             edge_new=np.append(edge_new,obj_edge[i1])
 */
              __pyx_t_30 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1144, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              __pyx_t_30 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_30)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_30);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                }
              }
              __pyx_t_31 = (__pyx_t_30) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_30, __pyx_int_36) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_36);
              __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1144, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1144, __pyx_L1_error)
              __pyx_t_18 = ((PyArrayObject *)__pyx_t_31);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_23 < 0)) {
                  PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error)
              }
              __pyx_t_18 = 0;
              __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_31));
              __pyx_t_31 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1143
 *                             pass
 *                     if counter1==0:
 *                         if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                             edge_new=obj_edge[i1].reshape(36)
 *                         else:
 */
              goto __pyx_L40;
            }

            /* "pyqcstrc/icosah/mics.pyx":1146
 *                             edge_new=obj_edge[i1].reshape(36)
 *                         else:
 *                             edge_new=np.append(edge_new,obj_edge[i1])             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1146, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_4 = NULL;
              __pyx_t_23 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_30, function);
                  __pyx_t_23 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_30)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_edge_new), __pyx_t_2};
                __pyx_t_31 = __Pyx_PyFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1146, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_30)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_edge_new), __pyx_t_2};
                __pyx_t_31 = __Pyx_PyCFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1146, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __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_edge_new));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_23, ((PyObject *)__pyx_v_edge_new));
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_23, __pyx_t_2);
                __pyx_t_2 = 0;
                __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_3, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1146, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1146, __pyx_L1_error)
              __pyx_t_18 = ((PyArrayObject *)__pyx_t_31);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_23 < 0)) {
                  PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error)
              }
              __pyx_t_18 = 0;
              __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_31));
              __pyx_t_31 = 0;
            }
            __pyx_L40:;

            /* "pyqcstrc/icosah/mics.pyx":1142
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if len(edge_new)==1:
 *                             edge_new=obj_edge[i1].reshape(36)
 */
            goto __pyx_L39;
          }

          /* "pyqcstrc/icosah/mics.pyx":1148
 *                             edge_new=np.append(edge_new,obj_edge[i1])
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:
 */
          /*else*/ {
          }
          __pyx_L39:;
        }

        /* "pyqcstrc/icosah/mics.pyx":1149
 *                     else:
 *                         pass
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)             # <<<<<<<<<<<<<<
 *                 if verbose_level>0:
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 */
        __pyx_t_30 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_edge_new), __pyx_n_s_reshape); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1149, __pyx_L1_error)
        __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 36.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_30))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_30);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_30, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_30)) {
          PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_3, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_31 = __Pyx_PyFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1149, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_30)) {
          PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_3, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_31 = __Pyx_PyCFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1149, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(4+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1149, __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_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_19, __pyx_t_3);
          __Pyx_INCREF(__pyx_int_2);
          __Pyx_GIVEREF(__pyx_int_2);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_19, __pyx_int_2);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_19, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_19, __pyx_int_3);
          __pyx_t_3 = 0;
          __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_4, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1149, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1149, __pyx_L1_error)
        __pyx_t_32 = ((PyArrayObject *)__pyx_t_31);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1149, __pyx_L1_error)
        }
        __pyx_t_32 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_31));
        __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1150
 *                         pass
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1151
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_31 = PyTuple_New(6); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_31);
          __pyx_t_20 = 0;
          __pyx_t_11 = 127;
          __Pyx_INCREF(__pyx_kp_u_cycle_2);
          __pyx_t_20 += 13;
          __Pyx_GIVEREF(__pyx_kp_u_cycle_2);
          PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_kp_u_cycle_2);
          __pyx_t_30 = __Pyx_PyUnicode_From_int(__pyx_v_i4, 0, ' ', 'd'); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_t_30);
          __pyx_t_30 = 0;
          __Pyx_INCREF(__pyx_kp_u__59);
          __pyx_t_20 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__59);
          PyTuple_SET_ITEM(__pyx_t_31, 2, __pyx_kp_u__59);
          __pyx_t_30 = __Pyx_PyUnicode_From_int(__pyx_v_num, 0, ' ', 'd'); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          PyTuple_SET_ITEM(__pyx_t_31, 3, __pyx_t_30);
          __pyx_t_30 = 0;
          __Pyx_INCREF(__pyx_kp_u__42);
          __pyx_t_20 += 4;
          __Pyx_GIVEREF(__pyx_kp_u__42);
          PyTuple_SET_ITEM(__pyx_t_31, 4, __pyx_kp_u__42);
          __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1151, __pyx_L1_error)
          __pyx_t_30 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_10, 0, ' ', 'd'); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          PyTuple_SET_ITEM(__pyx_t_31, 5, __pyx_t_30);
          __pyx_t_30 = 0;
          __pyx_t_30 = __Pyx_PyUnicode_Join(__pyx_t_31, 6, __pyx_t_20, __pyx_t_11); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
          __pyx_t_31 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_30); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1150
 *                         pass
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 *                 else:
 */
          goto __pyx_L41;
        }

        /* "pyqcstrc/icosah/mics.pyx":1153
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 obj_edge=tmp4b
 *             else:
 */
        /*else*/ {
        }
        __pyx_L41:;

        /* "pyqcstrc/icosah/mics.pyx":1154
 *                 else:
 *                     pass
 *                 obj_edge=tmp4b             # <<<<<<<<<<<<<<
 *             else:
 *                 break
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_edge.diminfo[0].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_edge.diminfo[0].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_edge.diminfo[1].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_edge.diminfo[1].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_edge.diminfo[2].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_edge.diminfo[2].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_edge.diminfo[3].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_edge.diminfo[3].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1154, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
        __Pyx_DECREF_SET(__pyx_v_obj_edge, __pyx_v_tmp4b);

        /* "pyqcstrc/icosah/mics.pyx":1126
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:             # <<<<<<<<<<<<<<
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 */
        goto __pyx_L27;
      }

      /* "pyqcstrc/icosah/mics.pyx":1156
 *                 obj_edge=tmp4b
 *             else:
 *                 break             # <<<<<<<<<<<<<<
 *             if num==len(tmp4b):
 *                 break
 */
      /*else*/ {
        goto __pyx_L6_break;
      }
      __pyx_L27:;

      /* "pyqcstrc/icosah/mics.pyx":1157
 *             else:
 *                 break
 *             if num==len(tmp4b):             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1157, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_v_num == __pyx_t_20) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1158
 *                 break
 *             if num==len(tmp4b):
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L6_break;

        /* "pyqcstrc/icosah/mics.pyx":1157
 *             else:
 *                 break
 *             if num==len(tmp4b):             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1160
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }

      /* "pyqcstrc/icosah/mics.pyx":1124
 *             else:
 *                 pass
 *         if len(edge_new)!=1:             # <<<<<<<<<<<<<<
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:
 */
      goto __pyx_L26;
    }

    /* "pyqcstrc/icosah/mics.pyx":1162
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 */
    /*else*/ {
    }
    __pyx_L26:;
  }
  __pyx_L6_break:;

  /* "pyqcstrc/icosah/mics.pyx":1164
 *             pass
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)             # <<<<<<<<<<<<<<
 *     if len(tmp3b)>=4:
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 */
  __pyx_t_31 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space(((PyArrayObject *)__pyx_v_obj_edge), 0)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_31);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_31), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1164, __pyx_L1_error)
  }
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_31);
  __pyx_t_31 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1165
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 *     if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 */
  __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1165, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_20 >= 4) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1166
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 *     if len(tmp3b)>=4:
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)             # <<<<<<<<<<<<<<
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         vol1=(v3+TAU*v4)/v5
 */
    __pyx_t_31 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_31);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_31), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1166, __pyx_L1_error)
    }
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_31);
    __pyx_t_31 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1167
 *     if len(tmp3b)>=4:
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)
 */
    __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_31);
    if (likely(__pyx_t_31 != Py_None)) {
      PyObject* sequence = __pyx_t_31;
      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, 1167, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_30 = 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_30);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_30 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_30);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1167, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_30); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_v3 = __pyx_t_8;
    __pyx_v_v4 = __pyx_t_7;
    __pyx_v_v5 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":1168
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         vol1=(v3+TAU*v4)/v5             # <<<<<<<<<<<<<<
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:
 */
    __pyx_t_9 = (__pyx_v_v3 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v4));
    if (unlikely(__pyx_v_v5 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1168, __pyx_L1_error)
    }
    __pyx_v_vol1 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)__pyx_v_v5));

    /* "pyqcstrc/icosah/mics.pyx":1169
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *         if verbose_level>0:
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 */
    __pyx_v_vol3 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

    /* "pyqcstrc/icosah/mics.pyx":1170
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1171
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_31 = PyTuple_New(11); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __pyx_t_20 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_volume_of_reduced_obj);
      __pyx_t_20 += 32;
      __Pyx_GIVEREF(__pyx_kp_u_volume_of_reduced_obj);
      PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_kp_u_volume_of_reduced_obj);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_20 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_31, 2, __pyx_kp_u__17);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v4, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 3, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_20 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_31, 4, __pyx_kp_u__17);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v5, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 5, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_20 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_31, 6, __pyx_kp_u__18);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __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, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_31, 7, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__58);
      __pyx_t_20 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__58);
      PyTuple_SET_ITEM(__pyx_t_31, 8, __pyx_kp_u__58);
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11;
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 9, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__19);
      __pyx_t_20 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_31, 10, __pyx_kp_u__19);
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_31, 11, __pyx_t_20, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
      __pyx_t_31 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1170
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 *         else:
 */
      goto __pyx_L44;
    }

    /* "pyqcstrc/icosah/mics.pyx":1173
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 */
    /*else*/ {
    }
    __pyx_L44:;

    /* "pyqcstrc/icosah/mics.pyx":1175
 *             pass
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *             print('         succdeded')
 *             return tmp4a
 */
    __pyx_t_26 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
    if (!__pyx_t_26) {
      goto __pyx_L47_next_or;
    } else {
    }
    __pyx_t_26 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
    if (!__pyx_t_26) {
      goto __pyx_L47_next_or;
    } else {
    }
    __pyx_t_26 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
    if (!__pyx_t_26) {
    } else {
      __pyx_t_1 = __pyx_t_26;
      goto __pyx_L46_bool_binop_done;
    }
    __pyx_L47_next_or:;
    __pyx_t_26 = ((fabs((__pyx_v_vol3 - __pyx_v_vol4)) < (__pyx_v_vol3 * __pyx_v_8pyqcstrc_6icosah_4mics_TOL)) != 0);
    __pyx_t_1 = __pyx_t_26;
    __pyx_L46_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1176
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *             print('         succdeded')             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
      __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1177
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *             print('         succdeded')
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose_level>0:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":1175
 *             pass
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *             print('         succdeded')
 *             return tmp4a
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":1179
 *             return tmp4a
 *         else:
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *                 print('         try to get correct obj')
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1180
 *         else:
 *             if verbose_level>0:
 *                 print('         fail')             # <<<<<<<<<<<<<<
 *                 print('         try to get correct obj')
 *             else:
 */
        __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1180, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1181
 *             if verbose_level>0:
 *                 print('         fail')
 *                 print('         try to get correct obj')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1179
 *             return tmp4a
 *         else:
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *                 print('         try to get correct obj')
 */
        goto __pyx_L50;
      }

      /* "pyqcstrc/icosah/mics.pyx":1183
 *                 print('         try to get correct obj')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):
 */
      /*else*/ {
      }
      __pyx_L50:;

      /* "pyqcstrc/icosah/mics.pyx":1184
 *             else:
 *                 pass
 *             tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __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, 1184, __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, 1184, __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_30 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_30)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_30);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_31 = (__pyx_t_30) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_30, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1184, __pyx_L1_error)
      __pyx_t_35 = ((PyArrayObject *)__pyx_t_31);
      {
        __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1184, __pyx_L1_error)
      }
      __pyx_t_35 = 0;
      __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_31);
      __pyx_t_31 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1185
 *                 pass
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1185, __pyx_L1_error)
      __pyx_t_10 = __pyx_t_20;
      for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) {
        __pyx_v_i1 = __pyx_t_12;

        /* "pyqcstrc/icosah/mics.pyx":1186
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)
 */
        __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1186, __pyx_L1_error)
        __pyx_t_32 = ((PyArrayObject *)__pyx_t_31);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_16 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_16 < 0)) __PYX_ERR(0, 1186, __pyx_L1_error)
        }
        __pyx_t_32 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_31));
        __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1187
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *                 w0,w1,w2=obj_volume_6d(tmp4b)             # <<<<<<<<<<<<<<
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 */
        __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4b), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        if (likely(__pyx_t_31 != Py_None)) {
          PyObject* sequence = __pyx_t_31;
          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_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_30 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_30);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_30 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          #endif
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1187, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_30); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        __pyx_v_w0 = __pyx_t_6;
        __pyx_v_w1 = __pyx_t_7;
        __pyx_v_w2 = __pyx_t_8;

        /* "pyqcstrc/icosah/mics.pyx":1188
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)             # <<<<<<<<<<<<<<
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     tmp4c=intersection_using_tetrahedron_4(tmp4c,obj3,verbose_level-1,1)
 */
        __pyx_t_31 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose_level - 1), 1, 0)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
          __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_31), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_16 < 0)) {
            PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1188, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_31));
        __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1189
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     tmp4c=intersection_using_tetrahedron_4(tmp4c,obj3,verbose_level-1,1)
 *                 else:
 */
        __pyx_t_30 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_30))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_30);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_30, function);
          }
        }
        __pyx_t_31 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_30, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_30);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        __pyx_t_30 = PyList_New(1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyList_SET_ITEM(__pyx_t_30, 0, __pyx_int_0);
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_30);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_30);
        __pyx_t_30 = 0;
        __pyx_t_30 = PyList_New(1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_GIVEREF(__pyx_t_3);
        PyList_SET_ITEM(__pyx_t_30, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_30);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_30);
        __pyx_t_30 = 0;
        __pyx_t_30 = PyObject_RichCompare(__pyx_t_31, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_30); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1189, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1190
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     tmp4c=intersection_using_tetrahedron_4(tmp4c,obj3,verbose_level-1,1)             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_30 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(((PyArrayObject *)__pyx_v_tmp4c), ((PyArrayObject *)__pyx_v_obj3), (__pyx_v_verbose_level - 1), 1, 0)); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1190, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
            __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_30), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_16 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1190, __pyx_L1_error)
          }
          __Pyx_DECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_30));
          __pyx_t_30 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1189
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     tmp4c=intersection_using_tetrahedron_4(tmp4c,obj3,verbose_level-1,1)
 *                 else:
 */
          goto __pyx_L53;
        }

        /* "pyqcstrc/icosah/mics.pyx":1192
 *                     tmp4c=intersection_using_tetrahedron_4(tmp4c,obj3,verbose_level-1,1)
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 */
        /*else*/ {
        }
        __pyx_L53:;

        /* "pyqcstrc/icosah/mics.pyx":1193
 *                 else:
 *                     pass
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_31 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_31)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_31);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_30 = (__pyx_t_31) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_31) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
        if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __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_31 = PyList_New(1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_GIVEREF(__pyx_t_3);
        PyList_SET_ITEM(__pyx_t_31, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_31);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_31);
        __pyx_t_31 = 0;
        __pyx_t_31 = PyList_New(1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_GIVEREF(__pyx_t_3);
        PyList_SET_ITEM(__pyx_t_31, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_RichCompare(__pyx_t_30, __pyx_t_31, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1194
 *                     pass
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)             # <<<<<<<<<<<<<<
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:
 */
          __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4c), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __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, 1194, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_31 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_30 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_31);
            __Pyx_INCREF(__pyx_t_30);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_31 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1194, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_30 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1194, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1194, __pyx_L1_error)
          }
          __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_31); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
          __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_30); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
          __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_w3 = __pyx_t_8;
          __pyx_v_w4 = __pyx_t_7;
          __pyx_v_w5 = __pyx_t_6;

          /* "pyqcstrc/icosah/mics.pyx":1195
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4b.reshape(72)
 */
          __pyx_t_26 = ((__pyx_v_w0 == __pyx_v_w3) != 0);
          if (__pyx_t_26) {
          } else {
            __pyx_t_1 = __pyx_t_26;
            goto __pyx_L56_bool_binop_done;
          }
          __pyx_t_26 = ((__pyx_v_w1 == __pyx_v_w4) != 0);
          if (__pyx_t_26) {
          } else {
            __pyx_t_1 = __pyx_t_26;
            goto __pyx_L56_bool_binop_done;
          }
          __pyx_t_26 = ((__pyx_v_w2 == __pyx_v_w5) != 0);
          __pyx_t_1 = __pyx_t_26;
          __pyx_L56_bool_binop_done:;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1196
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4b.reshape(72)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1196, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1197
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4b.reshape(72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4b)
 */
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_30 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_4);
                if (likely(__pyx_t_30)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_30);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_4, function);
                }
              }
              __pyx_t_3 = (__pyx_t_30) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_30, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __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, 1197, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_3);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
              __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1196
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4b.reshape(72)
 *                         else:
 */
              goto __pyx_L59;
            }

            /* "pyqcstrc/icosah/mics.pyx":1199
 *                             tmp1a=tmp4b.reshape(72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4b)             # <<<<<<<<<<<<<<
 *                     else:
 *                         #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1199, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = NULL;
              __pyx_t_16 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_30, function);
                  __pyx_t_16 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_30)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4b)};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_30)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4b)};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              {
                __pyx_t_31 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1199, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_31, 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_31, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4b));
                PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_16, ((PyObject *)__pyx_v_tmp4b));
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
              }
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1199, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_3);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1199, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
              __pyx_t_3 = 0;
            }
            __pyx_L59:;

            /* "pyqcstrc/icosah/mics.pyx":1195
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4b.reshape(72)
 */
            goto __pyx_L55;
          }

          /* "pyqcstrc/icosah/mics.pyx":1202
 *                     else:
 *                         #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)             # <<<<<<<<<<<<<<
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:
 */
          /*else*/ {
            __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_tmp4c), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
              __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
              if (unlikely(__pyx_t_16 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4d.diminfo[0].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4d.diminfo[0].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4d.diminfo[1].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4d.diminfo[1].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4d.diminfo[2].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4d.diminfo[2].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4d.diminfo[3].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4d.diminfo[3].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[3];
              if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1202, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp4d, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1203
 *                         #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 */
            __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_tmp4d), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
              __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
              if (unlikely(__pyx_t_16 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
              if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1203, __pyx_L1_error)
            }
            __Pyx_DECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1204
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1204, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1205
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4c)
 */
              __pyx_t_30 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1205, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1205, __pyx_L1_error)
              __pyx_t_31 = PyInt_FromSsize_t((__pyx_t_21 * 72)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1205, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __pyx_t_4 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_30))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_30, function);
                }
              }
              __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_31) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __pyx_t_31);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1205, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_3);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1205, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
              __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1204
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 */
              goto __pyx_L60;
            }

            /* "pyqcstrc/icosah/mics.pyx":1207
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4c)             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1207, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_append); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1207, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              __pyx_t_30 = NULL;
              __pyx_t_16 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_31))) {
                __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_31);
                if (likely(__pyx_t_30)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31);
                  __Pyx_INCREF(__pyx_t_30);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_31, function);
                  __pyx_t_16 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_31)) {
                PyObject *__pyx_temp[3] = {__pyx_t_30, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4c)};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_31)) {
                PyObject *__pyx_temp[3] = {__pyx_t_30, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4c)};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              {
                __pyx_t_4 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_30) {
                  __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_30); __pyx_t_30 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4c));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4c));
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_16, ((PyObject *)__pyx_v_tmp4c));
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
              if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1207, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_3);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1207, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
              __pyx_t_3 = 0;
            }
            __pyx_L60:;
          }
          __pyx_L55:;

          /* "pyqcstrc/icosah/mics.pyx":1193
 *                 else:
 *                     pass
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 */
          goto __pyx_L54;
        }

        /* "pyqcstrc/icosah/mics.pyx":1209
 *                             tmp1a=np.append(tmp1a,tmp4c)
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 */
        /*else*/ {
        }
        __pyx_L54:;
      }

      /* "pyqcstrc/icosah/mics.pyx":1210
 *                 else:
 *                     pass
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 *             vol2=(v3+TAU*v4)/v5
 */
      __pyx_t_31 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1210, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 72.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_30 = NULL;
      __pyx_t_12 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_31))) {
        __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_31);
        if (likely(__pyx_t_30)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31);
          __Pyx_INCREF(__pyx_t_30);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_31, function);
          __pyx_t_12 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_31)) {
        PyObject *__pyx_temp[5] = {__pyx_t_30, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_31)) {
        PyObject *__pyx_temp[5] = {__pyx_t_30, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_30) {
          __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_30); __pyx_t_30 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_t_4);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_12, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_12, __pyx_int_3);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_2, NULL); 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;
      }
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 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_t_32 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_12 < 0)) __PYX_ERR(0, 1210, __pyx_L1_error)
      }
      __pyx_t_32 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1211
 *                     pass
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *             vol2=(v3+TAU*v4)/v5
 *             vol3=obj_volume_6d_numerical(tmp4a)
 */
      __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __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, 1211, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_31 = 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_31);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_31 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1211, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_31); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1211, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_v3 = __pyx_t_6;
      __pyx_v_v4 = __pyx_t_7;
      __pyx_v_v5 = __pyx_t_8;

      /* "pyqcstrc/icosah/mics.pyx":1212
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 *             vol2=(v3+TAU*v4)/v5             # <<<<<<<<<<<<<<
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             if verbose_level>0:
 */
      __pyx_t_9 = (__pyx_v_v3 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v4));
      if (unlikely(__pyx_v_v5 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1212, __pyx_L1_error)
      }
      __pyx_v_vol2 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)__pyx_v_v5));

      /* "pyqcstrc/icosah/mics.pyx":1213
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 *             vol2=(v3+TAU*v4)/v5
 *             vol3=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *             if verbose_level>0:
 *                 print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 */
      __pyx_v_vol3 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

      /* "pyqcstrc/icosah/mics.pyx":1214
 *             vol2=(v3+TAU*v4)/v5
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1215
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             if verbose_level>0:
 *                 print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_3 = PyTuple_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_20 = 0;
        __pyx_t_11 = 127;
        __Pyx_INCREF(__pyx_kp_u_volume_of_reduced_obj);
        __pyx_t_20 += 32;
        __Pyx_GIVEREF(__pyx_kp_u_volume_of_reduced_obj);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_volume_of_reduced_obj);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_20 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v4, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_20 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__17);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v5, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_INCREF(__pyx_kp_u__18);
        __pyx_t_20 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__18);
        __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __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, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_11;
        __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__58);
        __pyx_t_20 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__58);
        PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_kp_u__58);
        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __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, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
        __pyx_t_20 += __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__19);
        __pyx_t_20 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_kp_u__19);
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 11, __pyx_t_20, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __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, 1215, __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/mics.pyx":1214
 *             vol2=(v3+TAU*v4)/v5
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             else:
 */
        goto __pyx_L61;
      }

      /* "pyqcstrc/icosah/mics.pyx":1217
 *                 print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:
 */
      /*else*/ {
      }
      __pyx_L61:;

      /* "pyqcstrc/icosah/mics.pyx":1218
 *             else:
 *                 pass
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *                 if verbose_level>0:
 *                     print('         succdeded')
 */
      __pyx_t_26 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
      if (!__pyx_t_26) {
        goto __pyx_L64_next_or;
      } else {
      }
      __pyx_t_26 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
      if (!__pyx_t_26) {
        goto __pyx_L64_next_or;
      } else {
      }
      __pyx_t_26 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
      if (!__pyx_t_26) {
      } else {
        __pyx_t_1 = __pyx_t_26;
        goto __pyx_L63_bool_binop_done;
      }
      __pyx_L64_next_or:;
      __pyx_t_26 = ((fabs((__pyx_v_vol3 - __pyx_v_vol4)) < (__pyx_v_vol3 * __pyx_v_8pyqcstrc_6icosah_4mics_TOL)) != 0);
      __pyx_t_1 = __pyx_t_26;
      __pyx_L63_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1219
 *                 pass
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('         succdeded')
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1220
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:
 *                     print('         succdeded')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1219
 *                 pass
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('         succdeded')
 *                 else:
 */
          goto __pyx_L67;
        }

        /* "pyqcstrc/icosah/mics.pyx":1222
 *                     print('         succdeded')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return tmp4a
 *             else:
 */
        /*else*/ {
        }
        __pyx_L67:;

        /* "pyqcstrc/icosah/mics.pyx":1223
 *                 else:
 *                     pass
 *                 return tmp4a             # <<<<<<<<<<<<<<
 *             else:
 *                 #if abs(vol1-vol3)<1e-8:
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":1218
 *             else:
 *                 pass
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *                 if verbose_level>0:
 *                     print('         succdeded')
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1226
 *             else:
 *                 #if abs(vol1-vol3)<1e-8:
 *                 if abs(vol1-vol3)<vol1*TOL:             # <<<<<<<<<<<<<<
 *                     if verbose_level>0:
 *                         print('         succdeded')
 */
      /*else*/ {
        __pyx_t_1 = ((fabs((__pyx_v_vol1 - __pyx_v_vol3)) < (__pyx_v_vol1 * __pyx_v_8pyqcstrc_6icosah_4mics_TOL)) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1227
 *                 #if abs(vol1-vol3)<1e-8:
 *                 if abs(vol1-vol3)<vol1*TOL:
 *                     if verbose_level>0:             # <<<<<<<<<<<<<<
 *                         print('         succdeded')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1228
 *                 if abs(vol1-vol3)<vol1*TOL:
 *                     if verbose_level>0:
 *                         print('         succdeded')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1227
 *                 #if abs(vol1-vol3)<1e-8:
 *                 if abs(vol1-vol3)<vol1*TOL:
 *                     if verbose_level>0:             # <<<<<<<<<<<<<<
 *                         print('         succdeded')
 *                     else:
 */
            goto __pyx_L69;
          }

          /* "pyqcstrc/icosah/mics.pyx":1230
 *                         print('         succdeded')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return tmp4a
 *                 else:
 */
          /*else*/ {
          }
          __pyx_L69:;

          /* "pyqcstrc/icosah/mics.pyx":1231
 *                     else:
 *                         pass
 *                     return tmp4a             # <<<<<<<<<<<<<<
 *                 else:
 *                     if verbose_level>0:
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
          __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":1226
 *             else:
 *                 #if abs(vol1-vol3)<1e-8:
 *                 if abs(vol1-vol3)<vol1*TOL:             # <<<<<<<<<<<<<<
 *                     if verbose_level>0:
 *                         print('         succdeded')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":1233
 *                     return tmp4a
 *                 else:
 *                     if verbose_level>0:             # <<<<<<<<<<<<<<
 *                         print('         fail, initial obj returned')
 *                     else:
 */
        /*else*/ {
          __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1234
 *                 else:
 *                     if verbose_level>0:
 *                         print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1233
 *                     return tmp4a
 *                 else:
 *                     if verbose_level>0:             # <<<<<<<<<<<<<<
 *                         print('         fail, initial obj returned')
 *                     else:
 */
            goto __pyx_L70;
          }

          /* "pyqcstrc/icosah/mics.pyx":1236
 *                         print('         fail, initial obj returned')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return obj
 *                     #return tmp4a
 */
          /*else*/ {
          }
          __pyx_L70:;

          /* "pyqcstrc/icosah/mics.pyx":1237
 *                     else:
 *                         pass
 *                     return obj             # <<<<<<<<<<<<<<
 *                     #return tmp4a
 *                     #return np.array([0]).reshape(1,1,1,1)
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __Pyx_INCREF(((PyObject *)__pyx_v_obj));
          __pyx_r = ((PyArrayObject *)__pyx_v_obj);
          goto __pyx_L0;
        }
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":1165
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 *     if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1241
 *                     #return np.array([0]).reshape(1,1,1,1)
 *     else:
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         fail, initial obj returned')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1242
 *     else:
 *         if verbose_level>0:
 *             print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1241
 *                     #return np.array([0]).reshape(1,1,1,1)
 *     else:
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         fail, initial obj returned')
 *         else:
 */
      goto __pyx_L71;
    }

    /* "pyqcstrc/icosah/mics.pyx":1244
 *             print('         fail, initial obj returned')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    /*else*/ {
    }
    __pyx_L71:;

    /* "pyqcstrc/icosah/mics.pyx":1245
 *         else:
 *             pass
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * # NEW
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1042
 *     """
 * 
 * cpdef np.ndarray simplification_obj_edges_using_parents(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj3,
 */

  /* 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_29);
  __Pyx_XDECREF(__pyx_t_30);
  __Pyx_XDECREF(__pyx_t_31);
  { 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_a1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges_using_parents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_skip_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_edge_new);
  __Pyx_XDECREF((PyObject *)__pyx_v_removed_vertices);
  __Pyx_XDECREF((PyObject *)__pyx_v_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_a2);
  __Pyx_XDECREF((PyObject *)__pyx_v_a3);
  __Pyx_XDECREF((PyObject *)__pyx_v_a4);
  __Pyx_XDECREF((PyObject *)__pyx_v_a5);
  __Pyx_XDECREF((PyObject *)__pyx_v_a6);
  __Pyx_XDECREF((PyObject *)__pyx_v_b4);
  __Pyx_XDECREF((PyObject *)__pyx_v_b5);
  __Pyx_XDECREF((PyObject *)__pyx_v_b6);
  __Pyx_XDECREF((PyObject *)__pyx_v_c4);
  __Pyx_XDECREF((PyObject *)__pyx_v_c5);
  __Pyx_XDECREF((PyObject *)__pyx_v_c6);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_surface);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_edge);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4d);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_5simplification_obj_edges_using_parents(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_5simplification_obj_edges_using_parents(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  PyArrayObject *__pyx_v_obj3 = 0;
  int __pyx_v_num_cycle;
  int __pyx_v_verbose_level;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simplification_obj_edges_using_parents (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_obj2,&__pyx_n_s_obj3,&__pyx_n_s_num_cycle,&__pyx_n_s_verbose_level,0};
    PyObject* values[5] = {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  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_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_obj2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_using_parents", 1, 5, 5, 1); __PYX_ERR(0, 1042, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_using_parents", 1, 5, 5, 2); __PYX_ERR(0, 1042, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_using_parents", 1, 5, 5, 3); __PYX_ERR(0, 1042, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_using_parents", 1, 5, 5, 4); __PYX_ERR(0, 1042, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "simplification_obj_edges_using_parents") < 0)) __PYX_ERR(0, 1042, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      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);
    }
    __pyx_v_obj = ((PyArrayObject *)values[0]);
    __pyx_v_obj2 = ((PyArrayObject *)values[1]);
    __pyx_v_obj3 = ((PyArrayObject *)values[2]);
    __pyx_v_num_cycle = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1045, __pyx_L3_error)
    __pyx_v_verbose_level = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_verbose_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_using_parents", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1042, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges_using_parents", __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, 1042, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 1043, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj3), __pyx_ptype_5numpy_ndarray, 1, "obj3", 0))) __PYX_ERR(0, 1044, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_4simplification_obj_edges_using_parents(__pyx_self, __pyx_v_obj, __pyx_v_obj2, __pyx_v_obj3, __pyx_v_num_cycle, __pyx_v_verbose_level);

  /* 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_4mics_4simplification_obj_edges_using_parents(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_num_cycle, int __pyx_v_verbose_level) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  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("simplification_obj_edges_using_parents", 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_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  __pyx_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1042, __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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1042, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1042, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_using_parents(((PyArrayObject *)__pyx_v_obj), ((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_obj3), __pyx_v_num_cycle, __pyx_v_verbose_level, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __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_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges_using_parents", __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_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1248
 * 
 * # NEW
 * cpdef np.ndarray simplification_obj_edges_1(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                             int num_cycle,
 *                                             int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_7simplification_obj_edges_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_1(PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  long __pyx_v_v0;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  long __pyx_v_v4;
  long __pyx_v_v5;
  long __pyx_v_w0;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  long __pyx_v_w4;
  long __pyx_v_w5;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  PyObject *__pyx_v_surface_list = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_tmp4c = 0;
  double __pyx_v_vol3;
  __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_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4c;
  __Pyx_Buffer __pyx_pybuffer_tmp4c;
  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;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyArrayObject *__pyx_t_21 = NULL;
  int __pyx_t_22;
  double __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_edges_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_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_tmp4c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4c.refcount = 0;
  __pyx_pybuffernd_tmp4c.data = NULL;
  __pyx_pybuffernd_tmp4c.rcbuffer = &__pyx_pybuffer_tmp4c;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1248, __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/mics.pyx":1262
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a,tmp4b,tmp4c,tmp4d
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_edges_1()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":1262
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a,tmp4b,tmp4c,tmp4d
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_edges_1()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":1265
 *         print('      simplification_obj_edges_1()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":1267
 *         pass
 * 
 *     v0,v1,v2=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __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, 1267, __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, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1267, __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, 1267, __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, 1267, __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, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v0 = __pyx_t_6;
  __pyx_v_v1 = __pyx_t_7;
  __pyx_v_v2 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":1269
 *     v0,v1,v2=obj_volume_6d(obj)
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 */
  __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":1270
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1272
 *     if verbose>0:
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_initial_volume);
    __pyx_t_9 += 23;
    __Pyx_GIVEREF(__pyx_kp_u_initial_volume);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_initial_volume);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __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__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __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__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __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__18);
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __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, 1272, __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__19);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __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, 1272, __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/mics.pyx":1270
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         #print '       initial volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol1)
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":1274
 *         print('       initial volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":1276
 *         pass
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp4a=np.array([[[[0]]]])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __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, 1276, __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, 1276, __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_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_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, 1276, __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, 1276, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1276, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1277
 * 
 *     tmp1a=np.array([0])
 *     tmp4a=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1277, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1277, __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, 1277, __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, 1277, __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 = 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, 1277, __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, 1277, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_12 < 0)) __PYX_ERR(0, 1277, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1279
 *     tmp4a=np.array([[[[0]]]])
 * 
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     for i1 in range(len(surface_list)):
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_4mics_generate_obj_surface(((PyArrayObject *)__pyx_v_obj), __pyx_v_num_cycle, (__pyx_v_verbose - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_surface_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1281
 *     surface_list=generate_obj_surface(obj,num_cycle,verbose-1)
 * 
 *     for i1 in range(len(surface_list)):             # <<<<<<<<<<<<<<
 *         if len(tmp1a)==1:
 *             tmp4a=surface_list[i1]
 */
  if (unlikely(__pyx_v_surface_list == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1281, __pyx_L1_error)
  }
  __pyx_t_9 = PyList_GET_SIZE(__pyx_v_surface_list); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1281, __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/mics.pyx":1282
 * 
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *             tmp4a=surface_list[i1]
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 */
    __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1282, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_18 == 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1283
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:
 *             tmp4a=surface_list[i1]             # <<<<<<<<<<<<<<
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 *         else:
 */
      if (unlikely(__pyx_v_surface_list == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1283, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_surface_list, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __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, 1283, __pyx_L1_error)
      __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1283, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1284
 *         if len(tmp1a)==1:
 *             tmp4a=surface_list[i1]
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=np.append(tmp1a,surface_list[i1])
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __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, 1284, __pyx_L1_error)
      __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_18 * 36)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      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_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, 1284, __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, 1284, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1284, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1282
 * 
 *     for i1 in range(len(surface_list)):
 *         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *             tmp4a=surface_list[i1]
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 */
      goto __pyx_L7;
    }

    /* "pyqcstrc/icosah/mics.pyx":1286
 *             tmp1a=tmp4a.reshape(len(tmp4a)*36) # 2*6*3
 *         else:
 *             tmp1a=np.append(tmp1a,surface_list[i1])             # <<<<<<<<<<<<<<
 * 
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__pyx_v_surface_list == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1286, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_surface_list, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_19 = 0;
      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_19 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_20 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1286, __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_19, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      }
      __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, 1286, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1286, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;
    }
    __pyx_L7:;
  }

  /* "pyqcstrc/icosah/mics.pyx":1288
 *             tmp1a=np.append(tmp1a,surface_list[i1])
 * 
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1288, __pyx_L1_error)
  __pyx_t_20 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_4 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_20, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_20, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_t_20);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_12, __pyx_int_3);
    __pyx_t_20 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __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, 1288, __pyx_L1_error)
  __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1288, __pyx_L1_error)
  }
  __pyx_t_21 = 0;
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1289
 * 
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 * 
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __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_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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, 1289, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1290
 *     tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     v3,v4,v5=obj_volume_6d(tmp4a)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_12 < 0)) __PYX_ERR(0, 1290, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1292
 *     tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 * 
 *     v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol2=obj_volume_6d_numerical(tmp4a)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __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, 1292, __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_20 = PyList_GET_ITEM(sequence, 2); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_20);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_20 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1292, __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, 1292, __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, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __pyx_v_v3 = __pyx_t_8;
  __pyx_v_v4 = __pyx_t_7;
  __pyx_v_v5 = __pyx_t_6;

  /* "pyqcstrc/icosah/mics.pyx":1294
 *     v3,v4,v5=obj_volume_6d(tmp4a)
 *     #vol0=(v0+TAU*v1)/float(v2)
 *     vol2=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 * 
 *     #if (v3==v0 and v4==v1 and v5==v2) or abs(vol1-vol2)<TOL*vol2:
 */
  __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

  /* "pyqcstrc/icosah/mics.pyx":1298
 *     #if (v3==v0 and v4==v1 and v5==v2) or abs(vol1-vol2)<TOL*vol2:
 *     #if abs(vol1-vol2)/vol2<TOL:
 *     if v3==v0 and v4==v1 and v5==v2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             #print '       succdeded, simplified volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol2)
 */
  __pyx_t_22 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
  if (__pyx_t_22) {
  } else {
    __pyx_t_1 = __pyx_t_22;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_22 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
  if (__pyx_t_22) {
  } else {
    __pyx_t_1 = __pyx_t_22;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_22 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
  __pyx_t_1 = __pyx_t_22;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1299
 *     #if abs(vol1-vol2)/vol2<TOL:
 *     if v3==v0 and v4==v1 and v5==v2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '       succdeded, simplified volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol2)
 *             print('       succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1301
 *         if verbose>0:
 *             #print '       succdeded, simplified volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol2)
 *             print('       succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_succdeded_simplified_volume_2);
      __pyx_t_9 += 37;
      __Pyx_GIVEREF(__pyx_kp_u_succdeded_simplified_volume_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_succdeded_simplified_volume_2);
      __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_20);
      __pyx_t_20 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
      __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_20);
      __pyx_t_20 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
      __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_20);
      __pyx_t_20 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_9 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
      __pyx_t_20 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_20, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 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__19);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1301, __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, 1301, __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/mics.pyx":1299
 *     #if abs(vol1-vol2)/vol2<TOL:
 *     if v3==v0 and v4==v1 and v5==v2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '       succdeded, simplified volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol2)
 *             print('       succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 */
      goto __pyx_L12;
    }

    /* "pyqcstrc/icosah/mics.pyx":1303
 *             print('       succdeded, simplified volume: %d %d %d (%10.8f)'%(v0,v1,v2,vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4a
 *     else:
 */
    /*else*/ {
    }
    __pyx_L12:;

    /* "pyqcstrc/icosah/mics.pyx":1304
 *         else:
 *             pass
 *         return tmp4a             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose>0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":1298
 *     #if (v3==v0 and v4==v1 and v5==v2) or abs(vol1-vol2)<TOL*vol2:
 *     #if abs(vol1-vol2)/vol2<TOL:
 *     if v3==v0 and v4==v1 and v5==v2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             #print '       succdeded, simplified volume: %d %d %d (%10.8f) (%10.8f)'%(v0,v1,v2,vol0,vol2)
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1306
 *         return tmp4a
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         fail')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

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

      /* "pyqcstrc/icosah/mics.pyx":1306
 *         return tmp4a
 *     else:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         fail')
 *         else:
 */
      goto __pyx_L13;
    }

    /* "pyqcstrc/icosah/mics.pyx":1309
 *             print('         fail')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         vol3=0.0
 *         tmp1a=np.array([0])
 */
    /*else*/ {
    }
    __pyx_L13:;

    /* "pyqcstrc/icosah/mics.pyx":1310
 *         else:
 *             pass
 *         vol3=0.0             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp4a)):
 */
    __pyx_v_vol3 = 0.0;

    /* "pyqcstrc/icosah/mics.pyx":1311
 *             pass
 *         vol3=0.0
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp4a)):
 *             tmp4b=tmp4a[i1].reshape(1,4,6,3)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __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_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_20))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_20);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_20, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_20, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_20, __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, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1311, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
    {
      __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_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1311, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1312
 *         vol3=0.0
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *             tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *             w0,w1,w2=obj_volume_6d(tmp4b)
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1312, __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/mics.pyx":1313
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp4a)):
 *             tmp4b=tmp4a[i1].reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *             w0,w1,w2=obj_volume_6d(tmp4b)
 *             tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose-1,1) # option=1
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1313, __pyx_L1_error)
      __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1313, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1314
 *         for i1 in range(len(tmp4a)):
 *             tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *             w0,w1,w2=obj_volume_6d(tmp4b)             # <<<<<<<<<<<<<<
 *             tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose-1,1) # option=1
 *             #tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,0,verbose-1,1) # option=0
 */
      __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4b), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __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, 1314, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_20 = 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_20);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_20 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1314, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_w0 = __pyx_t_6;
      __pyx_v_w1 = __pyx_t_7;
      __pyx_v_w2 = __pyx_t_8;

      /* "pyqcstrc/icosah/mics.pyx":1315
 *             tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *             w0,w1,w2=obj_volume_6d(tmp4b)
 *             tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose-1,1) # option=1             # <<<<<<<<<<<<<<
 *             #tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,0,verbose-1,1) # option=0
 *             if tmp4c.tolist()!=[[[[0]]]]:
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose - 1), 1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
        __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
        if (unlikely(__pyx_t_19 < 0)) {
          PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1315, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1317
 *             tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose-1,1) # option=1
 *             #tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,0,verbose-1,1) # option=0
 *             if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 w3,w4,w5=obj_volume_6d(tmp4c)
 *                 #
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __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, 1317, __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, 1317, __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, 1317, __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 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1317, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1318
 *             #tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,0,verbose-1,1) # option=0
 *             if tmp4c.tolist()!=[[[[0]]]]:
 *                 w3,w4,w5=obj_volume_6d(tmp4c)             # <<<<<<<<<<<<<<
 *                 #
 *                 vol3+=obj_volume_6d_numerical(tmp4c)
 */
        __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4c), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __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, 1318, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_20 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_20);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_20 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1318, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_20);
          #endif
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1318, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1318, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1318, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1318, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __pyx_v_w3 = __pyx_t_8;
        __pyx_v_w4 = __pyx_t_7;
        __pyx_v_w5 = __pyx_t_6;

        /* "pyqcstrc/icosah/mics.pyx":1320
 *                 w3,w4,w5=obj_volume_6d(tmp4c)
 *                 #
 *                 vol3+=obj_volume_6d_numerical(tmp4c)             # <<<<<<<<<<<<<<
 *                 #
 *                 if w0==w3 and w1==w4 and w2==w5:
 */
        __pyx_v_vol3 = (__pyx_v_vol3 + __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4c), 0));

        /* "pyqcstrc/icosah/mics.pyx":1322
 *                 vol3+=obj_volume_6d_numerical(tmp4c)
 *                 #
 *                 if w0==w3 and w1==w4 and w2==w5:             # <<<<<<<<<<<<<<
 *                     if len(tmp1a)==1:
 *                         tmp1a=tmp4b.reshape(72)
 */
        __pyx_t_22 = ((__pyx_v_w0 == __pyx_v_w3) != 0);
        if (__pyx_t_22) {
        } else {
          __pyx_t_1 = __pyx_t_22;
          goto __pyx_L18_bool_binop_done;
        }
        __pyx_t_22 = ((__pyx_v_w1 == __pyx_v_w4) != 0);
        if (__pyx_t_22) {
        } else {
          __pyx_t_1 = __pyx_t_22;
          goto __pyx_L18_bool_binop_done;
        }
        __pyx_t_22 = ((__pyx_v_w2 == __pyx_v_w5) != 0);
        __pyx_t_1 = __pyx_t_22;
        __pyx_L18_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1323
 *                 #
 *                 if w0==w3 and w1==w4 and w2==w5:
 *                     if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                         tmp1a=tmp4b.reshape(72)
 *                     else:
 */
          __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1323, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_t_18 == 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1324
 *                 if w0==w3 and w1==w4 and w2==w5:
 *                     if len(tmp1a)==1:
 *                         tmp1a=tmp4b.reshape(72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4b)
 */
            __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1324, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_20);
            __pyx_t_2 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_20))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_20);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_20, function);
              }
            }
            __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_20, __pyx_t_2, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_int_72);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1324, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1324, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1323
 *                 #
 *                 if w0==w3 and w1==w4 and w2==w5:
 *                     if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                         tmp1a=tmp4b.reshape(72)
 *                     else:
 */
            goto __pyx_L21;
          }

          /* "pyqcstrc/icosah/mics.pyx":1326
 *                         tmp1a=tmp4b.reshape(72)
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4b)             # <<<<<<<<<<<<<<
 *                 else:
 *                     #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_n_s_np); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1326, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_20);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            __pyx_t_20 = NULL;
            __pyx_t_19 = 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_19 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[3] = {__pyx_t_20, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4b)};
              __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 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_20, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4b)};
              __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            {
              __pyx_t_5 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              if (__pyx_t_20) {
                __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_5, 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_5, 0+__pyx_t_19, ((PyObject *)__pyx_v_tmp1a));
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4b));
              PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_19, ((PyObject *)__pyx_v_tmp4b));
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 1326, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1326, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
          }
          __pyx_L21:;

          /* "pyqcstrc/icosah/mics.pyx":1322
 *                 vol3+=obj_volume_6d_numerical(tmp4c)
 *                 #
 *                 if w0==w3 and w1==w4 and w2==w5:             # <<<<<<<<<<<<<<
 *                     if len(tmp1a)==1:
 *                         tmp1a=tmp4b.reshape(72)
 */
          goto __pyx_L17;
        }

        /* "pyqcstrc/icosah/mics.pyx":1334
 *                     #tmp4d=object_subtraction_dev(tmp4b,tmp4c,obj,verbose)
 *                     #tmp4c=object_subtraction_dev(tmp4b,tmp4d,obj,verbose)
 *                     if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                         tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                     else:
 */
        /*else*/ {
          __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1334, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_t_18 == 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1335
 *                     #tmp4c=object_subtraction_dev(tmp4b,tmp4d,obj,verbose)
 *                     if len(tmp1a)==1:
 *                         tmp1a=tmp4c.reshape(len(tmp4c)*72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4c)
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1335, __pyx_L1_error)
            __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_18 * 72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_20 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(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_3 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_20, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_3)) __PYX_ERR(0, 1335, __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, 1335, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1335, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1334
 *                     #tmp4d=object_subtraction_dev(tmp4b,tmp4c,obj,verbose)
 *                     #tmp4c=object_subtraction_dev(tmp4b,tmp4d,obj,verbose)
 *                     if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                         tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                     else:
 */
            goto __pyx_L22;
          }

          /* "pyqcstrc/icosah/mics.pyx":1337
 *                         tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4c)             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_19 = 0;
            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_19 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4c)};
              __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4c)};
              __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_3);
            } else
            #endif
            {
              __pyx_t_20 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1337, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_20);
              if (__pyx_t_2) {
                __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_20, 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_20, 0+__pyx_t_19, ((PyObject *)__pyx_v_tmp1a));
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp4c));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4c));
              PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, ((PyObject *)__pyx_v_tmp4c));
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            }
            __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, 1337, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
          }
          __pyx_L22:;
        }
        __pyx_L17:;

        /* "pyqcstrc/icosah/mics.pyx":1317
 *             tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose-1,1) # option=1
 *             #tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,0,verbose-1,1) # option=0
 *             if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 w3,w4,w5=obj_volume_6d(tmp4c)
 *                 #
 */
        goto __pyx_L16;
      }

      /* "pyqcstrc/icosah/mics.pyx":1339
 *                         tmp1a=np.append(tmp1a,tmp4c)
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 */
      /*else*/ {
      }
      __pyx_L16:;
    }

    /* "pyqcstrc/icosah/mics.pyx":1340
 *             else:
 *                 pass
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         #vol2=(v3+TAU*v4)/float(v5)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1340, __pyx_L1_error)
    __pyx_t_20 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 72.0)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_2 = NULL;
    __pyx_t_12 = 0;
    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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_20, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_5)) {
      PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_20, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __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_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_t_20);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_12, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_12, __pyx_int_3);
      __pyx_t_20 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1340, __pyx_L1_error)
    __pyx_t_16 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_12 < 0)) __PYX_ERR(0, 1340, __pyx_L1_error)
    }
    __pyx_t_16 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1341
 *                 pass
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *         #vol2=(v3+TAU*v4)/float(v5)
 *         #vol3=obj_volume_6d_numerical(tmp4a)
 */
    __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __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, 1341, __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_20 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_20);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_20 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1341, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_20); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __pyx_v_v3 = __pyx_t_6;
    __pyx_v_v4 = __pyx_t_7;
    __pyx_v_v5 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":1344
 *         #vol2=(v3+TAU*v4)/float(v5)
 *         #vol3=obj_volume_6d_numerical(tmp4a)
 *         print('         volume of reduced obj: %d %d %d (%10.8f)'%(v3,v4,v5,vol3))             # <<<<<<<<<<<<<<
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol1)/vol3<TOL:
 *             print('         succdeded')
 */
    __pyx_t_3 = PyTuple_New(9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_volume_of_reduced_obj);
    __pyx_t_9 += 32;
    __Pyx_GIVEREF(__pyx_kp_u_volume_of_reduced_obj);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_volume_of_reduced_obj);
    __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_20);
    __pyx_t_20 = 0;
    __Pyx_INCREF(__pyx_kp_u__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
    __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v4, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_20);
    __pyx_t_20 = 0;
    __Pyx_INCREF(__pyx_kp_u__17);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__17);
    __pyx_t_20 = __Pyx_PyUnicode_From_long(__pyx_v_v5, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
    __Pyx_GIVEREF(__pyx_t_20);
    PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_20);
    __pyx_t_20 = 0;
    __Pyx_INCREF(__pyx_kp_u__18);
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__18);
    __pyx_t_20 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
    __pyx_t_4 = __Pyx_PyObject_Format(__pyx_t_20, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 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_3, 7, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u__19);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_kp_u__19);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_3, 9, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1344, __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, 1344, __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/mics.pyx":1345
 *         #vol3=obj_volume_6d_numerical(tmp4a)
 *         print('         volume of reduced obj: %d %d %d (%10.8f)'%(v3,v4,v5,vol3))
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol1)/vol3<TOL:             # <<<<<<<<<<<<<<
 *             print('         succdeded')
 *             return tmp4a
 */
    __pyx_t_22 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
    if (!__pyx_t_22) {
      goto __pyx_L25_next_or;
    } else {
    }
    __pyx_t_22 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
    if (!__pyx_t_22) {
      goto __pyx_L25_next_or;
    } else {
    }
    __pyx_t_22 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
    if (!__pyx_t_22) {
    } else {
      __pyx_t_1 = __pyx_t_22;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_L25_next_or:;
    __pyx_t_23 = fabs((__pyx_v_vol3 - __pyx_v_vol1));
    if (unlikely(__pyx_v_vol3 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1345, __pyx_L1_error)
    }
    __pyx_t_22 = (((__pyx_t_23 / __pyx_v_vol3) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
    __pyx_t_1 = __pyx_t_22;
    __pyx_L24_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1346
 *         print('         volume of reduced obj: %d %d %d (%10.8f)'%(v3,v4,v5,vol3))
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol1)/vol3<TOL:
 *             print('         succdeded')             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1347
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol1)/vol3<TOL:
 *             print('         succdeded')
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             if abs(vol1-vol2)<TOL:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":1345
 *         #vol3=obj_volume_6d_numerical(tmp4a)
 *         print('         volume of reduced obj: %d %d %d (%10.8f)'%(v3,v4,v5,vol3))
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol1)/vol3<TOL:             # <<<<<<<<<<<<<<
 *             print('         succdeded')
 *             return tmp4a
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":1349
 *             return tmp4a
 *         else:
 *             if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *                 print('         succdeded')
 *                 return tmp4a
 */
    /*else*/ {
      __pyx_t_1 = ((fabs((__pyx_v_vol1 - __pyx_v_vol2)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1350
 *         else:
 *             if abs(vol1-vol2)<TOL:
 *                 print('         succdeded')             # <<<<<<<<<<<<<<
 *                 return tmp4a
 *             else:
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1351
 *             if abs(vol1-vol2)<TOL:
 *                 print('         succdeded')
 *                 return tmp4a             # <<<<<<<<<<<<<<
 *             else:
 *                 print('         fail, initial obj returned')
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":1349
 *             return tmp4a
 *         else:
 *             if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *                 print('         succdeded')
 *                 return tmp4a
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1353
 *                 return tmp4a
 *             else:
 *                 print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *                 return obj
 * 
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1354
 *             else:
 *                 print('         fail, initial obj returned')
 *                 return obj             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray simplification_obj_edges(np.ndarray[DTYPE_int_t, ndim=4] obj, int num_cycle, int verbose_level):
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_obj));
        __pyx_r = ((PyArrayObject *)__pyx_v_obj);
        goto __pyx_L0;
      }
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":1248
 * 
 * # NEW
 * cpdef np.ndarray simplification_obj_edges_1(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                             int num_cycle,
 *                                             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_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_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges_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_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_surface_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_7simplification_obj_edges_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_7simplification_obj_edges_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  int __pyx_v_num_cycle;
  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("simplification_obj_edges_1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_num_cycle,&__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_num_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_1", 1, 3, 3, 1); __PYX_ERR(0, 1248, __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("simplification_obj_edges_1", 1, 3, 3, 2); __PYX_ERR(0, 1248, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "simplification_obj_edges_1") < 0)) __PYX_ERR(0, 1248, __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_num_cycle = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L3_error)
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplification_obj_edges_1", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1248, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges_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, 1248, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_6simplification_obj_edges_1(__pyx_self, __pyx_v_obj, __pyx_v_num_cycle, __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_4mics_6simplification_obj_edges_1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_edges_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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1248, __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_4mics_simplification_obj_edges_1(((PyArrayObject *)__pyx_v_obj), __pyx_v_num_cycle, __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __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_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1356
 *                 return obj
 * 
 * cpdef np.ndarray simplification_obj_edges(np.ndarray[DTYPE_int_t, ndim=4] obj, int num_cycle, int verbose_level):             # <<<<<<<<<<<<<<
 * 
 *     cdef int i1,i2,i3,i4,num,counter1
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_9simplification_obj_edges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges(PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose_level, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_num;
  int __pyx_v_counter1;
  long __pyx_v_v0;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  long __pyx_v_v4;
  long __pyx_v_v5;
  long __pyx_v_w0;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  long __pyx_v_w4;
  long __pyx_v_w5;
  double __pyx_v_vol0;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  double __pyx_v_vol3;
  double __pyx_v_vol4;
  PyObject *__pyx_v_skip_list = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_edge_new = 0;
  PyArrayObject *__pyx_v_removed_vertices = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_a1 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_a2 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_a3 = 0;
  PyArrayObject *__pyx_v_a4 = 0;
  PyArrayObject *__pyx_v_a5 = 0;
  PyArrayObject *__pyx_v_a6 = 0;
  PyArrayObject *__pyx_v_b4 = 0;
  PyArrayObject *__pyx_v_b5 = 0;
  PyArrayObject *__pyx_v_b6 = 0;
  PyArrayObject *__pyx_v_c4 = 0;
  PyArrayObject *__pyx_v_c5 = 0;
  PyArrayObject *__pyx_v_c6 = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp3c = 0;
  PyArrayObject *__pyx_v_obj_surface = 0;
  PyArrayObject *__pyx_v_obj_edge = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_tmp4c = 0;
  PyArrayObject *__pyx_v_tmp4d = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a1;
  __Pyx_Buffer __pyx_pybuffer_a1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a2;
  __Pyx_Buffer __pyx_pybuffer_a2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a3;
  __Pyx_Buffer __pyx_pybuffer_a3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a4;
  __Pyx_Buffer __pyx_pybuffer_a4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a5;
  __Pyx_Buffer __pyx_pybuffer_a5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a6;
  __Pyx_Buffer __pyx_pybuffer_a6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b4;
  __Pyx_Buffer __pyx_pybuffer_b4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b5;
  __Pyx_Buffer __pyx_pybuffer_b5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_b6;
  __Pyx_Buffer __pyx_pybuffer_b6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c4;
  __Pyx_Buffer __pyx_pybuffer_c4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c5;
  __Pyx_Buffer __pyx_pybuffer_c5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_c6;
  __Pyx_Buffer __pyx_pybuffer_c6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_edge_new;
  __Pyx_Buffer __pyx_pybuffer_edge_new;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_edge;
  __Pyx_Buffer __pyx_pybuffer_obj_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_surface;
  __Pyx_Buffer __pyx_pybuffer_obj_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_removed_vertices;
  __Pyx_Buffer __pyx_pybuffer_removed_vertices;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __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_tmp3c;
  __Pyx_Buffer __pyx_pybuffer_tmp3c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4c;
  __Pyx_Buffer __pyx_pybuffer_tmp4c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4d;
  __Pyx_Buffer __pyx_pybuffer_tmp4d;
  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;
  __pyx_t_5numpy_float64_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  PyArrayObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  int __pyx_t_25;
  int __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_t_28;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyArrayObject *__pyx_t_32 = NULL;
  PyArrayObject *__pyx_t_33 = NULL;
  PyArrayObject *__pyx_t_34 = NULL;
  PyArrayObject *__pyx_t_35 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_edges", 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_edge_new.pybuffer.buf = NULL;
  __pyx_pybuffer_edge_new.refcount = 0;
  __pyx_pybuffernd_edge_new.data = NULL;
  __pyx_pybuffernd_edge_new.rcbuffer = &__pyx_pybuffer_edge_new;
  __pyx_pybuffer_removed_vertices.pybuffer.buf = NULL;
  __pyx_pybuffer_removed_vertices.refcount = 0;
  __pyx_pybuffernd_removed_vertices.data = NULL;
  __pyx_pybuffernd_removed_vertices.rcbuffer = &__pyx_pybuffer_removed_vertices;
  __pyx_pybuffer_a1.pybuffer.buf = NULL;
  __pyx_pybuffer_a1.refcount = 0;
  __pyx_pybuffernd_a1.data = NULL;
  __pyx_pybuffernd_a1.rcbuffer = &__pyx_pybuffer_a1;
  __pyx_pybuffer_a2.pybuffer.buf = NULL;
  __pyx_pybuffer_a2.refcount = 0;
  __pyx_pybuffernd_a2.data = NULL;
  __pyx_pybuffernd_a2.rcbuffer = &__pyx_pybuffer_a2;
  __pyx_pybuffer_a3.pybuffer.buf = NULL;
  __pyx_pybuffer_a3.refcount = 0;
  __pyx_pybuffernd_a3.data = NULL;
  __pyx_pybuffernd_a3.rcbuffer = &__pyx_pybuffer_a3;
  __pyx_pybuffer_a4.pybuffer.buf = NULL;
  __pyx_pybuffer_a4.refcount = 0;
  __pyx_pybuffernd_a4.data = NULL;
  __pyx_pybuffernd_a4.rcbuffer = &__pyx_pybuffer_a4;
  __pyx_pybuffer_a5.pybuffer.buf = NULL;
  __pyx_pybuffer_a5.refcount = 0;
  __pyx_pybuffernd_a5.data = NULL;
  __pyx_pybuffernd_a5.rcbuffer = &__pyx_pybuffer_a5;
  __pyx_pybuffer_a6.pybuffer.buf = NULL;
  __pyx_pybuffer_a6.refcount = 0;
  __pyx_pybuffernd_a6.data = NULL;
  __pyx_pybuffernd_a6.rcbuffer = &__pyx_pybuffer_a6;
  __pyx_pybuffer_b4.pybuffer.buf = NULL;
  __pyx_pybuffer_b4.refcount = 0;
  __pyx_pybuffernd_b4.data = NULL;
  __pyx_pybuffernd_b4.rcbuffer = &__pyx_pybuffer_b4;
  __pyx_pybuffer_b5.pybuffer.buf = NULL;
  __pyx_pybuffer_b5.refcount = 0;
  __pyx_pybuffernd_b5.data = NULL;
  __pyx_pybuffernd_b5.rcbuffer = &__pyx_pybuffer_b5;
  __pyx_pybuffer_b6.pybuffer.buf = NULL;
  __pyx_pybuffer_b6.refcount = 0;
  __pyx_pybuffernd_b6.data = NULL;
  __pyx_pybuffernd_b6.rcbuffer = &__pyx_pybuffer_b6;
  __pyx_pybuffer_c4.pybuffer.buf = NULL;
  __pyx_pybuffer_c4.refcount = 0;
  __pyx_pybuffernd_c4.data = NULL;
  __pyx_pybuffernd_c4.rcbuffer = &__pyx_pybuffer_c4;
  __pyx_pybuffer_c5.pybuffer.buf = NULL;
  __pyx_pybuffer_c5.refcount = 0;
  __pyx_pybuffernd_c5.data = NULL;
  __pyx_pybuffernd_c5.rcbuffer = &__pyx_pybuffer_c5;
  __pyx_pybuffer_c6.pybuffer.buf = NULL;
  __pyx_pybuffer_c6.refcount = 0;
  __pyx_pybuffernd_c6.data = NULL;
  __pyx_pybuffernd_c6.rcbuffer = &__pyx_pybuffer_c6;
  __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_tmp3c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3c.refcount = 0;
  __pyx_pybuffernd_tmp3c.data = NULL;
  __pyx_pybuffernd_tmp3c.rcbuffer = &__pyx_pybuffer_tmp3c;
  __pyx_pybuffer_obj_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_surface.refcount = 0;
  __pyx_pybuffernd_obj_surface.data = NULL;
  __pyx_pybuffernd_obj_surface.rcbuffer = &__pyx_pybuffer_obj_surface;
  __pyx_pybuffer_obj_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_edge.refcount = 0;
  __pyx_pybuffernd_obj_edge.data = NULL;
  __pyx_pybuffernd_obj_edge.rcbuffer = &__pyx_pybuffer_obj_edge;
  __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_tmp4c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4c.refcount = 0;
  __pyx_pybuffernd_tmp4c.data = NULL;
  __pyx_pybuffernd_tmp4c.rcbuffer = &__pyx_pybuffer_tmp4c;
  __pyx_pybuffer_tmp4d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4d.refcount = 0;
  __pyx_pybuffernd_tmp4d.data = NULL;
  __pyx_pybuffernd_tmp4d.rcbuffer = &__pyx_pybuffer_tmp4d;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1356, __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/mics.pyx":1368
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface,obj_edge,tmp4a,tmp4b,tmp4c,tmp4d
 * 
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_edges()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1369
 * 
 *     if verbose_level>0:
 *         print('      simplification_obj_edges()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1368
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_surface,obj_edge,tmp4a,tmp4b,tmp4c,tmp4d
 * 
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('      simplification_obj_edges()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":1371
 *         print('      simplification_obj_edges()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":1373
 *         pass
 * 
 *     v0,v1,v2=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __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, 1373, __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, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1373, __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, 1373, __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, 1373, __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, 1373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_v0 = __pyx_t_6;
  __pyx_v_v1 = __pyx_t_7;
  __pyx_v_v2 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":1374
 * 
 *     v0,v1,v2=obj_volume_6d(obj)
 *     vol0=(v0+TAU*v1)/float(v2)             # <<<<<<<<<<<<<<
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:
 */
  __pyx_t_9 = (__pyx_v_v0 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v1));
  if (unlikely(((double)__pyx_v_v2) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(0, 1374, __pyx_L1_error)
  }
  __pyx_v_vol0 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)((double)__pyx_v_v2)));

  /* "pyqcstrc/icosah/mics.pyx":1375
 *     v0,v1,v2=obj_volume_6d(obj)
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose_level>0:
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 */
  __pyx_v_vol4 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":1376
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1377
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyTuple_New(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_initial_volume_2);
    __pyx_t_10 += 25;
    __Pyx_GIVEREF(__pyx_kp_u_initial_volume_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_initial_volume_2);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v0, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__17);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__17);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
    __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 += __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__18);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__18);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
    __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __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, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
    __pyx_t_10 += __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__58);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__58);
    PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__58);
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __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, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__19);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__19);
    PyTuple_SET_ITEM(__pyx_t_2, 10, __pyx_kp_u__19);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 11, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __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, 1377, __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/mics.pyx":1376
 *     vol0=(v0+TAU*v1)/float(v2)
 *     vol4=obj_volume_6d_numerical(obj)
 *     if verbose_level>0:             # <<<<<<<<<<<<<<
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":1379
 *         print('         initial volume: %d %d %d (%10.8f)(%10.8f)'%(v0,v1,v2,vol0,vol4))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     #obj_surface=generator_surface(obj)
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":1382
 * 
 *     #obj_surface=generator_surface(obj)
 *     obj_surface=generator_surface_1(obj,verbose_level-1)             # <<<<<<<<<<<<<<
 * 
 *     obj_edge=generator_edge(obj_surface,verbose_level-1)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_surface.diminfo[0].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_surface.diminfo[0].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_surface.diminfo[1].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_surface.diminfo[1].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_surface.diminfo[2].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_surface.diminfo[2].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_surface.diminfo[3].strides = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_surface.diminfo[3].shape = __pyx_pybuffernd_obj_surface.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error)
  }
  __pyx_v_obj_surface = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1384
 *     obj_surface=generator_surface_1(obj,verbose_level-1)
 * 
 *     obj_edge=generator_edge(obj_surface,verbose_level-1)             # <<<<<<<<<<<<<<
 * 
 *     for i4 in range(num_cycle):
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_edge(((PyArrayObject *)__pyx_v_obj_surface), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_edge.diminfo[0].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_edge.diminfo[0].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_edge.diminfo[1].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_edge.diminfo[1].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_edge.diminfo[2].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_edge.diminfo[2].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_edge.diminfo[3].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_edge.diminfo[3].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error)
  }
  __pyx_v_obj_edge = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1386
 *     obj_edge=generator_edge(obj_surface,verbose_level-1)
 * 
 *     for i4 in range(num_cycle):             # <<<<<<<<<<<<<<
 *         skip_list=[-1] # initialize
 * 
 */
  __pyx_t_12 = __pyx_v_num_cycle;
  __pyx_t_16 = __pyx_t_12;
  for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
    __pyx_v_i4 = __pyx_t_17;

    /* "pyqcstrc/icosah/mics.pyx":1387
 * 
 *     for i4 in range(num_cycle):
 *         skip_list=[-1] # initialize             # <<<<<<<<<<<<<<
 * 
 *         edge_new=np.array([0])
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_neg_1);
    __Pyx_GIVEREF(__pyx_int_neg_1);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
    __Pyx_XDECREF_SET(__pyx_v_skip_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1389
 *         skip_list=[-1] # initialize
 * 
 *         edge_new=np.array([0])             # <<<<<<<<<<<<<<
 *         removed_vertices=np.array([0])
 *         for i1 in range(len(obj_edge)-1):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __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_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, 1389, __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, 1389, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
      __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_19 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1389, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_XDECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1390
 * 
 *         edge_new=np.array([0])
 *         removed_vertices=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __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, 1390, __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, 1390, __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_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_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, 1390, __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, 1390, __pyx_L1_error)
    __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
      __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_19 < 0)) {
        PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_removed_vertices, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_removed_vertices.diminfo[0].strides = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_removed_vertices.diminfo[0].shape = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error)
    }
    __pyx_t_18 = 0;
    __Pyx_XDECREF_SET(__pyx_v_removed_vertices, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1391
 *         edge_new=np.array([0])
 *         removed_vertices=np.array([0])
 *         for i1 in range(len(obj_edge)-1):             # <<<<<<<<<<<<<<
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:
 */
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1391, __pyx_L1_error)
    __pyx_t_20 = (__pyx_t_10 - 1);
    __pyx_t_10 = __pyx_t_20;
    for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_10; __pyx_t_19+=1) {
      __pyx_v_i1 = __pyx_t_19;

      /* "pyqcstrc/icosah/mics.pyx":1392
 *         removed_vertices=np.array([0])
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):             # <<<<<<<<<<<<<<
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:
 */
      __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1392, __pyx_L1_error)
      __pyx_t_22 = __pyx_t_21;
      for (__pyx_t_23 = __pyx_v_i1; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
        __pyx_v_i2 = __pyx_t_23;

        /* "pyqcstrc/icosah/mics.pyx":1393
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                     if i1!=i3 and i2!=i3:
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 */
        __pyx_t_2 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_2); __pyx_t_24 = 0;
        for (;;) {
          if (__pyx_t_24 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_24); __Pyx_INCREF(__pyx_t_5); __pyx_t_24++; if (unlikely(0 < 0)) __PYX_ERR(0, 1393, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_24); __pyx_t_24++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __pyx_t_25 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_25 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1393, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_v_i3 = __pyx_t_25;

          /* "pyqcstrc/icosah/mics.pyx":1394
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:             # <<<<<<<<<<<<<<
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:
 */
          __pyx_t_26 = ((__pyx_v_i1 != __pyx_v_i3) != 0);
          if (__pyx_t_26) {
          } else {
            __pyx_t_1 = __pyx_t_26;
            goto __pyx_L14_bool_binop_done;
          }
          __pyx_t_26 = ((__pyx_v_i2 != __pyx_v_i3) != 0);
          __pyx_t_1 = __pyx_t_26;
          __pyx_L14_bool_binop_done:;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1395
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)             # <<<<<<<<<<<<<<
 *                         if len(tmp3c)!=1:
 *                             skip_list.append(i1)
 */
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1395, __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, 1395, __pyx_L1_error)
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __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, 1395, __pyx_L1_error)
            __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_two_segment_into_one(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_4), (__pyx_v_verbose_level - 1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1395, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp3c, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1396
 *                     if i1!=i3 and i2!=i3:
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:             # <<<<<<<<<<<<<<
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 */
            __pyx_t_27 = PyObject_Length(((PyObject *)__pyx_v_tmp3c)); if (unlikely(__pyx_t_27 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1396, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_27 != 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1397
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:
 *                             skip_list.append(i1)             # <<<<<<<<<<<<<<
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_3); if (unlikely(__pyx_t_28 == ((int)-1))) __PYX_ERR(0, 1397, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1398
 *                         if len(tmp3c)!=1:
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)             # <<<<<<<<<<<<<<
 *                             if len(edge_new)==1:
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1398, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_skip_list, __pyx_t_3); if (unlikely(__pyx_t_28 == ((int)-1))) __PYX_ERR(0, 1398, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1399
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])
 *                             else:
 */
              __pyx_t_27 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_27 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1399, __pyx_L1_error)
              __pyx_t_1 = ((__pyx_t_27 == 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":1400
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])             # <<<<<<<<<<<<<<
 *                             else:
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 */
                __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1400, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1400, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __pyx_t_30 = NULL;
                __pyx_t_25 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                  __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_5);
                  if (likely(__pyx_t_30)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_30);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_5, function);
                    __pyx_t_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_30, __pyx_t_4, __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_30, __pyx_t_4, __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                {
                  __pyx_t_31 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1400, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_31);
                  if (__pyx_t_30) {
                    __Pyx_GIVEREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_30); __pyx_t_30 = NULL;
                  }
                  __Pyx_GIVEREF(__pyx_t_4);
                  PyTuple_SET_ITEM(__pyx_t_31, 0+__pyx_t_25, __pyx_t_4);
                  __Pyx_GIVEREF(__pyx_t_29);
                  PyTuple_SET_ITEM(__pyx_t_31, 1+__pyx_t_25, __pyx_t_29);
                  __pyx_t_4 = 0;
                  __pyx_t_29 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                }
                __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, 1400, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1400, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1399
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 *                             if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])
 *                             else:
 */
                goto __pyx_L17;
              }

              /* "pyqcstrc/icosah/mics.pyx":1402
 *                                 edge_new=np.append(tmp3c[0],tmp3c[1])
 *                             else:
 *                                 edge_new=np.append(edge_new,tmp3c[0])             # <<<<<<<<<<<<<<
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1402, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1402, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1402, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_29 = NULL;
                __pyx_t_25 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_31))) {
                  __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_31);
                  if (likely(__pyx_t_29)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31);
                    __Pyx_INCREF(__pyx_t_29);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_31, function);
                    __pyx_t_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_31)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_29, ((PyObject *)__pyx_v_edge_new), __pyx_t_5};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_31)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_29, ((PyObject *)__pyx_v_edge_new), __pyx_t_5};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                } else
                #endif
                {
                  __pyx_t_4 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  if (__pyx_t_29) {
                    __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_29); __pyx_t_29 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
                  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_25, ((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(__pyx_t_5);
                  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_25, __pyx_t_5);
                  __pyx_t_5 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                }
                __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1402, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1403
 *                             else:
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 *                                 edge_new=np.append(edge_new,tmp3c[1])             # <<<<<<<<<<<<<<
 *                             if len(removed_vertices)==1:
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36
 */
                __Pyx_GetModuleGlobalName(__pyx_t_31, __pyx_n_s_np); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1403, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1403, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __pyx_t_5 = NULL;
                __pyx_t_25 = 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_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_31};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_31};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
                } else
                #endif
                {
                  __pyx_t_29 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1403, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_29);
                  if (__pyx_t_5) {
                    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_5); __pyx_t_5 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
                  PyTuple_SET_ITEM(__pyx_t_29, 0+__pyx_t_25, ((PyObject *)__pyx_v_edge_new));
                  __Pyx_GIVEREF(__pyx_t_31);
                  PyTuple_SET_ITEM(__pyx_t_29, 1+__pyx_t_25, __pyx_t_31);
                  __pyx_t_31 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                }
                __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, 1403, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1403, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;
              }
              __pyx_L17:;

              /* "pyqcstrc/icosah/mics.pyx":1404
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:             # <<<<<<<<<<<<<<
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36
 *                             else:
 */
              __pyx_t_27 = PyObject_Length(((PyObject *)__pyx_v_removed_vertices)); if (unlikely(__pyx_t_27 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1404, __pyx_L1_error)
              __pyx_t_1 = ((__pyx_t_27 == 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":1405
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36             # <<<<<<<<<<<<<<
 *                             else:
 *                                 removed_vertices=np.append(removed_vertices,tmp3c[2])
 */
                __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1405, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_29))) {
                  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_29);
                  if (likely(__pyx_t_4)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_29);
                    __Pyx_INCREF(__pyx_t_4);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_29, function);
                  }
                }
                __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_29, __pyx_t_4, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_29, __pyx_int_18);
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1405, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_removed_vertices, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_removed_vertices.diminfo[0].strides = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_removed_vertices.diminfo[0].shape = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1405, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_removed_vertices, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1404
 *                                 edge_new=np.append(edge_new,tmp3c[0])
 *                                 edge_new=np.append(edge_new,tmp3c[1])
 *                             if len(removed_vertices)==1:             # <<<<<<<<<<<<<<
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36
 *                             else:
 */
                goto __pyx_L18;
              }

              /* "pyqcstrc/icosah/mics.pyx":1407
 *                                 removed_vertices=tmp3c[2].reshape(18) # 6*3=36
 *                             else:
 *                                 removed_vertices=np.append(removed_vertices,tmp3c[2])             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_29, __pyx_n_s_np); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1407, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1407, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_29);
                __pyx_t_31 = NULL;
                __pyx_t_25 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
                  __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_4);
                  if (likely(__pyx_t_31)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                    __Pyx_INCREF(__pyx_t_31);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_4, function);
                    __pyx_t_25 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_31, ((PyObject *)__pyx_v_removed_vertices), __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_31, ((PyObject *)__pyx_v_removed_vertices), __pyx_t_29};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
                } else
                #endif
                {
                  __pyx_t_5 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  if (__pyx_t_31) {
                    __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_31); __pyx_t_31 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_removed_vertices));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_removed_vertices));
                  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_25, ((PyObject *)__pyx_v_removed_vertices));
                  __Pyx_GIVEREF(__pyx_t_29);
                  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_25, __pyx_t_29);
                  __pyx_t_29 = 0;
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                }
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1407, __pyx_L1_error)
                __pyx_t_18 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
                  __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_25 < 0)) {
                    PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_removed_vertices, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_removed_vertices.diminfo[0].strides = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_removed_vertices.diminfo[0].shape = __pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer.shape[0];
                  if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1407, __pyx_L1_error)
                }
                __pyx_t_18 = 0;
                __Pyx_DECREF_SET(__pyx_v_removed_vertices, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;
              }
              __pyx_L18:;

              /* "pyqcstrc/icosah/mics.pyx":1408
 *                             else:
 *                                 removed_vertices=np.append(removed_vertices,tmp3c[2])
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L12_break;

              /* "pyqcstrc/icosah/mics.pyx":1396
 *                     if i1!=i3 and i2!=i3:
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:             # <<<<<<<<<<<<<<
 *                             skip_list.append(i1)
 *                             skip_list.append(i2)
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":1410
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
            }

            /* "pyqcstrc/icosah/mics.pyx":1394
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:
 *                     if i1!=i3 and i2!=i3:             # <<<<<<<<<<<<<<
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 *                         if len(tmp3c)!=1:
 */
            goto __pyx_L13;
          }

          /* "pyqcstrc/icosah/mics.pyx":1412
 *                             pass
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 * 
 *         for i1 in range(len(obj_edge)):
 */
          /*else*/ {
          }
          __pyx_L13:;

          /* "pyqcstrc/icosah/mics.pyx":1393
 *         for i1 in range(len(obj_edge)-1):
 *             for i2 in range(i1,len(obj_edge)):
 *                 for i3 in skip_list:             # <<<<<<<<<<<<<<
 *                     if i1!=i3 and i2!=i3:
 *                         tmp3c=two_segment_into_one(obj_edge[i1],obj_edge[i2],verbose_level-1)
 */
        }
        __pyx_L12_break:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":1414
 *                         pass
 * 
 *         for i1 in range(len(obj_edge)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i2 in skip_list:
 */
    __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1414, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_20;
    for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_10; __pyx_t_19+=1) {
      __pyx_v_i1 = __pyx_t_19;

      /* "pyqcstrc/icosah/mics.pyx":1415
 * 
 *         for i1 in range(len(obj_edge)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i2 in skip_list:
 *                 if i1==i2:
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1416
 *         for i1 in range(len(obj_edge)):
 *             counter1=0
 *             for i2 in skip_list:             # <<<<<<<<<<<<<<
 *                 if i1==i2:
 *                     counter1+=1
 */
      __pyx_t_2 = __pyx_v_skip_list; __Pyx_INCREF(__pyx_t_2); __pyx_t_21 = 0;
      for (;;) {
        if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_21); __Pyx_INCREF(__pyx_t_3); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1416, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_i2 = __pyx_t_23;

        /* "pyqcstrc/icosah/mics.pyx":1417
 *             counter1=0
 *             for i2 in skip_list:
 *                 if i1==i2:             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_1 = ((__pyx_v_i1 == __pyx_v_i2) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1418
 *             for i2 in skip_list:
 *                 if i1==i2:
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":1419
 *                 if i1==i2:
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L22_break;

          /* "pyqcstrc/icosah/mics.pyx":1417
 *             counter1=0
 *             for i2 in skip_list:
 *                 if i1==i2:             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":1421
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if len(edge_new)==1:
 */
        /*else*/ {
        }

        /* "pyqcstrc/icosah/mics.pyx":1416
 *         for i1 in range(len(obj_edge)):
 *             counter1=0
 *             for i2 in skip_list:             # <<<<<<<<<<<<<<
 *                 if i1==i2:
 *                     counter1+=1
 */
      }
      __pyx_L22_break:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1422
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(edge_new)==1:
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1423
 *                     pass
 *             if counter1==0:
 *                 if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 *                 else:
 */
        __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1423, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1424
 *             if counter1==0:
 *                 if len(edge_new)==1:
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36             # <<<<<<<<<<<<<<
 *                 else:
 *                     edge_new=np.append(edge_new,obj_edge[i1])
 */
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1424, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_36) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_36);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __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, 1424, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
            __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_23 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1424, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1423
 *                     pass
 *             if counter1==0:
 *                 if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 *                 else:
 */
          goto __pyx_L25;
        }

        /* "pyqcstrc/icosah/mics.pyx":1426
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 *                 else:
 *                     edge_new=np.append(edge_new,obj_edge[i1])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = NULL;
          __pyx_t_23 = 0;
          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_23 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_4};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_edge_new), __pyx_t_4};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          {
            __pyx_t_29 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1426, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_5); __pyx_t_5 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_edge_new));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
            PyTuple_SET_ITEM(__pyx_t_29, 0+__pyx_t_23, ((PyObject *)__pyx_v_edge_new));
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_29, 1+__pyx_t_23, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
          }
          __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, 1426, __pyx_L1_error)
          __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
            __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_23 < 0)) {
              PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1426, __pyx_L1_error)
          }
          __pyx_t_18 = 0;
          __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L25:;

        /* "pyqcstrc/icosah/mics.pyx":1422
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(edge_new)==1:
 *                     edge_new=obj_edge[i1].reshape(36) # 2*6*3=36
 */
        goto __pyx_L24;
      }

      /* "pyqcstrc/icosah/mics.pyx":1428
 *                     edge_new=np.append(edge_new,obj_edge[i1])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)
 */
      /*else*/ {
      }
      __pyx_L24:;
    }

    /* "pyqcstrc/icosah/mics.pyx":1429
 *             else:
 *                 pass
 *         if len(edge_new)!=1:             # <<<<<<<<<<<<<<
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:
 */
    __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1429, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_20 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1430
 *                 pass
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)             # <<<<<<<<<<<<<<
 *             if len(removed_vertices)!=1:
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1430, __pyx_L1_error)
      __pyx_v_num = __pyx_t_20;

      /* "pyqcstrc/icosah/mics.pyx":1431
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:             # <<<<<<<<<<<<<<
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_removed_vertices)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1431, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_20 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1432
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)             # <<<<<<<<<<<<<<
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 *                 edge_new=np.array([0])
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_edge_new), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1432, __pyx_L1_error)
        __pyx_t_29 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 36.0)); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_29);
        __pyx_t_4 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_29, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_29, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(4+__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1432, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_29);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_19, __pyx_t_29);
          __Pyx_INCREF(__pyx_int_2);
          __Pyx_GIVEREF(__pyx_int_2);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_19, __pyx_int_2);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_19, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_19, __pyx_int_3);
          __pyx_t_29 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __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, 1432, __pyx_L1_error)
        __pyx_t_32 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_edge.diminfo[0].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_edge.diminfo[0].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_edge.diminfo[1].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_edge.diminfo[1].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_edge.diminfo[2].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_edge.diminfo[2].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_edge.diminfo[3].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_edge.diminfo[3].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1432, __pyx_L1_error)
        }
        __pyx_t_32 = 0;
        __Pyx_DECREF_SET(__pyx_v_obj_edge, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1433
 *             if len(removed_vertices)!=1:
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)             # <<<<<<<<<<<<<<
 *                 edge_new=np.array([0])
 *                 # remove unnecessary line segments
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_removed_vertices), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_removed_vertices)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1433, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_29 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_29 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_29)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_29);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_29, __pyx_t_5, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 3+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 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_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_29, __pyx_t_5, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 3+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(3+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1433, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_29) {
            __Pyx_GIVEREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_29); __pyx_t_29 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_19, __pyx_t_5);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_19, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_19, __pyx_int_3);
          __pyx_t_5 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1433, __pyx_L1_error)
        __pyx_t_33 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_33, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1433, __pyx_L1_error)
        }
        __pyx_t_33 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1434
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 *                 edge_new=np.array([0])             # <<<<<<<<<<<<<<
 *                 # remove unnecessary line segments
 *                 for i1 in range(len(obj_edge)):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __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, 1434, __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, 1434, __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, 1434, __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, 1434, __pyx_L1_error)
        __pyx_t_18 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1434, __pyx_L1_error)
        }
        __pyx_t_18 = 0;
        __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1436
 *                 edge_new=np.array([0])
 *                 # remove unnecessary line segments
 *                 for i1 in range(len(obj_edge)):             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     for i2 in range(len(tmp3a)):
 */
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj_edge)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1436, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_20;
        for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_10; __pyx_t_19+=1) {
          __pyx_v_i1 = __pyx_t_19;

          /* "pyqcstrc/icosah/mics.pyx":1437
 *                 # remove unnecessary line segments
 *                 for i1 in range(len(obj_edge)):
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     for i2 in range(len(tmp3a)):
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1438
 *                 for i1 in range(len(obj_edge)):
 *                     counter1=0
 *                     for i2 in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 */
          __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1438, __pyx_L1_error)
          __pyx_t_22 = __pyx_t_21;
          for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
            __pyx_v_i2 = __pyx_t_23;

            /* "pyqcstrc/icosah/mics.pyx":1439
 *                     counter1=0
 *                     for i2 in range(len(tmp3a)):
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])             # <<<<<<<<<<<<<<
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __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, 1439, __pyx_L1_error)
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __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, 1439, __pyx_L1_error)
            __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __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, 1439, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_29, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_29, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_31, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            __pyx_t_30 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_29), ((PyArrayObject *)__pyx_t_31), 0); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1439, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (likely(__pyx_t_30 != Py_None)) {
              PyObject* sequence = __pyx_t_30;
              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, 1439, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_31 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_29 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 4); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 5); 
              __Pyx_INCREF(__pyx_t_31);
              __Pyx_INCREF(__pyx_t_29);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[6] = {&__pyx_t_31,&__pyx_t_29,&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2};
                for (i=0; i < 6; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1439, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1439, __pyx_L1_error)
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_31);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_31));
            __pyx_t_31 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_29);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_29));
            __pyx_t_29 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a4.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a4.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a4.rcbuffer->pybuffer, (PyObject*)__pyx_v_a4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a4.diminfo[0].strides = __pyx_pybuffernd_a4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a4.diminfo[0].shape = __pyx_pybuffernd_a4.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a4, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_4);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a5.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a5.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a5.rcbuffer->pybuffer, (PyObject*)__pyx_v_a5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a5.diminfo[0].strides = __pyx_pybuffernd_a5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a5.diminfo[0].shape = __pyx_pybuffernd_a5.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a5, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a6.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a6.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a6.rcbuffer->pybuffer, (PyObject*)__pyx_v_a6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a6.diminfo[0].strides = __pyx_pybuffernd_a6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a6.diminfo[0].shape = __pyx_pybuffernd_a6.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1439, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_a6, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1440
 *                     for i2 in range(len(tmp3a)):
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])             # <<<<<<<<<<<<<<
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 */
            __pyx_t_30 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_30, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __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, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __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, 1440, __pyx_L1_error)
            __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __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, 1440, __pyx_L1_error)
            __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __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, 1440, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_29, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            __pyx_t_29 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_29, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_31, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_30), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_29), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1440, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (likely(__pyx_t_31 != Py_None)) {
              PyObject* sequence = __pyx_t_31;
              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, 1440, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_29 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
              __pyx_t_30 = PyList_GET_ITEM(sequence, 5); 
              __Pyx_INCREF(__pyx_t_29);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_30);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[6] = {&__pyx_t_29,&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2,&__pyx_t_30};
                for (i=0; i < 6; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1440, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1440, __pyx_L1_error)
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_29);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_29));
            __pyx_t_29 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_4);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b4.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b4.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b4.rcbuffer->pybuffer, (PyObject*)__pyx_v_b4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b4.diminfo[0].strides = __pyx_pybuffernd_b4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b4.diminfo[0].shape = __pyx_pybuffernd_b4.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_b4, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b5.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b5.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b5.rcbuffer->pybuffer, (PyObject*)__pyx_v_b5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b5.diminfo[0].strides = __pyx_pybuffernd_b5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b5.diminfo[0].shape = __pyx_pybuffernd_b5.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_b5, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_30);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b6.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b6.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_b6.rcbuffer->pybuffer, (PyObject*)__pyx_v_b6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_b6.diminfo[0].strides = __pyx_pybuffernd_b6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_b6.diminfo[0].shape = __pyx_pybuffernd_b6.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_b6, ((PyArrayObject *)__pyx_t_30));
            __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1441
 *                         a1,a2,a3,a4,a5,a6=projection(obj_edge[i1][0][0],obj_edge[i1][0][1],obj_edge[i1][0][2],obj_edge[i1][0][3],obj_edge[i1][0][4],obj_edge[i1][0][5])
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])             # <<<<<<<<<<<<<<
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 *                             counter1+=1
 */
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_31, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_31, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_31, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_31, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_31, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_29);
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_30), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_29), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1441, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
            if (likely(__pyx_t_31 != Py_None)) {
              PyObject* sequence = __pyx_t_31;
              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, 1441, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_29 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_2 = PyList_GET_ITEM(sequence, 4); 
              __pyx_t_30 = PyList_GET_ITEM(sequence, 5); 
              __Pyx_INCREF(__pyx_t_29);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_30);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[6] = {&__pyx_t_29,&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2,&__pyx_t_30};
                for (i=0; i < 6; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1441, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            } else {
              __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            if (!(likely(((__pyx_t_29) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_29, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1441, __pyx_L1_error)
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_29);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a1.rcbuffer->pybuffer, (PyObject*)__pyx_v_a1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a1.diminfo[0].strides = __pyx_pybuffernd_a1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a1.diminfo[0].shape = __pyx_pybuffernd_a1.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a1, ((PyArrayObject *)__pyx_t_29));
            __pyx_t_29 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a2.rcbuffer->pybuffer, (PyObject*)__pyx_v_a2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a2.diminfo[0].strides = __pyx_pybuffernd_a2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a2.diminfo[0].shape = __pyx_pybuffernd_a2.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a2, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a3.rcbuffer->pybuffer, (PyObject*)__pyx_v_a3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_a3.diminfo[0].strides = __pyx_pybuffernd_a3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a3.diminfo[0].shape = __pyx_pybuffernd_a3.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_DECREF_SET(__pyx_v_a3, ((PyArrayObject *)__pyx_t_3));
            __pyx_t_3 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_4);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c4.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c4.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c4.rcbuffer->pybuffer, (PyObject*)__pyx_v_c4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c4.diminfo[0].strides = __pyx_pybuffernd_c4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c4.diminfo[0].shape = __pyx_pybuffernd_c4.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_c4, ((PyArrayObject *)__pyx_t_4));
            __pyx_t_4 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c5.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c5.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c5.rcbuffer->pybuffer, (PyObject*)__pyx_v_c5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c5.diminfo[0].strides = __pyx_pybuffernd_c5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c5.diminfo[0].shape = __pyx_pybuffernd_c5.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_c5, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;
            __pyx_t_34 = ((PyArrayObject *)__pyx_t_30);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c6.rcbuffer->pybuffer);
              __pyx_t_25 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c6.rcbuffer->pybuffer, (PyObject*)__pyx_t_34, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_25 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_c6.rcbuffer->pybuffer, (PyObject*)__pyx_v_c6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_c6.diminfo[0].strides = __pyx_pybuffernd_c6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_c6.diminfo[0].shape = __pyx_pybuffernd_c6.rcbuffer->pybuffer.shape[0];
              if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1441, __pyx_L1_error)
            }
            __pyx_t_34 = 0;
            __Pyx_XDECREF_SET(__pyx_v_c6, ((PyArrayObject *)__pyx_t_30));
            __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1442
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = PyObject_RichCompare(((PyObject *)__pyx_v_a4), ((PyObject *)__pyx_v_c4), Py_EQ); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __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_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_30) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_30);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!__pyx_t_26) {
              goto __pyx_L34_next_or;
            } else {
            }
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_a5), ((PyObject *)__pyx_v_c5), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_30, function);
              }
            }
            __pyx_t_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __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_31)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!__pyx_t_26) {
              goto __pyx_L34_next_or;
            } else {
            }
            __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = PyObject_RichCompare(((PyObject *)__pyx_v_a6), ((PyObject *)__pyx_v_c6), Py_EQ); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __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_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_30) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_30);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (!__pyx_t_26) {
            } else {
              __pyx_t_1 = __pyx_t_26;
              goto __pyx_L33_bool_binop_done;
            }
            __pyx_L34_next_or:;
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_b4), ((PyObject *)__pyx_v_c4), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_30, function);
              }
            }
            __pyx_t_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __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_31)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (__pyx_t_26) {
            } else {
              __pyx_t_1 = __pyx_t_26;
              goto __pyx_L33_bool_binop_done;
            }
            __Pyx_GetModuleGlobalName(__pyx_t_30, __pyx_n_s_np); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_30 = PyObject_RichCompare(((PyObject *)__pyx_v_b5), ((PyObject *)__pyx_v_c5), Py_EQ); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __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_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_30) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_30);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            if (__pyx_t_26) {
            } else {
              __pyx_t_1 = __pyx_t_26;
              goto __pyx_L33_bool_binop_done;
            }
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_b6), ((PyObject *)__pyx_v_c6), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __pyx_t_4 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_30, function);
              }
            }
            __pyx_t_31 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_30, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_30, __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_31)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
            __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_26 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
            __pyx_t_1 = __pyx_t_26;
            __pyx_L33_bool_binop_done:;
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1443
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 *                             counter1+=1             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_v_counter1 = (__pyx_v_counter1 + 1);

              /* "pyqcstrc/icosah/mics.pyx":1444
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):
 *                             counter1+=1
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L31_break;

              /* "pyqcstrc/icosah/mics.pyx":1442
 *                         a1,a2,a3,b4,b5,b6=projection(obj_edge[i1][1][0],obj_edge[i1][1][1],obj_edge[i1][1][2],obj_edge[i1][1][3],obj_edge[i1][1][4],obj_edge[i1][1][5])
 *                         a1,a2,a3,c4,c5,c6=projection(tmp3a[i2][0],tmp3a[i2][1],tmp3a[i2][2],tmp3a[i2][3],tmp3a[i2][4],tmp3a[i2][5])
 *                         if (np.all(a4==c4) and np.all(a5==c5) and np.all(a6==c6)) or (np.all(b4==c4) and np.all(b5==c5) and np.all(b6==c6)):             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":1446
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         if len(edge_new)==1:
 */
            /*else*/ {
            }
          }
          __pyx_L31_break:;

          /* "pyqcstrc/icosah/mics.pyx":1447
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if len(edge_new)==1:
 *                             edge_new=obj_edge[i1].reshape(36)
 */
          __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1448
 *                             pass
 *                     if counter1==0:
 *                         if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                             edge_new=obj_edge[i1].reshape(36)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1448, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1449
 *                     if counter1==0:
 *                         if len(edge_new)==1:
 *                             edge_new=obj_edge[i1].reshape(36)             # <<<<<<<<<<<<<<
 *                         else:
 *                             edge_new=np.append(edge_new,obj_edge[i1])
 */
              __pyx_t_30 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1449, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              __pyx_t_30 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_30)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_30);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                }
              }
              __pyx_t_31 = (__pyx_t_30) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_30, __pyx_int_36) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_36);
              __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1449, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1449, __pyx_L1_error)
              __pyx_t_18 = ((PyArrayObject *)__pyx_t_31);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_23 < 0)) {
                  PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1449, __pyx_L1_error)
              }
              __pyx_t_18 = 0;
              __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_31));
              __pyx_t_31 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1448
 *                             pass
 *                     if counter1==0:
 *                         if len(edge_new)==1:             # <<<<<<<<<<<<<<
 *                             edge_new=obj_edge[i1].reshape(36)
 *                         else:
 */
              goto __pyx_L40;
            }

            /* "pyqcstrc/icosah/mics.pyx":1451
 *                             edge_new=obj_edge[i1].reshape(36)
 *                         else:
 *                             edge_new=np.append(edge_new,obj_edge[i1])             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1451, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj_edge), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_4 = NULL;
              __pyx_t_23 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_30))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_30);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_30, function);
                  __pyx_t_23 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_30)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_edge_new), __pyx_t_2};
                __pyx_t_31 = __Pyx_PyFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1451, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_30)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_edge_new), __pyx_t_2};
                __pyx_t_31 = __Pyx_PyCFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1451, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __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_edge_new));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_edge_new));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_23, ((PyObject *)__pyx_v_edge_new));
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_23, __pyx_t_2);
                __pyx_t_2 = 0;
                __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_3, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1451, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_31);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
              if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1451, __pyx_L1_error)
              __pyx_t_18 = ((PyArrayObject *)__pyx_t_31);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
                __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_23 < 0)) {
                  PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_edge_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_edge_new.diminfo[0].strides = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_edge_new.diminfo[0].shape = __pyx_pybuffernd_edge_new.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1451, __pyx_L1_error)
              }
              __pyx_t_18 = 0;
              __Pyx_DECREF_SET(__pyx_v_edge_new, ((PyArrayObject *)__pyx_t_31));
              __pyx_t_31 = 0;
            }
            __pyx_L40:;

            /* "pyqcstrc/icosah/mics.pyx":1447
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if len(edge_new)==1:
 *                             edge_new=obj_edge[i1].reshape(36)
 */
            goto __pyx_L39;
          }

          /* "pyqcstrc/icosah/mics.pyx":1453
 *                             edge_new=np.append(edge_new,obj_edge[i1])
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:
 */
          /*else*/ {
          }
          __pyx_L39:;
        }

        /* "pyqcstrc/icosah/mics.pyx":1454
 *                     else:
 *                         pass
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)             # <<<<<<<<<<<<<<
 *                 if verbose_level>0:
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 */
        __pyx_t_30 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_edge_new), __pyx_n_s_reshape); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_edge_new)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1454, __pyx_L1_error)
        __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 36.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_30))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_30);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_30, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_30)) {
          PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_3, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_31 = __Pyx_PyFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1454, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_30)) {
          PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_3, __pyx_int_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_31 = __Pyx_PyCFunction_FastCall(__pyx_t_30, __pyx_temp+1-__pyx_t_19, 4+__pyx_t_19); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1454, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(4+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1454, __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_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_19, __pyx_t_3);
          __Pyx_INCREF(__pyx_int_2);
          __Pyx_GIVEREF(__pyx_int_2);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_19, __pyx_int_2);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_19, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_19, __pyx_int_3);
          __pyx_t_3 = 0;
          __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_30, __pyx_t_4, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1454, __pyx_L1_error)
        __pyx_t_32 = ((PyArrayObject *)__pyx_t_31);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 1454, __pyx_L1_error)
        }
        __pyx_t_32 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_31));
        __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1455
 *                         pass
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1456
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_31 = PyTuple_New(6); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_31);
          __pyx_t_20 = 0;
          __pyx_t_11 = 127;
          __Pyx_INCREF(__pyx_kp_u_cycle_2);
          __pyx_t_20 += 13;
          __Pyx_GIVEREF(__pyx_kp_u_cycle_2);
          PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_kp_u_cycle_2);
          __pyx_t_30 = __Pyx_PyUnicode_From_int(__pyx_v_i4, 0, ' ', 'd'); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_t_30);
          __pyx_t_30 = 0;
          __Pyx_INCREF(__pyx_kp_u__59);
          __pyx_t_20 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__59);
          PyTuple_SET_ITEM(__pyx_t_31, 2, __pyx_kp_u__59);
          __pyx_t_30 = __Pyx_PyUnicode_From_int(__pyx_v_num, 0, ' ', 'd'); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          PyTuple_SET_ITEM(__pyx_t_31, 3, __pyx_t_30);
          __pyx_t_30 = 0;
          __Pyx_INCREF(__pyx_kp_u__42);
          __pyx_t_20 += 4;
          __Pyx_GIVEREF(__pyx_kp_u__42);
          PyTuple_SET_ITEM(__pyx_t_31, 4, __pyx_kp_u__42);
          __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1456, __pyx_L1_error)
          __pyx_t_30 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_10, 0, ' ', 'd'); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_30);
          __Pyx_GIVEREF(__pyx_t_30);
          PyTuple_SET_ITEM(__pyx_t_31, 5, __pyx_t_30);
          __pyx_t_30 = 0;
          __pyx_t_30 = __Pyx_PyUnicode_Join(__pyx_t_31, 6, __pyx_t_20, __pyx_t_11); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
          __pyx_t_31 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_30); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1456, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_31);
          __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1455
 *                         pass
 *                 tmp4b=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 *                 else:
 */
          goto __pyx_L41;
        }

        /* "pyqcstrc/icosah/mics.pyx":1458
 *                     print('       cycle %d, %d -> %d'%(i4,num,len(tmp4b)))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 obj_edge=tmp4b
 *             else:
 */
        /*else*/ {
        }
        __pyx_L41:;

        /* "pyqcstrc/icosah/mics.pyx":1459
 *                 else:
 *                     pass
 *                 obj_edge=tmp4b             # <<<<<<<<<<<<<<
 *             else:
 *                 break
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_edge, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_edge.diminfo[0].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_edge.diminfo[0].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_edge.diminfo[1].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_edge.diminfo[1].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_edge.diminfo[2].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_edge.diminfo[2].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_edge.diminfo[3].strides = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_edge.diminfo[3].shape = __pyx_pybuffernd_obj_edge.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 1459, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
        __Pyx_DECREF_SET(__pyx_v_obj_edge, __pyx_v_tmp4b);

        /* "pyqcstrc/icosah/mics.pyx":1431
 *         if len(edge_new)!=1:
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:             # <<<<<<<<<<<<<<
 *                 obj_edge=edge_new.reshape(int(len(edge_new)/36),2,6,3)
 *                 tmp3a=removed_vertices.reshape(int(len(removed_vertices)/18),6,3)
 */
        goto __pyx_L27;
      }

      /* "pyqcstrc/icosah/mics.pyx":1461
 *                 obj_edge=tmp4b
 *             else:
 *                 break             # <<<<<<<<<<<<<<
 *             if num==len(tmp4b):
 *                 break
 */
      /*else*/ {
        goto __pyx_L6_break;
      }
      __pyx_L27:;

      /* "pyqcstrc/icosah/mics.pyx":1462
 *             else:
 *                 break
 *             if num==len(tmp4b):             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1462, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_v_num == __pyx_t_20) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1463
 *                 break
 *             if num==len(tmp4b):
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L6_break;

        /* "pyqcstrc/icosah/mics.pyx":1462
 *             else:
 *                 break
 *             if num==len(tmp4b):             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1465
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }

      /* "pyqcstrc/icosah/mics.pyx":1429
 *             else:
 *                 pass
 *         if len(edge_new)!=1:             # <<<<<<<<<<<<<<
 *             num=len(obj_edge)
 *             if len(removed_vertices)!=1:
 */
      goto __pyx_L26;
    }

    /* "pyqcstrc/icosah/mics.pyx":1467
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 */
    /*else*/ {
    }
    __pyx_L26:;
  }
  __pyx_L6_break:;

  /* "pyqcstrc/icosah/mics.pyx":1469
 *             pass
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)             # <<<<<<<<<<<<<<
 *     if len(tmp3b)>=4:
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 */
  __pyx_t_31 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim4_in_perp_space(((PyArrayObject *)__pyx_v_obj_edge), 0)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_31);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_31), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1469, __pyx_L1_error)
  }
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_31);
  __pyx_t_31 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1470
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 *     if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 */
  __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1470, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_20 >= 4) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1471
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 *     if len(tmp3b)>=4:
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)             # <<<<<<<<<<<<<<
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         vol1=(v3+TAU*v4)/v5
 */
    __pyx_t_31 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_31);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_31), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1471, __pyx_L1_error)
    }
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_31);
    __pyx_t_31 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1472
 *     if len(tmp3b)>=4:
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)
 */
    __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_31);
    if (likely(__pyx_t_31 != Py_None)) {
      PyObject* sequence = __pyx_t_31;
      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, 1472, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_30 = 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_30);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_30 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_30);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1472, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_30); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_v3 = __pyx_t_8;
    __pyx_v_v4 = __pyx_t_7;
    __pyx_v_v5 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":1473
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         vol1=(v3+TAU*v4)/v5             # <<<<<<<<<<<<<<
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:
 */
    __pyx_t_9 = (__pyx_v_v3 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v4));
    if (unlikely(__pyx_v_v5 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 1473, __pyx_L1_error)
    }
    __pyx_v_vol1 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)__pyx_v_v5));

    /* "pyqcstrc/icosah/mics.pyx":1474
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *         if verbose_level>0:
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 */
    __pyx_v_vol3 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

    /* "pyqcstrc/icosah/mics.pyx":1475
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1476
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_31 = PyTuple_New(11); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __pyx_t_20 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_volume_of_reduced_obj);
      __pyx_t_20 += 32;
      __Pyx_GIVEREF(__pyx_kp_u_volume_of_reduced_obj);
      PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_kp_u_volume_of_reduced_obj);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_20 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_31, 2, __pyx_kp_u__17);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v4, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 3, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_20 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_31, 4, __pyx_kp_u__17);
      __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v5, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 5, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_20 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_31, 6, __pyx_kp_u__18);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __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, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_31, 7, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__58);
      __pyx_t_20 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__58);
      PyTuple_SET_ITEM(__pyx_t_31, 8, __pyx_kp_u__58);
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11;
      __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_31, 9, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u__19);
      __pyx_t_20 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_31, 10, __pyx_kp_u__19);
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_31, 11, __pyx_t_20, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
      __pyx_t_31 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1475
 *         vol1=(v3+TAU*v4)/v5
 *         vol3=obj_volume_6d_numerical(tmp4a)
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 *         else:
 */
      goto __pyx_L44;
    }

    /* "pyqcstrc/icosah/mics.pyx":1478
 *             print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol1,vol3))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 */
    /*else*/ {
    }
    __pyx_L44:;

    /* "pyqcstrc/icosah/mics.pyx":1480
 *             pass
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *             if verbose_level>0:
 *                 print('         succdeded')
 */
    __pyx_t_26 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
    if (!__pyx_t_26) {
      goto __pyx_L47_next_or;
    } else {
    }
    __pyx_t_26 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
    if (!__pyx_t_26) {
      goto __pyx_L47_next_or;
    } else {
    }
    __pyx_t_26 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
    if (!__pyx_t_26) {
    } else {
      __pyx_t_1 = __pyx_t_26;
      goto __pyx_L46_bool_binop_done;
    }
    __pyx_L47_next_or:;
    __pyx_t_26 = ((fabs((__pyx_v_vol3 - __pyx_v_vol4)) < (__pyx_v_vol3 * __pyx_v_8pyqcstrc_6icosah_4mics_TOL)) != 0);
    __pyx_t_1 = __pyx_t_26;
    __pyx_L46_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1481
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         succdeded')
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1482
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *             if verbose_level>0:
 *                 print('         succdeded')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1482, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1481
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         succdeded')
 *             else:
 */
        goto __pyx_L50;
      }

      /* "pyqcstrc/icosah/mics.pyx":1484
 *                 print('         succdeded')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
      /*else*/ {
      }
      __pyx_L50:;

      /* "pyqcstrc/icosah/mics.pyx":1485
 *             else:
 *                 pass
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose_level>0:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":1480
 *             pass
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *             if verbose_level>0:
 *                 print('         succdeded')
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":1487
 *             return tmp4a
 *         else:
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         fail, try to get correct obj')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1488
 *         else:
 *             if verbose_level>0:
 *                 print('         fail, try to get correct obj')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_31 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1487
 *             return tmp4a
 *         else:
 *             if verbose_level>0:             # <<<<<<<<<<<<<<
 *                 print('         fail, try to get correct obj')
 *             else:
 */
        goto __pyx_L51;
      }

      /* "pyqcstrc/icosah/mics.pyx":1490
 *                 print('         fail, try to get correct obj')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):
 */
      /*else*/ {
      }
      __pyx_L51:;

      /* "pyqcstrc/icosah/mics.pyx":1491
 *             else:
 *                 pass
 *             tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __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, 1491, __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, 1491, __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_30 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_30)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_30);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_31 = (__pyx_t_30) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_30, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_31);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1491, __pyx_L1_error)
      __pyx_t_35 = ((PyArrayObject *)__pyx_t_31);
      {
        __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1491, __pyx_L1_error)
      }
      __pyx_t_35 = 0;
      __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_31);
      __pyx_t_31 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1492
 *                 pass
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 */
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1492, __pyx_L1_error)
      __pyx_t_10 = __pyx_t_20;
      for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_10; __pyx_t_12+=1) {
        __pyx_v_i1 = __pyx_t_12;

        /* "pyqcstrc/icosah/mics.pyx":1493
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose_level-1,1)
 */
        __pyx_t_31 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        __pyx_t_31 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_31) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_31, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1493, __pyx_L1_error)
        __pyx_t_32 = ((PyArrayObject *)__pyx_t_31);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_16 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_16 < 0)) __PYX_ERR(0, 1493, __pyx_L1_error)
        }
        __pyx_t_32 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_31));
        __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1494
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *                 w0,w1,w2=obj_volume_6d(tmp4b)             # <<<<<<<<<<<<<<
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 */
        __pyx_t_31 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4b), 0); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1494, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        if (likely(__pyx_t_31 != Py_None)) {
          PyObject* sequence = __pyx_t_31;
          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, 1494, __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_30 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_30);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_30 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1494, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          #endif
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1494, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_30); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        __pyx_v_w0 = __pyx_t_6;
        __pyx_v_w1 = __pyx_t_7;
        __pyx_v_w2 = __pyx_t_8;

        /* "pyqcstrc/icosah/mics.pyx":1495
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose_level-1,1)             # <<<<<<<<<<<<<<
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 */
        __pyx_t_31 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_using_tetrahedron_4(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_obj), (__pyx_v_verbose_level - 1), 1, 0)); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1495, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
          __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_31), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_16 < 0)) {
            PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1495, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_31));
        __pyx_t_31 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1496
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 */
        __pyx_t_30 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_30))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_30);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_30);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_30, function);
          }
        }
        __pyx_t_31 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_30, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_30);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_31);
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        __pyx_t_30 = PyList_New(1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyList_SET_ITEM(__pyx_t_30, 0, __pyx_int_0);
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_30);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_30);
        __pyx_t_30 = 0;
        __pyx_t_30 = PyList_New(1); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_GIVEREF(__pyx_t_3);
        PyList_SET_ITEM(__pyx_t_30, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_30);
        PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_30);
        __pyx_t_30 = 0;
        __pyx_t_30 = PyObject_RichCompare(__pyx_t_31, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_30); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_30); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1497
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)             # <<<<<<<<<<<<<<
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:
 */
          __pyx_t_30 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4c), 0); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1497, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          if (likely(__pyx_t_30 != Py_None)) {
            PyObject* sequence = __pyx_t_30;
            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, 1497, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_31 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_31);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_31 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_31);
            __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
          } else {
            __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1497, __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, 1497, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_31); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
          __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_w3 = __pyx_t_8;
          __pyx_v_w4 = __pyx_t_7;
          __pyx_v_w5 = __pyx_t_6;

          /* "pyqcstrc/icosah/mics.pyx":1498
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4b.reshape(72)
 */
          __pyx_t_26 = ((__pyx_v_w0 == __pyx_v_w3) != 0);
          if (__pyx_t_26) {
          } else {
            __pyx_t_1 = __pyx_t_26;
            goto __pyx_L56_bool_binop_done;
          }
          __pyx_t_26 = ((__pyx_v_w1 == __pyx_v_w4) != 0);
          if (__pyx_t_26) {
          } else {
            __pyx_t_1 = __pyx_t_26;
            goto __pyx_L56_bool_binop_done;
          }
          __pyx_t_26 = ((__pyx_v_w2 == __pyx_v_w5) != 0);
          __pyx_t_1 = __pyx_t_26;
          __pyx_L56_bool_binop_done:;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1499
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4b.reshape(72)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1499, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1500
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4b.reshape(72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4b)
 */
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1500, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_31 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_4);
                if (likely(__pyx_t_31)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_31);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_4, function);
                }
              }
              __pyx_t_30 = (__pyx_t_31) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_31, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
              if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1500, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1500, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_30);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1500, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_30));
              __pyx_t_30 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1499
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4b.reshape(72)
 *                         else:
 */
              goto __pyx_L59;
            }

            /* "pyqcstrc/icosah/mics.pyx":1502
 *                             tmp1a=tmp4b.reshape(72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4b)             # <<<<<<<<<<<<<<
 *                     else:
 *                         #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1502, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1502, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = NULL;
              __pyx_t_16 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_31))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_31);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_31, function);
                  __pyx_t_16 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_31)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4b)};
                __pyx_t_30 = __Pyx_PyFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1502, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_30);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_31)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4b)};
                __pyx_t_30 = __Pyx_PyCFunction_FastCall(__pyx_t_31, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1502, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_30);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __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_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4b));
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_16, ((PyObject *)__pyx_v_tmp4b));
                __pyx_t_30 = __Pyx_PyObject_Call(__pyx_t_31, __pyx_t_3, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1502, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_30);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
              if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1502, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_30);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1502, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_30));
              __pyx_t_30 = 0;
            }
            __pyx_L59:;

            /* "pyqcstrc/icosah/mics.pyx":1498
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4b.reshape(72)
 */
            goto __pyx_L55;
          }

          /* "pyqcstrc/icosah/mics.pyx":1505
 *                     else:
 *                         #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)             # <<<<<<<<<<<<<<
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:
 */
          /*else*/ {
            __pyx_t_30 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_tmp4c), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1505, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
              __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_30), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
              if (unlikely(__pyx_t_16 < 0)) {
                PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4d.diminfo[0].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4d.diminfo[0].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4d.diminfo[1].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4d.diminfo[1].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4d.diminfo[2].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4d.diminfo[2].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4d.diminfo[3].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4d.diminfo[3].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[3];
              if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1505, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp4d, ((PyArrayObject *)__pyx_t_30));
            __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1506
 *                         #tmp4c=simplification(tmp4c,5,0,0,2,0,0,1)
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 */
            __pyx_t_30 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2(((PyArrayObject *)__pyx_v_tmp4b), ((PyArrayObject *)__pyx_v_tmp4d), (__pyx_v_verbose_level - 1), 0)); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1506, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
              __pyx_t_16 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_30), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
              if (unlikely(__pyx_t_16 < 0)) {
                PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
              if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 1506, __pyx_L1_error)
            }
            __Pyx_DECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_30));
            __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1507
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1507, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1508
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4c)
 */
              __pyx_t_31 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1508, __pyx_L1_error)
              __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_21 * 72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_4 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_31))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_31);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_31);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_31, function);
                }
              }
              __pyx_t_30 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_31, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_31, __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_30)) __PYX_ERR(0, 1508, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_30);
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
              if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1508, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_30);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1508, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_30));
              __pyx_t_30 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1507
 *                         tmp4d=object_subtraction_2(tmp4b,tmp4c,verbose_level-1)
 *                         tmp4c=object_subtraction_2(tmp4b,tmp4d,verbose_level-1)
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 */
              goto __pyx_L60;
            }

            /* "pyqcstrc/icosah/mics.pyx":1510
 *                             tmp1a=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4c)             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_31, __pyx_n_s_np); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1510, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_31);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1510, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
              __pyx_t_31 = NULL;
              __pyx_t_16 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_31)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_31);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_16 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_31, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4c)};
                __pyx_t_30 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1510, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
                __Pyx_GOTREF(__pyx_t_30);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_31, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp4c)};
                __pyx_t_30 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1510, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
                __Pyx_GOTREF(__pyx_t_30);
              } else
              #endif
              {
                __pyx_t_4 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1510, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_31) {
                  __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_31); __pyx_t_31 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_16, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4c));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4c));
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_16, ((PyObject *)__pyx_v_tmp4c));
                __pyx_t_30 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1510, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_30);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1510, __pyx_L1_error)
              __pyx_t_35 = ((PyArrayObject *)__pyx_t_30);
              {
                __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_35, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_16 < 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_4mics_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_16 < 0)) __PYX_ERR(0, 1510, __pyx_L1_error)
              }
              __pyx_t_35 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_30));
              __pyx_t_30 = 0;
            }
            __pyx_L60:;
          }
          __pyx_L55:;

          /* "pyqcstrc/icosah/mics.pyx":1496
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj,verbose_level-1,1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     w3,w4,w5=obj_volume_6d(tmp4c)
 *                     if w0==w3 and w1==w4 and w2==w5:
 */
          goto __pyx_L54;
        }

        /* "pyqcstrc/icosah/mics.pyx":1512
 *                             tmp1a=np.append(tmp1a,tmp4c)
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 */
        /*else*/ {
        }
        __pyx_L54:;
      }

      /* "pyqcstrc/icosah/mics.pyx":1513
 *                 else:
 *                     pass
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 *             vol2=(v3+TAU*v4)/float(v5)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1513, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1513, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_20) / 72.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_31 = NULL;
      __pyx_t_12 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_31)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_31);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[5] = {__pyx_t_31, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_30 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1513, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
        __Pyx_GOTREF(__pyx_t_30);
        __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_31, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_30 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1513, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_31) {
          __Pyx_GIVEREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_31); __pyx_t_31 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_t_4);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_12, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_12, __pyx_int_3);
        __pyx_t_4 = 0;
        __pyx_t_30 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_30);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_30) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_30, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1513, __pyx_L1_error)
      __pyx_t_32 = ((PyArrayObject *)__pyx_t_30);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_12 < 0)) __PYX_ERR(0, 1513, __pyx_L1_error)
      }
      __pyx_t_32 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_30));
      __pyx_t_30 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1514
 *                     pass
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v3,v4,v5=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *             vol2=(v3+TAU*v4)/float(v5)
 *             vol3=obj_volume_6d_numerical(tmp4a)
 */
      __pyx_t_30 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_30);
      if (likely(__pyx_t_30 != Py_None)) {
        PyObject* sequence = __pyx_t_30;
        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, 1514, __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, 1514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1514, __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, 1514, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_v3 = __pyx_t_6;
      __pyx_v_v4 = __pyx_t_7;
      __pyx_v_v5 = __pyx_t_8;

      /* "pyqcstrc/icosah/mics.pyx":1515
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 *             vol2=(v3+TAU*v4)/float(v5)             # <<<<<<<<<<<<<<
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             #print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 */
      __pyx_t_9 = (__pyx_v_v3 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v4));
      if (unlikely(((double)__pyx_v_v5) == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 1515, __pyx_L1_error)
      }
      __pyx_v_vol2 = (__pyx_t_9 / ((__pyx_t_5numpy_float64_t)((double)__pyx_v_v5)));

      /* "pyqcstrc/icosah/mics.pyx":1516
 *             v3,v4,v5=obj_volume_6d(tmp4a)
 *             vol2=(v3+TAU*v4)/float(v5)
 *             vol3=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *             #print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 */
      __pyx_v_vol3 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

      /* "pyqcstrc/icosah/mics.pyx":1518
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             #print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *                 if verbose_level>0:
 *                     print('          succdeded')
 */
      __pyx_t_26 = ((__pyx_v_v3 == __pyx_v_v0) != 0);
      if (!__pyx_t_26) {
        goto __pyx_L63_next_or;
      } else {
      }
      __pyx_t_26 = ((__pyx_v_v4 == __pyx_v_v1) != 0);
      if (!__pyx_t_26) {
        goto __pyx_L63_next_or;
      } else {
      }
      __pyx_t_26 = ((__pyx_v_v5 == __pyx_v_v2) != 0);
      if (!__pyx_t_26) {
      } else {
        __pyx_t_1 = __pyx_t_26;
        goto __pyx_L62_bool_binop_done;
      }
      __pyx_L63_next_or:;
      __pyx_t_26 = ((fabs((__pyx_v_vol3 - __pyx_v_vol4)) < (__pyx_v_vol3 * __pyx_v_8pyqcstrc_6icosah_4mics_TOL)) != 0);
      __pyx_t_1 = __pyx_t_26;
      __pyx_L62_bool_binop_done:;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1519
 *             #print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('          succdeded')
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1520
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:
 *                     print('          succdeded')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_30 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1520, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_30);
          __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1519
 *             #print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:             # <<<<<<<<<<<<<<
 *                     print('          succdeded')
 *                 else:
 */
          goto __pyx_L66;
        }

        /* "pyqcstrc/icosah/mics.pyx":1522
 *                     print('          succdeded')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 return tmp4a
 *             else:
 */
        /*else*/ {
        }
        __pyx_L66:;

        /* "pyqcstrc/icosah/mics.pyx":1523
 *                 else:
 *                     pass
 *                 return tmp4a             # <<<<<<<<<<<<<<
 *             else:
 *                 if abs(vol1-vol2)<1e-8:
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
        __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":1518
 *             vol3=obj_volume_6d_numerical(tmp4a)
 *             #print('         volume of reduced obj: %d %d %d (%10.8f)(%10.8f)'%(v3,v4,v5,vol2,vol3))
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:             # <<<<<<<<<<<<<<
 *                 if verbose_level>0:
 *                     print('          succdeded')
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1525
 *                 return tmp4a
 *             else:
 *                 if abs(vol1-vol2)<1e-8:             # <<<<<<<<<<<<<<
 *                     if verbose_level>0:
 *                         print('          succdeded')
 */
      /*else*/ {
        __pyx_t_1 = ((fabs((__pyx_v_vol1 - __pyx_v_vol2)) < 1e-8) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1526
 *             else:
 *                 if abs(vol1-vol2)<1e-8:
 *                     if verbose_level>0:             # <<<<<<<<<<<<<<
 *                         print('          succdeded')
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1527
 *                 if abs(vol1-vol2)<1e-8:
 *                     if verbose_level>0:
 *                         print('          succdeded')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_30 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1527, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1526
 *             else:
 *                 if abs(vol1-vol2)<1e-8:
 *                     if verbose_level>0:             # <<<<<<<<<<<<<<
 *                         print('          succdeded')
 *                     else:
 */
            goto __pyx_L68;
          }

          /* "pyqcstrc/icosah/mics.pyx":1529
 *                         print('          succdeded')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return tmp4a
 *                 else:
 */
          /*else*/ {
          }
          __pyx_L68:;

          /* "pyqcstrc/icosah/mics.pyx":1530
 *                     else:
 *                         pass
 *                     return tmp4a             # <<<<<<<<<<<<<<
 *                 else:
 *                     if verbose_level>2:
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
          __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
          goto __pyx_L0;

          /* "pyqcstrc/icosah/mics.pyx":1525
 *                 return tmp4a
 *             else:
 *                 if abs(vol1-vol2)<1e-8:             # <<<<<<<<<<<<<<
 *                     if verbose_level>0:
 *                         print('          succdeded')
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":1532
 *                     return tmp4a
 *                 else:
 *                     if verbose_level>2:             # <<<<<<<<<<<<<<
 *                         print('          fail, initial obj returned')
 *                     else:
 */
        /*else*/ {
          __pyx_t_1 = ((__pyx_v_verbose_level > 2) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1533
 *                 else:
 *                     if verbose_level>2:
 *                         print('          fail, initial obj returned')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_30 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1533, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_30);
            __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1532
 *                     return tmp4a
 *                 else:
 *                     if verbose_level>2:             # <<<<<<<<<<<<<<
 *                         print('          fail, initial obj returned')
 *                     else:
 */
            goto __pyx_L69;
          }

          /* "pyqcstrc/icosah/mics.pyx":1535
 *                         print('          fail, initial obj returned')
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     return obj
 *                     #return tmp4a
 */
          /*else*/ {
          }
          __pyx_L69:;

          /* "pyqcstrc/icosah/mics.pyx":1536
 *                     else:
 *                         pass
 *                     return obj             # <<<<<<<<<<<<<<
 *                     #return tmp4a
 *                     #return np.array([0]).reshape(1,1,1,1)
 */
          __Pyx_XDECREF(((PyObject *)__pyx_r));
          __Pyx_INCREF(((PyObject *)__pyx_v_obj));
          __pyx_r = ((PyArrayObject *)__pyx_v_obj);
          goto __pyx_L0;
        }
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":1470
 *     # return obj_edge
 *     tmp3b=remove_doubling_dim4_in_perp_space(obj_edge)
 *     if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedralization_points(tmp3b,verbose_level-1)
 *         v3,v4,v5=obj_volume_6d(tmp4a)
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1540
 *                     #return np.array([0]).reshape(1,1,1,1)
 *     else:
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         fail, initial obj returned')
 *         else:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_verbose_level > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1541
 *     else:
 *         if verbose_level>0:
 *             print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_30 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_30)) __PYX_ERR(0, 1541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_30);
      __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1540
 *                     #return np.array([0]).reshape(1,1,1,1)
 *     else:
 *         if verbose_level>0:             # <<<<<<<<<<<<<<
 *             print('         fail, initial obj returned')
 *         else:
 */
      goto __pyx_L70;
    }

    /* "pyqcstrc/icosah/mics.pyx":1543
 *             print('         fail, initial obj returned')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return obj
 * 
 */
    /*else*/ {
    }
    __pyx_L70:;

    /* "pyqcstrc/icosah/mics.pyx":1544
 *         else:
 *             pass
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray merge_4_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1356
 *                 return obj
 * 
 * cpdef np.ndarray simplification_obj_edges(np.ndarray[DTYPE_int_t, ndim=4] obj, int num_cycle, int verbose_level):             # <<<<<<<<<<<<<<
 * 
 *     cdef int i1,i2,i3,i4,num,counter1
 */

  /* 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_29);
  __Pyx_XDECREF(__pyx_t_30);
  __Pyx_XDECREF(__pyx_t_31);
  { 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_a1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_b6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_c6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_edge_new.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_removed_vertices.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_skip_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_edge_new);
  __Pyx_XDECREF((PyObject *)__pyx_v_removed_vertices);
  __Pyx_XDECREF((PyObject *)__pyx_v_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_a2);
  __Pyx_XDECREF((PyObject *)__pyx_v_a3);
  __Pyx_XDECREF((PyObject *)__pyx_v_a4);
  __Pyx_XDECREF((PyObject *)__pyx_v_a5);
  __Pyx_XDECREF((PyObject *)__pyx_v_a6);
  __Pyx_XDECREF((PyObject *)__pyx_v_b4);
  __Pyx_XDECREF((PyObject *)__pyx_v_b5);
  __Pyx_XDECREF((PyObject *)__pyx_v_b6);
  __Pyx_XDECREF((PyObject *)__pyx_v_c4);
  __Pyx_XDECREF((PyObject *)__pyx_v_c5);
  __Pyx_XDECREF((PyObject *)__pyx_v_c6);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_surface);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_edge);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4d);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_9simplification_obj_edges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_9simplification_obj_edges(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  int __pyx_v_num_cycle;
  int __pyx_v_verbose_level;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simplification_obj_edges (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_num_cycle,&__pyx_n_s_verbose_level,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_num_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges", 1, 3, 3, 1); __PYX_ERR(0, 1356, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification_obj_edges", 1, 3, 3, 2); __PYX_ERR(0, 1356, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "simplification_obj_edges") < 0)) __PYX_ERR(0, 1356, __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_num_cycle = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L3_error)
    __pyx_v_verbose_level = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_verbose_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplification_obj_edges", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1356, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges", __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, 1356, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_8simplification_obj_edges(__pyx_self, __pyx_v_obj, __pyx_v_num_cycle, __pyx_v_verbose_level);

  /* 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_4mics_8simplification_obj_edges(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num_cycle, int __pyx_v_verbose_level) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification_obj_edges", 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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1356, __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_4mics_simplification_obj_edges(((PyArrayObject *)__pyx_v_obj), __pyx_v_num_cycle, __pyx_v_verbose_level, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __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_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification_obj_edges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1546
 *         return obj
 * 
 * cdef np.ndarray merge_4_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     # this simplificates obj (set of tetrahedra)
 *     cdef int i1,i2,i3,i4,i5,counter0,counter1,counter2,counter3,counter4,counter5,num1,num2,num3
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_4_tetrahedra_in_obj(PyArrayObject *__pyx_v_obj, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_i5;
  int __pyx_v_counter0;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  CYTHON_UNUSED int __pyx_v_counter4;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  PyObject *__pyx_v_a1 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  CYTHON_UNUSED PyObject *__pyx_v_tmp1b = NULL;
  __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_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_t_23;
  int __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  Py_UCS4 __pyx_t_26;
  int __pyx_t_27;
  PyArrayObject *__pyx_t_28 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_4_tetrahedra_in_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_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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1546, __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/mics.pyx":1556
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if len(obj)>=4:             # <<<<<<<<<<<<<<
 * 
 *         if verbose>0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1556, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 >= 4) != 0);
  if (__pyx_t_2) {

    /* "pyqcstrc/icosah/mics.pyx":1558
 *     if len(obj)>=4:
 * 
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         merge_4_tetrahedra_in_obj()')
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":1559
 * 
 *         if verbose>0:
 *             print('         merge_4_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1558
 *     if len(obj)>=4:
 * 
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         merge_4_tetrahedra_in_obj()')
 *         else:
 */
      goto __pyx_L4;
    }

    /* "pyqcstrc/icosah/mics.pyx":1561
 *             print('         merge_4_tetrahedra_in_obj()')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         # volume of initial obj
 */
    /*else*/ {
    }
    __pyx_L4:;

    /* "pyqcstrc/icosah/mics.pyx":1565
 *         # volume of initial obj
 *         #v1,v2,v3=obj_volume_6d(obj)
 *         vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 */
    __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

    /* "pyqcstrc/icosah/mics.pyx":1566
 *         #v1,v2,v3=obj_volume_6d(obj)
 *         vol1=obj_volume_6d_numerical(obj)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 *             print('         volume initial obj = %10.8f'%(vol1))
 */
    __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":1568
 *         if verbose>0:
 *             #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 *             print('         volume initial obj = %10.8f'%(vol1))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_volume_initial_obj_10_8f, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __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, 1568, __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/mics.pyx":1566
 *         #v1,v2,v3=obj_volume_6d(obj)
 *         vol1=obj_volume_6d_numerical(obj)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 *             print('         volume initial obj = %10.8f'%(vol1))
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":1570
 *             print('         volume initial obj = %10.8f'%(vol1))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         a1=[]
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":1572
 *             pass
 * 
 *         a1=[]             # <<<<<<<<<<<<<<
 *         counter4=0
 *         tmp1a=np.array([0])
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_a1 = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1573
 * 
 *         a1=[]
 *         counter4=0             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 */
    __pyx_v_counter4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1574
 *         a1=[]
 *         counter4=0
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-3):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1574, __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, 1574, __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, 1574, __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_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_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __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, 1574, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __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_8 < 0)) __PYX_ERR(0, 1574, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1575
 *         counter4=0
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj)-3):
 *             counter3=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __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_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __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_3)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_tmp1b = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1576
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-3):             # <<<<<<<<<<<<<<
 *             counter3=0
 *             for i2 in range(i1+1,len(obj)-2):
 */
    __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1576, __pyx_L1_error)
    __pyx_t_12 = (__pyx_t_1 - 3);
    __pyx_t_1 = __pyx_t_12;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
      __pyx_v_i1 = __pyx_t_8;

      /* "pyqcstrc/icosah/mics.pyx":1577
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-3):
 *             counter3=0             # <<<<<<<<<<<<<<
 *             for i2 in range(i1+1,len(obj)-2):
 *                 counter2=0
 */
      __pyx_v_counter3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1578
 *         for i1 in range(len(obj)-3):
 *             counter3=0
 *             for i2 in range(i1+1,len(obj)-2):             # <<<<<<<<<<<<<<
 *                 counter2=0
 *                 for i3 in range(i2+1,len(obj)-1):
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1578, __pyx_L1_error)
      __pyx_t_14 = (__pyx_t_13 - 2);
      __pyx_t_13 = __pyx_t_14;
      for (__pyx_t_15 = (__pyx_v_i1 + 1); __pyx_t_15 < __pyx_t_13; __pyx_t_15+=1) {
        __pyx_v_i2 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":1579
 *             counter3=0
 *             for i2 in range(i1+1,len(obj)-2):
 *                 counter2=0             # <<<<<<<<<<<<<<
 *                 for i3 in range(i2+1,len(obj)-1):
 *                     counter1=0
 */
        __pyx_v_counter2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1580
 *             for i2 in range(i1+1,len(obj)-2):
 *                 counter2=0
 *                 for i3 in range(i2+1,len(obj)-1):             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     for i4 in range(i3+1,len(obj)):
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1580, __pyx_L1_error)
        __pyx_t_17 = (__pyx_t_16 - 1);
        __pyx_t_16 = __pyx_t_17;
        for (__pyx_t_18 = (__pyx_v_i2 + 1); __pyx_t_18 < __pyx_t_16; __pyx_t_18+=1) {
          __pyx_v_i3 = __pyx_t_18;

          /* "pyqcstrc/icosah/mics.pyx":1581
 *                 counter2=0
 *                 for i3 in range(i2+1,len(obj)-1):
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     for i4 in range(i3+1,len(obj)):
 *                         counter0=0
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1582
 *                 for i3 in range(i2+1,len(obj)-1):
 *                     counter1=0
 *                     for i4 in range(i3+1,len(obj)):             # <<<<<<<<<<<<<<
 *                         counter0=0
 *                         if len(a1)!=0:
 */
          __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1582, __pyx_L1_error)
          __pyx_t_20 = __pyx_t_19;
          for (__pyx_t_21 = (__pyx_v_i3 + 1); __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) {
            __pyx_v_i4 = __pyx_t_21;

            /* "pyqcstrc/icosah/mics.pyx":1583
 *                     counter1=0
 *                     for i4 in range(i3+1,len(obj)):
 *                         counter0=0             # <<<<<<<<<<<<<<
 *                         if len(a1)!=0:
 *                             for i5 in a1: # skip tetrahedron already merged
 */
            __pyx_v_counter0 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1584
 *                     for i4 in range(i3+1,len(obj)):
 *                         counter0=0
 *                         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *                             for i5 in a1: # skip tetrahedron already merged
 *                                 if i1!=i5 and i2!=i5 and i3!=i5 and i4!=i5:
 */
            __pyx_t_22 = PyList_GET_SIZE(__pyx_v_a1); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1584, __pyx_L1_error)
            __pyx_t_2 = ((__pyx_t_22 != 0) != 0);
            if (__pyx_t_2) {

              /* "pyqcstrc/icosah/mics.pyx":1585
 *                         counter0=0
 *                         if len(a1)!=0:
 *                             for i5 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                                 if i1!=i5 and i2!=i5 and i3!=i5 and i4!=i5:
 *                                     pass
 */
              __pyx_t_3 = __pyx_v_a1; __Pyx_INCREF(__pyx_t_3); __pyx_t_22 = 0;
              for (;;) {
                if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_3)) break;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_22); __Pyx_INCREF(__pyx_t_4); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(0, 1585, __pyx_L1_error)
                #else
                __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1585, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                #endif
                __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_i5 = __pyx_t_23;

                /* "pyqcstrc/icosah/mics.pyx":1586
 *                         if len(a1)!=0:
 *                             for i5 in a1: # skip tetrahedron already merged
 *                                 if i1!=i5 and i2!=i5 and i3!=i5 and i4!=i5:             # <<<<<<<<<<<<<<
 *                                     pass
 *                                 else:
 */
                __pyx_t_24 = ((__pyx_v_i1 != __pyx_v_i5) != 0);
                if (__pyx_t_24) {
                } else {
                  __pyx_t_2 = __pyx_t_24;
                  goto __pyx_L18_bool_binop_done;
                }
                __pyx_t_24 = ((__pyx_v_i2 != __pyx_v_i5) != 0);
                if (__pyx_t_24) {
                } else {
                  __pyx_t_2 = __pyx_t_24;
                  goto __pyx_L18_bool_binop_done;
                }
                __pyx_t_24 = ((__pyx_v_i3 != __pyx_v_i5) != 0);
                if (__pyx_t_24) {
                } else {
                  __pyx_t_2 = __pyx_t_24;
                  goto __pyx_L18_bool_binop_done;
                }
                __pyx_t_24 = ((__pyx_v_i4 != __pyx_v_i5) != 0);
                __pyx_t_2 = __pyx_t_24;
                __pyx_L18_bool_binop_done:;
                if (__pyx_t_2) {
                  goto __pyx_L17;
                }

                /* "pyqcstrc/icosah/mics.pyx":1589
 *                                     pass
 *                                 else:
 *                                     counter0+=1             # <<<<<<<<<<<<<<
 *                                     break
 *                         if counter0==0:
 */
                /*else*/ {
                  __pyx_v_counter0 = (__pyx_v_counter0 + 1);

                  /* "pyqcstrc/icosah/mics.pyx":1590
 *                                 else:
 *                                     counter0+=1
 *                                     break             # <<<<<<<<<<<<<<
 *                         if counter0==0:
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 */
                  goto __pyx_L16_break;
                }
                __pyx_L17:;

                /* "pyqcstrc/icosah/mics.pyx":1585
 *                         counter0=0
 *                         if len(a1)!=0:
 *                             for i5 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                                 if i1!=i5 and i2!=i5 and i3!=i5 and i4!=i5:
 *                                     pass
 */
              }
              __pyx_L16_break:;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1584
 *                     for i4 in range(i3+1,len(obj)):
 *                         counter0=0
 *                         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *                             for i5 in a1: # skip tetrahedron already merged
 *                                 if i1!=i5 and i2!=i5 and i3!=i5 and i4!=i5:
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":1591
 *                                     counter0+=1
 *                                     break
 *                         if counter0==0:             # <<<<<<<<<<<<<<
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 *                             if tmp3a.tolist()!=[[[0]]]:
 */
            __pyx_t_2 = ((__pyx_v_counter0 == 0) != 0);
            if (__pyx_t_2) {

              /* "pyqcstrc/icosah/mics.pyx":1592
 *                                     break
 *                         if counter0==0:
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)             # <<<<<<<<<<<<<<
 *                             if tmp3a.tolist()!=[[[0]]]:
 *                                 if verbose>0:
 */
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __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, 1592, __pyx_L1_error)
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1592, __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, 1592, __pyx_L1_error)
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1592, __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, 1592, __pyx_L1_error)
              __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1592, __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, 1592, __pyx_L1_error)
              __pyx_t_25 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_merge_four_tetrahedra(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_6), __pyx_v_verbose)); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1592, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_25);
              __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_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
                __pyx_t_23 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_25), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
                if (unlikely(__pyx_t_23 < 0)) {
                  PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
                  }
                  __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 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_23 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error)
              }
              __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_25));
              __pyx_t_25 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1593
 *                         if counter0==0:
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 *                             if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                                 if verbose>0:
 *                                     print('         %d %d %d %d (merged)'%(i1,i2,i3,i4))
 */
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1593, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_5 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_6, function);
                }
              }
              __pyx_t_25 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1593, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_25);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1593, __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_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1593, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_GIVEREF(__pyx_t_6);
              PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
              __pyx_t_6 = 0;
              __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1593, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_GIVEREF(__pyx_t_5);
              PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
              __pyx_t_5 = 0;
              __pyx_t_5 = PyObject_RichCompare(__pyx_t_25, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1593, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1593, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (__pyx_t_2) {

                /* "pyqcstrc/icosah/mics.pyx":1594
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 *                             if tmp3a.tolist()!=[[[0]]]:
 *                                 if verbose>0:             # <<<<<<<<<<<<<<
 *                                     print('         %d %d %d %d (merged)'%(i1,i2,i3,i4))
 *                                 else:
 */
                __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
                if (__pyx_t_2) {

                  /* "pyqcstrc/icosah/mics.pyx":1595
 *                             if tmp3a.tolist()!=[[[0]]]:
 *                                 if verbose>0:
 *                                     print('         %d %d %d %d (merged)'%(i1,i2,i3,i4))             # <<<<<<<<<<<<<<
 *                                 else:
 *                                     pass
 */
                  __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __pyx_t_22 = 0;
                  __pyx_t_26 = 127;
                  __Pyx_INCREF(__pyx_kp_u__40);
                  __pyx_t_22 += 9;
                  __Pyx_GIVEREF(__pyx_kp_u__40);
                  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__40);
                  __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_6);
                  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
                  __pyx_t_6 = 0;
                  __Pyx_INCREF(__pyx_kp_u__17);
                  __pyx_t_22 += 1;
                  __Pyx_GIVEREF(__pyx_kp_u__17);
                  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__17);
                  __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_6);
                  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
                  __pyx_t_6 = 0;
                  __Pyx_INCREF(__pyx_kp_u__17);
                  __pyx_t_22 += 1;
                  __Pyx_GIVEREF(__pyx_kp_u__17);
                  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__17);
                  __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i3, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_6);
                  PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_6);
                  __pyx_t_6 = 0;
                  __Pyx_INCREF(__pyx_kp_u__17);
                  __pyx_t_22 += 1;
                  __Pyx_GIVEREF(__pyx_kp_u__17);
                  PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__17);
                  __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i4, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                  __Pyx_GIVEREF(__pyx_t_6);
                  PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_6);
                  __pyx_t_6 = 0;
                  __Pyx_INCREF(__pyx_kp_u_merged_2);
                  __pyx_t_22 += 9;
                  __Pyx_GIVEREF(__pyx_kp_u_merged_2);
                  PyTuple_SET_ITEM(__pyx_t_5, 8, __pyx_kp_u_merged_2);
                  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 9, __pyx_t_22, __pyx_t_26); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1595, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                  /* "pyqcstrc/icosah/mics.pyx":1594
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 *                             if tmp3a.tolist()!=[[[0]]]:
 *                                 if verbose>0:             # <<<<<<<<<<<<<<
 *                                     print('         %d %d %d %d (merged)'%(i1,i2,i3,i4))
 *                                 else:
 */
                  goto __pyx_L24;
                }

                /* "pyqcstrc/icosah/mics.pyx":1597
 *                                     print('         %d %d %d %d (merged)'%(i1,i2,i3,i4))
 *                                 else:
 *                                     pass             # <<<<<<<<<<<<<<
 *                                 a1.append(i1)
 *                                 a1.append(i2)
 */
                /*else*/ {
                }
                __pyx_L24:;

                /* "pyqcstrc/icosah/mics.pyx":1598
 *                                 else:
 *                                     pass
 *                                 a1.append(i1)             # <<<<<<<<<<<<<<
 *                                 a1.append(i2)
 *                                 a1.append(i3)
 */
                __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_27 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_5); if (unlikely(__pyx_t_27 == ((int)-1))) __PYX_ERR(0, 1598, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1599
 *                                     pass
 *                                 a1.append(i1)
 *                                 a1.append(i2)             # <<<<<<<<<<<<<<
 *                                 a1.append(i3)
 *                                 a1.append(i4)
 */
                __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1599, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_27 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_5); if (unlikely(__pyx_t_27 == ((int)-1))) __PYX_ERR(0, 1599, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1600
 *                                 a1.append(i1)
 *                                 a1.append(i2)
 *                                 a1.append(i3)             # <<<<<<<<<<<<<<
 *                                 a1.append(i4)
 *                                 if len(tmp1a)==1:
 */
                __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_i3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1600, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_27 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_5); if (unlikely(__pyx_t_27 == ((int)-1))) __PYX_ERR(0, 1600, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1601
 *                                 a1.append(i2)
 *                                 a1.append(i3)
 *                                 a1.append(i4)             # <<<<<<<<<<<<<<
 *                                 if len(tmp1a)==1:
 *                                     tmp1a=tmp3a.reshape(72)
 */
                __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_i4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1601, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_27 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_5); if (unlikely(__pyx_t_27 == ((int)-1))) __PYX_ERR(0, 1601, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1602
 *                                 a1.append(i3)
 *                                 a1.append(i4)
 *                                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                                     tmp1a=tmp3a.reshape(72)
 *                                 else:
 */
                __pyx_t_22 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_22 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1602, __pyx_L1_error)
                __pyx_t_2 = ((__pyx_t_22 == 1) != 0);
                if (__pyx_t_2) {

                  /* "pyqcstrc/icosah/mics.pyx":1603
 *                                 a1.append(i4)
 *                                 if len(tmp1a)==1:
 *                                     tmp1a=tmp3a.reshape(72)             # <<<<<<<<<<<<<<
 *                                 else:
 *                                     tmp1a=np.append(tmp1a,tmp3a)
 */
                  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1603, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_25 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(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_5 = (__pyx_t_25) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_25, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_72);
                  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1603, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1603, __pyx_L1_error)
                  __pyx_t_7 = ((PyArrayObject *)__pyx_t_5);
                  {
                    __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_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                    if (unlikely(__pyx_t_23 < 0)) {
                      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
                      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
                        __Pyx_RaiseBufferFallbackError();
                      } else {
                        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                      }
                      __pyx_t_9 = __pyx_t_10 = __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_23 < 0)) __PYX_ERR(0, 1603, __pyx_L1_error)
                  }
                  __pyx_t_7 = 0;
                  __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
                  __pyx_t_5 = 0;

                  /* "pyqcstrc/icosah/mics.pyx":1602
 *                                 a1.append(i3)
 *                                 a1.append(i4)
 *                                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                                     tmp1a=tmp3a.reshape(72)
 *                                 else:
 */
                  goto __pyx_L25;
                }

                /* "pyqcstrc/icosah/mics.pyx":1605
 *                                     tmp1a=tmp3a.reshape(72)
 *                                 else:
 *                                     tmp1a=np.append(tmp1a,tmp3a)             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 counter2+=1
 */
                /*else*/ {
                  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1605, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_append); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1605, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __pyx_t_6 = NULL;
                  __pyx_t_23 = 0;
                  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_25))) {
                    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_25);
                    if (likely(__pyx_t_6)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
                      __Pyx_INCREF(__pyx_t_6);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_25, function);
                      __pyx_t_23 = 1;
                    }
                  }
                  #if CYTHON_FAST_PYCALL
                  if (PyFunction_Check(__pyx_t_25)) {
                    PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_25, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1605, __pyx_L1_error)
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_GOTREF(__pyx_t_5);
                  } else
                  #endif
                  #if CYTHON_FAST_PYCCALL
                  if (__Pyx_PyFastCFunction_Check(__pyx_t_25)) {
                    PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_25, __pyx_temp+1-__pyx_t_23, 2+__pyx_t_23); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1605, __pyx_L1_error)
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_GOTREF(__pyx_t_5);
                  } else
                  #endif
                  {
                    __pyx_t_4 = PyTuple_New(2+__pyx_t_23); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1605, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    if (__pyx_t_6) {
                      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
                    }
                    __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                    __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_23, ((PyObject *)__pyx_v_tmp1a));
                    __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
                    __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
                    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_23, ((PyObject *)__pyx_v_tmp3a));
                    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1605, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_5);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                  }
                  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1605, __pyx_L1_error)
                  __pyx_t_7 = ((PyArrayObject *)__pyx_t_5);
                  {
                    __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_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                    if (unlikely(__pyx_t_23 < 0)) {
                      PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
                      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
                        __Pyx_RaiseBufferFallbackError();
                      } else {
                        PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
                      }
                      __pyx_t_11 = __pyx_t_10 = __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, 1605, __pyx_L1_error)
                  }
                  __pyx_t_7 = 0;
                  __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
                  __pyx_t_5 = 0;
                }
                __pyx_L25:;

                /* "pyqcstrc/icosah/mics.pyx":1606
 *                                 else:
 *                                     tmp1a=np.append(tmp1a,tmp3a)
 *                                 counter1+=1             # <<<<<<<<<<<<<<
 *                                 counter2+=1
 *                                 counter3+=1
 */
                __pyx_v_counter1 = (__pyx_v_counter1 + 1);

                /* "pyqcstrc/icosah/mics.pyx":1607
 *                                     tmp1a=np.append(tmp1a,tmp3a)
 *                                 counter1+=1
 *                                 counter2+=1             # <<<<<<<<<<<<<<
 *                                 counter3+=1
 *                                 break
 */
                __pyx_v_counter2 = (__pyx_v_counter2 + 1);

                /* "pyqcstrc/icosah/mics.pyx":1608
 *                                 counter1+=1
 *                                 counter2+=1
 *                                 counter3+=1             # <<<<<<<<<<<<<<
 *                                 break
 *                             else:
 */
                __pyx_v_counter3 = (__pyx_v_counter3 + 1);

                /* "pyqcstrc/icosah/mics.pyx":1609
 *                                 counter2+=1
 *                                 counter3+=1
 *                                 break             # <<<<<<<<<<<<<<
 *                             else:
 *                                 if verbose>0:
 */
                goto __pyx_L13_break;

                /* "pyqcstrc/icosah/mics.pyx":1593
 *                         if counter0==0:
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 *                             if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                                 if verbose>0:
 *                                     print('         %d %d %d %d (merged)'%(i1,i2,i3,i4))
 */
              }

              /* "pyqcstrc/icosah/mics.pyx":1611
 *                                 break
 *                             else:
 *                                 if verbose>0:             # <<<<<<<<<<<<<<
 *                                     print('         %d %d %d %d'%(i1,i2,i3,i4))
 *                                 else:
 */
              /*else*/ {
                __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
                if (__pyx_t_2) {

                  /* "pyqcstrc/icosah/mics.pyx":1612
 *                             else:
 *                                 if verbose>0:
 *                                     print('         %d %d %d %d'%(i1,i2,i3,i4))             # <<<<<<<<<<<<<<
 *                                 else:
 *                                     pass
 */
                  __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __pyx_t_22 = 0;
                  __pyx_t_26 = 127;
                  __Pyx_INCREF(__pyx_kp_u__40);
                  __pyx_t_22 += 9;
                  __Pyx_GIVEREF(__pyx_kp_u__40);
                  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__40);
                  __pyx_t_25 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 0, ' ', 'd'); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25);
                  __Pyx_GIVEREF(__pyx_t_25);
                  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_25);
                  __pyx_t_25 = 0;
                  __Pyx_INCREF(__pyx_kp_u__17);
                  __pyx_t_22 += 1;
                  __Pyx_GIVEREF(__pyx_kp_u__17);
                  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__17);
                  __pyx_t_25 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 0, ' ', 'd'); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25);
                  __Pyx_GIVEREF(__pyx_t_25);
                  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_25);
                  __pyx_t_25 = 0;
                  __Pyx_INCREF(__pyx_kp_u__17);
                  __pyx_t_22 += 1;
                  __Pyx_GIVEREF(__pyx_kp_u__17);
                  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__17);
                  __pyx_t_25 = __Pyx_PyUnicode_From_int(__pyx_v_i3, 0, ' ', 'd'); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25);
                  __Pyx_GIVEREF(__pyx_t_25);
                  PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_25);
                  __pyx_t_25 = 0;
                  __Pyx_INCREF(__pyx_kp_u__17);
                  __pyx_t_22 += 1;
                  __Pyx_GIVEREF(__pyx_kp_u__17);
                  PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u__17);
                  __pyx_t_25 = __Pyx_PyUnicode_From_int(__pyx_v_i4, 0, ' ', 'd'); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __pyx_t_22 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_25);
                  __Pyx_GIVEREF(__pyx_t_25);
                  PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_25);
                  __pyx_t_25 = 0;
                  __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_5, 8, __pyx_t_22, __pyx_t_26); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_25);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_25); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1612, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

                  /* "pyqcstrc/icosah/mics.pyx":1611
 *                                 break
 *                             else:
 *                                 if verbose>0:             # <<<<<<<<<<<<<<
 *                                     print('         %d %d %d %d'%(i1,i2,i3,i4))
 *                                 else:
 */
                  goto __pyx_L26;
                }

                /* "pyqcstrc/icosah/mics.pyx":1614
 *                                     print('         %d %d %d %d'%(i1,i2,i3,i4))
 *                                 else:
 *                                     pass             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
                /*else*/ {
                }
                __pyx_L26:;
              }

              /* "pyqcstrc/icosah/mics.pyx":1591
 *                                     counter0+=1
 *                                     break
 *                         if counter0==0:             # <<<<<<<<<<<<<<
 *                             tmp3a=merge_four_tetrahedra(obj[i1],obj[i2],obj[i3],obj[i4],verbose)
 *                             if tmp3a.tolist()!=[[[0]]]:
 */
              goto __pyx_L22;
            }

            /* "pyqcstrc/icosah/mics.pyx":1616
 *                                     pass
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter1!=0:
 *                         break
 */
            /*else*/ {
            }
            __pyx_L22:;
          }
          __pyx_L13_break:;

          /* "pyqcstrc/icosah/mics.pyx":1617
 *                         else:
 *                             pass
 *                     if counter1!=0:             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
          __pyx_t_2 = ((__pyx_v_counter1 != 0) != 0);
          if (__pyx_t_2) {

            /* "pyqcstrc/icosah/mics.pyx":1618
 *                             pass
 *                     if counter1!=0:
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L11_break;

            /* "pyqcstrc/icosah/mics.pyx":1617
 *                         else:
 *                             pass
 *                     if counter1!=0:             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":1620
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter2!=0:
 *                     break
 */
          /*else*/ {
          }
        }
        __pyx_L11_break:;

        /* "pyqcstrc/icosah/mics.pyx":1621
 *                     else:
 *                         pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        __pyx_t_2 = ((__pyx_v_counter2 != 0) != 0);
        if (__pyx_t_2) {

          /* "pyqcstrc/icosah/mics.pyx":1622
 *                         pass
 *                 if counter2!=0:
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L9_break;

          /* "pyqcstrc/icosah/mics.pyx":1621
 *                     else:
 *                         pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":1624
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter3!=0:
 *                 break
 */
        /*else*/ {
        }
      }
      __pyx_L9_break:;

      /* "pyqcstrc/icosah/mics.pyx":1625
 *                 else:
 *                     pass
 *             if counter3!=0:             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_2 = ((__pyx_v_counter3 != 0) != 0);
      if (__pyx_t_2) {

        /* "pyqcstrc/icosah/mics.pyx":1626
 *                     pass
 *             if counter3!=0:
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L7_break;

        /* "pyqcstrc/icosah/mics.pyx":1625
 *                 else:
 *                     pass
 *             if counter3!=0:             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1628
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):
 */
      /*else*/ {
      }
    }
    __pyx_L7_break:;

    /* "pyqcstrc/icosah/mics.pyx":1629
 *             else:
 *                 pass
 *         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *             for i1 in range(len(obj)):
 *                 counter1=0
 */
    __pyx_t_12 = PyList_GET_SIZE(__pyx_v_a1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1629, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_t_12 != 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":1630
 *                 pass
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):             # <<<<<<<<<<<<<<
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 */
      __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1630, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_12;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
        __pyx_v_i1 = __pyx_t_8;

        /* "pyqcstrc/icosah/mics.pyx":1631
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):
 *                 counter1=0             # <<<<<<<<<<<<<<
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:
 */
        __pyx_v_counter1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1632
 *             for i1 in range(len(obj)):
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                     if i1==i2:
 *                         counter1+=1
 */
        __pyx_t_5 = __pyx_v_a1; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
        for (;;) {
          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_25 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_25); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1632, __pyx_L1_error)
          #else
          __pyx_t_25 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1632, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_25);
          #endif
          __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_25); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1632, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          __pyx_v_i2 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":1633
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          __pyx_t_2 = ((__pyx_v_i1 == __pyx_v_i2) != 0);
          if (__pyx_t_2) {

            /* "pyqcstrc/icosah/mics.pyx":1634
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:
 *                         counter1+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter1 = (__pyx_v_counter1 + 1);

            /* "pyqcstrc/icosah/mics.pyx":1635
 *                     if i1==i2:
 *                         counter1+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L34_break;

            /* "pyqcstrc/icosah/mics.pyx":1633
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":1637
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=np.append(tmp1a,obj[i1])
 */
          /*else*/ {
          }

          /* "pyqcstrc/icosah/mics.pyx":1632
 *             for i1 in range(len(obj)):
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                     if i1==i2:
 *                         counter1+=1
 */
        }
        __pyx_L34_break:;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1638
 *                     else:
 *                         pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 */
        __pyx_t_2 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_2) {

          /* "pyqcstrc/icosah/mics.pyx":1639
 *                         pass
 *                 if counter1==0:
 *                     tmp1a=np.append(tmp1a,obj[i1])             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1639, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_25);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1639, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          __pyx_t_25 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1639, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_25);
          __pyx_t_6 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), __pyx_t_25};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1639, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), __pyx_t_25};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1639, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_6) {
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_25);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_15, __pyx_t_25);
            __pyx_t_25 = 0;
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1639, __pyx_L1_error)
          __pyx_t_7 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
              }
              __pyx_t_9 = __pyx_t_10 = __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_15 < 0)) __PYX_ERR(0, 1639, __pyx_L1_error)
          }
          __pyx_t_7 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1638
 *                     else:
 *                         pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 */
          goto __pyx_L36;
        }

        /* "pyqcstrc/icosah/mics.pyx":1641
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=obj[0].reshape(72)
 */
        /*else*/ {
        }
        __pyx_L36:;
      }

      /* "pyqcstrc/icosah/mics.pyx":1629
 *             else:
 *                 pass
 *         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *             for i1 in range(len(obj)):
 *                 counter1=0
 */
      goto __pyx_L30;
    }

    /* "pyqcstrc/icosah/mics.pyx":1643
 *                     pass
 *         else:
 *             tmp1a=obj[0].reshape(72)             # <<<<<<<<<<<<<<
 *             for i1 in range(1,len(obj)):
 *                 tmp1a=np.append(tmp1a,obj[i1])
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1643, __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, 1643, __pyx_L1_error)
      __pyx_t_7 = ((PyArrayObject *)__pyx_t_5);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_8 < 0)) {
          PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
          }
          __pyx_t_11 = __pyx_t_10 = __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_8 < 0)) __PYX_ERR(0, 1643, __pyx_L1_error)
      }
      __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1644
 *         else:
 *             tmp1a=obj[0].reshape(72)
 *             for i1 in range(1,len(obj)):             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp1a,obj[i1])
 * 
 */
      __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1644, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_12;
      for (__pyx_t_8 = 1; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
        __pyx_v_i1 = __pyx_t_8;

        /* "pyqcstrc/icosah/mics.pyx":1645
 *             tmp1a=obj[0].reshape(72)
 *             for i1 in range(1,len(obj)):
 *                 tmp1a=np.append(tmp1a,obj[i1])             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __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, 1645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __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, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_25 = NULL;
        __pyx_t_15 = 0;
        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_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_25, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1645, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 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_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_25, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1645, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1645, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_25) {
            __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_6, 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_6, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_15, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1645, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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, 1645, __pyx_L1_error)
        __pyx_t_7 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
            }
            __pyx_t_9 = __pyx_t_10 = __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_15 < 0)) __PYX_ERR(0, 1645, __pyx_L1_error)
        }
        __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;
      }
    }
    __pyx_L30:;

    /* "pyqcstrc/icosah/mics.pyx":1648
 * 
 * 
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 * 
 *         # volume of simplized obj
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1648, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyInt_FromDouble((((double)__pyx_t_12) / 72.0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_6, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_6, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_25 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_25, 0+__pyx_t_8, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_8, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_25, 2+__pyx_t_8, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_25, 3+__pyx_t_8, __pyx_int_3);
      __pyx_t_6 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_25, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 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, 1648, __pyx_L1_error)
    __pyx_t_28 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 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_8 < 0)) __PYX_ERR(0, 1648, __pyx_L1_error)
    }
    __pyx_t_28 = 0;
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1652
 *         # volume of simplized obj
 *         #w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 */
    __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

    /* "pyqcstrc/icosah/mics.pyx":1653
 *         #w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 *             print('         volume simplified obj = %10.8f'%(vol2))
 */
    __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":1655
 *         if verbose>0:
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 *             print('         volume simplified obj = %10.8f'%(vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_volume_simplified_obj_10_8f, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __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, 1655, __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/mics.pyx":1653
 *         #w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 *             print('         volume simplified obj = %10.8f'%(vol2))
 */
      goto __pyx_L39;
    }

    /* "pyqcstrc/icosah/mics.pyx":1657
 *             print('         volume simplified obj = %10.8f'%(vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 */
    /*else*/ {
    }
    __pyx_L39:;

    /* "pyqcstrc/icosah/mics.pyx":1660
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
    __pyx_t_2 = ((fabs((__pyx_v_vol1 - __pyx_v_vol2)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":1661
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>0:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":1660
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":1663
 *             return tmp4a
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_2) {

        /* "pyqcstrc/icosah/mics.pyx":1664
 *         else:
 *             if verbose>0:
 *                 print('         fail')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1663
 *             return tmp4a
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *             else:
 */
        goto __pyx_L41;
      }

      /* "pyqcstrc/icosah/mics.pyx":1666
 *                 print('         fail')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return np.array([[[[0]]]])
 *     else:
 */
      /*else*/ {
      }
      __pyx_L41:;

      /* "pyqcstrc/icosah/mics.pyx":1667
 *             else:
 *                 pass
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return obj
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __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_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_25))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_25);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_25, function);
        }
      }
      __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_25, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1667, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":1556
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if len(obj)>=4:             # <<<<<<<<<<<<<<
 * 
 *         if verbose>0:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1669
 *             return np.array([[[[0]]]])
 *     else:
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray check_two_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1546
 *         return obj
 * 
 * cdef np.ndarray merge_4_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     # this simplificates obj (set of tetrahedra)
 *     cdef int i1,i2,i3,i4,i5,counter0,counter1,counter2,counter3,counter4,counter5,num1,num2,num3
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_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_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.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.mics.merge_4_tetrahedra_in_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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF(__pyx_v_tmp1b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1671
 *         return obj
 * 
 * cdef np.ndarray check_two_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2):
 *     # check whether tetrahedron_1 and _2 are sharing a triangle surface or not.
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2) {
  int __pyx_v_flag;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter1;
  PyObject *__pyx_v_comb = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp2b = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyObject *__pyx_v_comb1 = NULL;
  __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_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2b;
  __Pyx_Buffer __pyx_pybuffer_tmp2b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  PyArrayObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_two_tetrahedra", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __pyx_pybuffer_tmp2b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2b.refcount = 0;
  __pyx_pybuffernd_tmp2b.data = NULL;
  __pyx_pybuffernd_tmp2b.rcbuffer = &__pyx_pybuffer_tmp2b;
  __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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1671, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1671, __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/mics.pyx":1681
 * 
 *     # three triangles of tetrahedron: 1-2-3, 1-2-4, 1-3-4, 2-3-4
 *     comb=[[0,1,2],[0,1,3],[0,2,3],[1,2,3]]             # <<<<<<<<<<<<<<
 *     # other vertx: 3,2,1,0
 *     comb1=[3,2,1,0]
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_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_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2);
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __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_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_3);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __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_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_3);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_3);
  __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_v_comb = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1683
 *     comb=[[0,1,2],[0,1,3],[0,2,3],[1,2,3]]
 *     # other vertx: 3,2,1,0
 *     comb1=[3,2,1,0]             # <<<<<<<<<<<<<<
 * 
 *     # Four triangles of tetrahedron_1
 */
  __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_0);
  __pyx_v_comb1 = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1686
 * 
 *     # Four triangles of tetrahedron_1
 *     for i1 in range(len(comb)): # i1-th triangle of tetrahedron1             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tetrahedron_1[comb[i1][0]],tetrahedron_1[comb[i1][1]])
 *         tmp1a=np.append(tmp1a,tetrahedron_1[comb[i1][2]])
 */
  __pyx_t_6 = PyList_GET_SIZE(__pyx_v_comb); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1686, __pyx_L1_error)
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":1687
 *     # Four triangles of tetrahedron_1
 *     for i1 in range(len(comb)): # i1-th triangle of tetrahedron1
 *         tmp1a=np.append(tetrahedron_1[comb[i1][0]],tetrahedron_1[comb[i1][1]])             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp1a,tetrahedron_1[comb[i1][2]])
 *         counter1=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_t_2};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_t_2};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_2);
      __pyx_t_4 = 0;
      __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __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, 1687, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 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_9 < 0)) __PYX_ERR(0, 1687, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1688
 *     for i1 in range(len(comb)): # i1-th triangle of tetrahedron1
 *         tmp1a=np.append(tetrahedron_1[comb[i1][0]],tetrahedron_1[comb[i1][1]])
 *         tmp1a=np.append(tmp1a,tetrahedron_1[comb[i1][2]])             # <<<<<<<<<<<<<<
 *         counter1=0
 *         for i2 in range(len(comb)): # i2-th triangle of tetrahedron2
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_2); 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 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1688, __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_10)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1688, __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_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1688, __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_tmp1a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, ((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1688, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_5);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        }
        __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 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_9 < 0)) __PYX_ERR(0, 1688, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1689
 *         tmp1a=np.append(tetrahedron_1[comb[i1][0]],tetrahedron_1[comb[i1][1]])
 *         tmp1a=np.append(tmp1a,tetrahedron_1[comb[i1][2]])
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i2 in range(len(comb)): # i2-th triangle of tetrahedron2
 *             tmp1b=np.append(tetrahedron_2[comb[i2][0]],tetrahedron_2[comb[i2][1]])
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1690
 *         tmp1a=np.append(tmp1a,tetrahedron_1[comb[i1][2]])
 *         counter1=0
 *         for i2 in range(len(comb)): # i2-th triangle of tetrahedron2             # <<<<<<<<<<<<<<
 *             tmp1b=np.append(tetrahedron_2[comb[i2][0]],tetrahedron_2[comb[i2][1]])
 *             tmp1b=np.append(tmp1b,tetrahedron_2[comb[i2][2]])
 */
    __pyx_t_15 = PyList_GET_SIZE(__pyx_v_comb); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1690, __pyx_L1_error)
    __pyx_t_16 = __pyx_t_15;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_16; __pyx_t_9+=1) {
      __pyx_v_i2 = __pyx_t_9;

      /* "pyqcstrc/icosah/mics.pyx":1691
 *         counter1=0
 *         for i2 in range(len(comb)): # i2-th triangle of tetrahedron2
 *             tmp1b=np.append(tetrahedron_2[comb[i2][0]],tetrahedron_2[comb[i2][1]])             # <<<<<<<<<<<<<<
 *             tmp1b=np.append(tmp1b,tetrahedron_2[comb[i2][2]])
 *             # equivalent_triangle()
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_17 = 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_17 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_10, __pyx_t_3};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1691, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __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[3] = {__pyx_t_2, __pyx_t_10, __pyx_t_3};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1691, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_17, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_17, __pyx_t_3);
        __pyx_t_10 = 0;
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1691, __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_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_17 < 0)) {
          PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          }
          __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 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_17 < 0)) __PYX_ERR(0, 1691, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1692
 *         for i2 in range(len(comb)): # i2-th triangle of tetrahedron2
 *             tmp1b=np.append(tetrahedron_2[comb[i2][0]],tetrahedron_2[comb[i2][1]])
 *             tmp1b=np.append(tmp1b,tetrahedron_2[comb[i2][2]])             # <<<<<<<<<<<<<<
 *             # equivalent_triangle()
 *             # flag=0 (equivalent), 1 (non equivalent)
 */
      __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_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_comb, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_17 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_17 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), __pyx_t_4};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), __pyx_t_4};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 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_10, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1b));
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_17, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1692, __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_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_17 < 0)) {
          PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
          }
          __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 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_17 < 0)) __PYX_ERR(0, 1692, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1696
 *             # flag=0 (equivalent), 1 (non equivalent)
 *             #flag=equivalent_triangle(tmp1a,tmp1b)
 *             flag=equivalent_triangle_1(tmp1a,tmp1b)             # <<<<<<<<<<<<<<
 *             if flag==0:
 *                 counter1+=1
 */
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_5utils_equivalent_triangle_1(((PyArrayObject *)__pyx_v_tmp1a), ((PyArrayObject *)__pyx_v_tmp1b), 0);

      /* "pyqcstrc/icosah/mics.pyx":1697
 *             #flag=equivalent_triangle(tmp1a,tmp1b)
 *             flag=equivalent_triangle_1(tmp1a,tmp1b)
 *             if flag==0:             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 tmp3a=tmp1a.reshape(3,6,3) # common triangle
 */
      __pyx_t_18 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_18) {

        /* "pyqcstrc/icosah/mics.pyx":1698
 *             flag=equivalent_triangle_1(tmp1a,tmp1b)
 *             if flag==0:
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *                 tmp3a=tmp1a.reshape(3,6,3) # common triangle
 *                 tmp2a=tetrahedron_1[comb1[i1]] # a vertx of tetrahedron_1 which is not vertices of the common triangle.
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":1699
 *             if flag==0:
 *                 counter1+=1
 *                 tmp3a=tmp1a.reshape(3,6,3) # common triangle             # <<<<<<<<<<<<<<
 *                 tmp2a=tetrahedron_1[comb1[i1]] # a vertx of tetrahedron_1 which is not vertices of the common triangle.
 *                 tmp2b=tetrahedron_2[comb1[i2]] # a vertx of tetrahedron_2 which is not vertices of the common triangle.
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1699, __pyx_L1_error)
        __pyx_t_19 = ((PyArrayObject *)__pyx_t_1);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
            }
            __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 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_17 < 0)) __PYX_ERR(0, 1699, __pyx_L1_error)
        }
        __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1700
 *                 counter1+=1
 *                 tmp3a=tmp1a.reshape(3,6,3) # common triangle
 *                 tmp2a=tetrahedron_1[comb1[i1]] # a vertx of tetrahedron_1 which is not vertices of the common triangle.             # <<<<<<<<<<<<<<
 *                 tmp2b=tetrahedron_2[comb1[i2]] # a vertx of tetrahedron_2 which is not vertices of the common triangle.
 *                 break
 */
        __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_comb1, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_1), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1700, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1700, __pyx_L1_error)
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_5);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
            }
            __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 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_17 < 0)) __PYX_ERR(0, 1700, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1701
 *                 tmp3a=tmp1a.reshape(3,6,3) # common triangle
 *                 tmp2a=tetrahedron_1[comb1[i1]] # a vertx of tetrahedron_1 which is not vertices of the common triangle.
 *                 tmp2b=tetrahedron_2[comb1[i2]] # a vertx of tetrahedron_2 which is not vertices of the common triangle.             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
        __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_comb1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_tetrahedron_2), __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1701, __pyx_L1_error)
        __pyx_t_20 = ((PyArrayObject *)__pyx_t_1);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 0)) {
            PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
            }
            __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 0;
          }
          __pyx_pybuffernd_tmp2b.diminfo[0].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2b.diminfo[0].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2b.diminfo[1].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2b.diminfo[1].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[1];
          if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 1701, __pyx_L1_error)
        }
        __pyx_t_20 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp2b, ((PyArrayObject *)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1702
 *                 tmp2a=tetrahedron_1[comb1[i1]] # a vertx of tetrahedron_1 which is not vertices of the common triangle.
 *                 tmp2b=tetrahedron_2[comb1[i2]] # a vertx of tetrahedron_2 which is not vertices of the common triangle.
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L6_break;

        /* "pyqcstrc/icosah/mics.pyx":1697
 *             #flag=equivalent_triangle(tmp1a,tmp1b)
 *             flag=equivalent_triangle_1(tmp1a,tmp1b)
 *             if flag==0:             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 tmp3a=tmp1a.reshape(3,6,3) # common triangle
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":1704
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if counter1==1:
 *             break
 */
      /*else*/ {
      }
    }
    __pyx_L6_break:;

    /* "pyqcstrc/icosah/mics.pyx":1705
 *             else:
 *                 pass
 *         if counter1==1:             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
    __pyx_t_18 = ((__pyx_v_counter1 == 1) != 0);
    if (__pyx_t_18) {

      /* "pyqcstrc/icosah/mics.pyx":1706
 *                 pass
 *         if counter1==1:
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      goto __pyx_L4_break;

      /* "pyqcstrc/icosah/mics.pyx":1705
 *             else:
 *                 pass
 *         if counter1==1:             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":1708
 *             break
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if counter1==1:
 *         tmp1a=np.append(tmp2a,tmp2b)
 */
    /*else*/ {
    }
  }
  __pyx_L4_break:;

  /* "pyqcstrc/icosah/mics.pyx":1709
 *         else:
 *             pass
 *     if counter1==1:             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp2a,tmp2b)
 *         tmp1a=np.append(tmp3a,tmp1a)
 */
  __pyx_t_18 = ((__pyx_v_counter1 == 1) != 0);
  if (__pyx_t_18) {

    /* "pyqcstrc/icosah/mics.pyx":1710
 *             pass
 *     if counter1==1:
 *         tmp1a=np.append(tmp2a,tmp2b)             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp3a,tmp1a)
 *         return 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, 1710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp2a), ((PyObject *)__pyx_v_tmp2b)};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp2a), ((PyObject *)__pyx_v_tmp2b)};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp2a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2a));
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, ((PyObject *)__pyx_v_tmp2a));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp2b));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2b));
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, ((PyObject *)__pyx_v_tmp2b));
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1710, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_12);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_13, __pyx_t_12);
        }
        __pyx_t_14 = __pyx_t_13 = __pyx_t_12 = 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_8 < 0)) __PYX_ERR(0, 1710, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1711
 *     if counter1==1:
 *         tmp1a=np.append(tmp2a,tmp2b)
 *         tmp1a=np.append(tmp3a,tmp1a)             # <<<<<<<<<<<<<<
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_tmp3a), ((PyObject *)__pyx_v_tmp1a)};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_tmp3a), ((PyObject *)__pyx_v_tmp1a)};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, ((PyObject *)__pyx_v_tmp3a));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, ((PyObject *)__pyx_v_tmp1a));
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1711, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
        __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 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_8 < 0)) __PYX_ERR(0, 1711, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1712
 *         tmp1a=np.append(tmp2a,tmp2b)
 *         tmp1a=np.append(tmp3a,tmp1a)
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[0]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1712, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_6) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_5, __pyx_int_6, __pyx_int_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __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_10, __pyx_t_5, __pyx_int_6, __pyx_int_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_8, __pyx_int_3);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __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;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1712, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":1709
 *         else:
 *             pass
 *     if counter1==1:             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp2a,tmp2b)
 *         tmp1a=np.append(tmp3a,tmp1a)
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1714
 *         return tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *     else:
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray merge_three_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __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, 1714, __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, 1714, __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, 1714, __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, 1714, __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_1 = (__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_1)) __PYX_ERR(0, 1714, __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, 1714, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1671
 *         return obj
 * 
 * cdef np.ndarray check_two_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2):
 *     # check whether tetrahedron_1 and _2 are sharing a triangle surface or not.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  { 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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.check_two_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __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_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_comb);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF(__pyx_v_comb1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1716
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray merge_three_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2, \
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_3, \
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_three_tetrahedra(PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2, PyArrayObject *__pyx_v_tetrahedron_3, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  long __pyx_v_a1;
  long __pyx_v_b1;
  long __pyx_v_c1;
  long __pyx_v_a2;
  long __pyx_v_b2;
  long __pyx_v_c2;
  long __pyx_v_a3;
  long __pyx_v_b3;
  long __pyx_v_c3;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  long __pyx_v_v1;
  long __pyx_v_v2;
  long __pyx_v_v3;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp3c = 0;
  PyArrayObject *__pyx_v_tmp3d = 0;
  PyArrayObject *__pyx_v_tmp3e = 0;
  PyArrayObject *__pyx_v_tmp3f = 0;
  __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_tetrahedron_3;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_3;
  __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_tmp3b;
  __Pyx_Buffer __pyx_pybuffer_tmp3b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3c;
  __Pyx_Buffer __pyx_pybuffer_tmp3c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3d;
  __Pyx_Buffer __pyx_pybuffer_tmp3d;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3e;
  __Pyx_Buffer __pyx_pybuffer_tmp3e;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3f;
  __Pyx_Buffer __pyx_pybuffer_tmp3f;
  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;
  int __pyx_t_9;
  PyArrayObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_t_21;
  int __pyx_t_22;
  Py_UCS4 __pyx_t_23;
  __pyx_t_5numpy_float64_t __pyx_t_24;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_three_tetrahedra", 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_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_tmp3c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3c.refcount = 0;
  __pyx_pybuffernd_tmp3c.data = NULL;
  __pyx_pybuffernd_tmp3c.rcbuffer = &__pyx_pybuffer_tmp3c;
  __pyx_pybuffer_tmp3d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3d.refcount = 0;
  __pyx_pybuffernd_tmp3d.data = NULL;
  __pyx_pybuffernd_tmp3d.rcbuffer = &__pyx_pybuffer_tmp3d;
  __pyx_pybuffer_tmp3e.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3e.refcount = 0;
  __pyx_pybuffernd_tmp3e.data = NULL;
  __pyx_pybuffernd_tmp3e.rcbuffer = &__pyx_pybuffer_tmp3e;
  __pyx_pybuffer_tmp3f.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3f.refcount = 0;
  __pyx_pybuffernd_tmp3f.data = NULL;
  __pyx_pybuffernd_tmp3f.rcbuffer = &__pyx_pybuffer_tmp3f;
  __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_pybuffer_tetrahedron_3.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_3.refcount = 0;
  __pyx_pybuffernd_tetrahedron_3.data = NULL;
  __pyx_pybuffernd_tetrahedron_3.rcbuffer = &__pyx_pybuffer_tetrahedron_3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1716, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1716, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1716, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_3.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_3.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_3.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_3.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_3.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_3.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.shape[2];

  /* "pyqcstrc/icosah/mics.pyx":1727
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a,tmp3b,tmp3c,tmp3d,tmp3e,tmp3f
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         merge_three_tetrahedra()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":1727
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a,tmp3b,tmp3c,tmp3d,tmp3e,tmp3f
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         merge_three_tetrahedra()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":1730
 *         print('         merge_three_tetrahedra()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     # volume
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":1732
 *         pass
 *     # volume
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)             # <<<<<<<<<<<<<<
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)
 *     a3,b3,c3=tetrahedron_volume_6d(tetrahedron_3)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __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, 1732, __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, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1732, __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, 1732, __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, 1732, __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, 1732, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_a1 = __pyx_t_6;
  __pyx_v_b1 = __pyx_t_7;
  __pyx_v_c1 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":1733
 *     # volume
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)             # <<<<<<<<<<<<<<
 *     a3,b3,c3=tetrahedron_volume_6d(tetrahedron_3)
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron_2), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1733, __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, 1733, __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_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1733, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_a2 = __pyx_t_8;
  __pyx_v_b2 = __pyx_t_7;
  __pyx_v_c2 = __pyx_t_6;

  /* "pyqcstrc/icosah/mics.pyx":1734
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)
 *     a3,b3,c3=tetrahedron_volume_6d(tetrahedron_3)             # <<<<<<<<<<<<<<
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)
 *     v1,v2,v3=add(v1,v2,v3,a3,b3,c3)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron_3), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __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, 1734, __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, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1734, __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, 1734, __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, 1734, __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, 1734, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_a3 = __pyx_t_6;
  __pyx_v_b3 = __pyx_t_7;
  __pyx_v_c3 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":1735
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)
 *     a3,b3,c3=tetrahedron_volume_6d(tetrahedron_3)
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)             # <<<<<<<<<<<<<<
 *     v1,v2,v3=add(v1,v2,v3,a3,b3,c3)
 * 
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_a2, __pyx_v_b2, __pyx_v_c2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __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, 1735, __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_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1735, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1735, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_v1 = __pyx_t_8;
  __pyx_v_v2 = __pyx_t_7;
  __pyx_v_v3 = __pyx_t_6;

  /* "pyqcstrc/icosah/mics.pyx":1736
 *     a3,b3,c3=tetrahedron_volume_6d(tetrahedron_3)
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)
 *     v1,v2,v3=add(v1,v2,v3,a3,b3,c3)             # <<<<<<<<<<<<<<
 * 
 *     tmp1b=np.append(tetrahedron_1,tetrahedron_2)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_v1, __pyx_v_v2, __pyx_v_v3, __pyx_v_a3, __pyx_v_b3, __pyx_v_c3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __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, 1736, __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, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1736, __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, 1736, __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, 1736, __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, 1736, __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/mics.pyx":1738
 *     v1,v2,v3=add(v1,v2,v3,a3,b3,c3)
 * 
 *     tmp1b=np.append(tetrahedron_1,tetrahedron_2)             # <<<<<<<<<<<<<<
 *     tmp1b=np.append(tmp1b,tetrahedron_3)
 *     tmp3e=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1738, __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, 1738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tetrahedron_1), ((PyObject *)__pyx_v_tetrahedron_2)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __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_1), ((PyObject *)__pyx_v_tetrahedron_2)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __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_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1738, __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_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_1));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, ((PyObject *)__pyx_v_tetrahedron_1));
    __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_2));
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, ((PyObject *)__pyx_v_tetrahedron_2));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __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, 1738, __pyx_L1_error)
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_9 < 0)) __PYX_ERR(0, 1738, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1739
 * 
 *     tmp1b=np.append(tetrahedron_1,tetrahedron_2)
 *     tmp1b=np.append(tmp1b,tetrahedron_3)             # <<<<<<<<<<<<<<
 *     tmp3e=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  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_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tetrahedron_3)};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __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_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tetrahedron_3)};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 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_5, 0+__pyx_t_9, ((PyObject *)__pyx_v_tmp1b));
    __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_3));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, ((PyObject *)__pyx_v_tetrahedron_3));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __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, 1739, __pyx_L1_error)
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_9 < 0)) __PYX_ERR(0, 1739, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1740
 *     tmp1b=np.append(tetrahedron_1,tetrahedron_2)
 *     tmp1b=np.append(tmp1b,tetrahedron_3)
 *     tmp3e=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))             # <<<<<<<<<<<<<<
 * 
 *     flag=0
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1740, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_5, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __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_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_5, __pyx_int_6, __pyx_int_3};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __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_15 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_9, __pyx_t_5);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_9, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_9, __pyx_int_3);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __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, 1740, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_2), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3e.diminfo[0].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3e.diminfo[0].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3e.diminfo[1].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3e.diminfo[1].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3e.diminfo[2].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3e.diminfo[2].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1740, __pyx_L1_error)
  }
  __pyx_v_tmp3e = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1742
 *     tmp3e=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 * 
 *     flag=0             # <<<<<<<<<<<<<<
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 */
  __pyx_v_flag = 0;

  /* "pyqcstrc/icosah/mics.pyx":1743
 * 
 *     flag=0
 *     tmp3d=np.array([[[0]]])             # <<<<<<<<<<<<<<
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __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, 1743, __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, 1743, __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_15))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_15, function);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __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_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1743, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3d.diminfo[0].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3d.diminfo[0].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3d.diminfo[1].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3d.diminfo[1].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3d.diminfo[2].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3d.diminfo[2].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1743, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp3d = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1744
 *     flag=0
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)             # <<<<<<<<<<<<<<
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_9 < 0)) __PYX_ERR(0, 1744, __pyx_L1_error)
  }
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1745
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:
 */
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1745, __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_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1745, __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_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_15);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
  __pyx_t_15 = 0;
  __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1746
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)             # <<<<<<<<<<<<<<
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_3))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_9 < 0)) __PYX_ERR(0, 1746, __pyx_L1_error)
    }
    __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1747
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *             if tmp3c.tolist()!=[[[0]]]:
 */
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3b), __pyx_n_s_tolist); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1747, __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_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_15);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_15);
    __pyx_t_15 = 0;
    __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1747, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1748
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)             # <<<<<<<<<<<<<<
 *             if tmp3c.tolist()!=[[[0]]]:
 *                 flag=1
 */
      __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_2), ((PyArrayObject *)__pyx_v_tetrahedron_3))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
        __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_9 < 0)) {
          PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
        if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1748, __pyx_L1_error)
      }
      __pyx_v_tmp3c = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1749
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *             if tmp3c.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                 flag=1
 *             else:
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1749, __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_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1749, __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_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_15, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1750
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *             if tmp3c.tolist()!=[[[0]]]:
 *                 flag=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_flag = 1;

        /* "pyqcstrc/icosah/mics.pyx":1749
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *             if tmp3c.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                 flag=1
 *             else:
 */
        goto __pyx_L6;
      }

      /* "pyqcstrc/icosah/mics.pyx":1752
 *                 flag=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L6:;

      /* "pyqcstrc/icosah/mics.pyx":1747
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *             tmp3c=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *             if tmp3c.tolist()!=[[[0]]]:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":1754
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":1745
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":1756
 *             pass
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":1758
 *         pass
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         flag=1')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1759
 * 
 *     if verbose>0:
 *         print('         flag=1')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1758
 *         pass
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         flag=1')
 *     else:
 */
    goto __pyx_L7;
  }

  /* "pyqcstrc/icosah/mics.pyx":1761
 *         print('         flag=1')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1b=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L7:;

  /* "pyqcstrc/icosah/mics.pyx":1763
 *         pass
 * 
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp1c=np.array([0])
 *     if flag==1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1763, __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_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_15) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_15);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1763, __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, 1763, __pyx_L1_error)
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_9 < 0)) __PYX_ERR(0, 1763, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1764
 * 
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 *     if flag==1:
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __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_15))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_15, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __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, 1764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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, 1764, __pyx_L1_error)
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_9 < 0)) __PYX_ERR(0, 1764, __pyx_L1_error)
  }
  __pyx_t_10 = 0;
  __pyx_v_tmp1c = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1765
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])
 *     if flag==1:             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         tmp1a=np.append(tmp1a,tmp3b[3])
 */
  __pyx_t_1 = ((__pyx_v_flag == 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1766
 *     tmp1c=np.array([0])
 *     if flag==1:
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp1a,tmp3b[3])
 *         tmp1a=np.append(tmp1a,tmp3b[4])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_9 = 0;
    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_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_15, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_15, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_9, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_9, __pyx_t_5);
      __pyx_t_15 = 0;
      __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __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, 1766, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 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_4mics_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_9 < 0)) __PYX_ERR(0, 1766, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1767
 *     if flag==1:
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         tmp1a=np.append(tmp1a,tmp3b[3])             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp1a,tmp3b[4])
 *         tmp1a=np.append(tmp1a,tmp3c[3])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_17);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_17, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_17)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1767, __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_17)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1767, __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_15 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 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_15, 0+__pyx_t_9, ((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_9, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1767, __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, 1767, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 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_4mics_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_9 < 0)) __PYX_ERR(0, 1767, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1768
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         tmp1a=np.append(tmp1a,tmp3b[3])
 *         tmp1a=np.append(tmp1a,tmp3b[4])             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp1a,tmp3c[3])
 *         tmp1a=np.append(tmp1a,tmp3c[4])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_append); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_17};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_17};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1768, __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_tmp1a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, ((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 1768, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 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_4mics_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_9 < 0)) __PYX_ERR(0, 1768, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1769
 *         tmp1a=np.append(tmp1a,tmp3b[3])
 *         tmp1a=np.append(tmp1a,tmp3b[4])
 *         tmp1a=np.append(tmp1a,tmp3c[3])             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp1a,tmp3c[4])
 *         tmp3f=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_17 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_17, ((PyObject *)__pyx_v_tmp1a), __pyx_t_15};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[3] = {__pyx_t_17, ((PyObject *)__pyx_v_tmp1a), __pyx_t_15};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_17) {
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_17); __pyx_t_17 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, ((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1769, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 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_4mics_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_9 < 0)) __PYX_ERR(0, 1769, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1770
 *         tmp1a=np.append(tmp1a,tmp3b[4])
 *         tmp1a=np.append(tmp1a,tmp3c[3])
 *         tmp1a=np.append(tmp1a,tmp3c[4])             # <<<<<<<<<<<<<<
 *         tmp3f=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3d=remove_doubling_dim3_in_perp_space(tmp3f)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_15 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 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_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1770, __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_tmp1a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_9, ((PyObject *)__pyx_v_tmp1a));
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_9, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __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, 1770, __pyx_L1_error)
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 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_4mics_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_9 < 0)) __PYX_ERR(0, 1770, __pyx_L1_error)
    }
    __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1771
 *         tmp1a=np.append(tmp1a,tmp3c[3])
 *         tmp1a=np.append(tmp1a,tmp3c[4])
 *         tmp3f=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *         tmp3d=remove_doubling_dim3_in_perp_space(tmp3f)
 *         if verbose>0:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1771, __pyx_L1_error)
    __pyx_t_17 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 18.0)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_5 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_17, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_17, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_17);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_9, __pyx_t_17);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_9, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_9, __pyx_int_3);
      __pyx_t_17 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __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, 1771, __pyx_L1_error)
    __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3f, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3f.diminfo[0].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3f.diminfo[0].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3f.diminfo[1].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3f.diminfo[1].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3f.diminfo[2].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3f.diminfo[2].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1771, __pyx_L1_error)
    }
    __pyx_t_16 = 0;
    __pyx_v_tmp3f = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1772
 *         tmp1a=np.append(tmp1a,tmp3c[4])
 *         tmp3f=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3d=remove_doubling_dim3_in_perp_space(tmp3f)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         len(tmp3d)=',len(tmp3d))
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3f), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3d.diminfo[0].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3d.diminfo[0].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3d.diminfo[1].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3d.diminfo[1].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3d.diminfo[2].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3d.diminfo[2].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1772, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3d, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1773
 *         tmp3f=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3d=remove_doubling_dim3_in_perp_space(tmp3f)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         len(tmp3d)=',len(tmp3d))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1774
 *         tmp3d=remove_doubling_dim3_in_perp_space(tmp3f)
 *         if verbose>0:
 *             print('         len(tmp3d)=',len(tmp3d))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp3d)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1774, __pyx_L1_error)
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_kp_u_len_tmp3d);
      __Pyx_GIVEREF(__pyx_kp_u_len_tmp3d);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_len_tmp3d);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1774, __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/mics.pyx":1773
 *         tmp3f=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3d=remove_doubling_dim3_in_perp_space(tmp3f)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         len(tmp3d)=',len(tmp3d))
 *         else:
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/mics.pyx":1776
 *             print('         len(tmp3d)=',len(tmp3d))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         for i1 in range(len(tmp3e)):
 */
    /*else*/ {
    }
    __pyx_L9:;

    /* "pyqcstrc/icosah/mics.pyx":1778
 *             pass
 * 
 *         for i1 in range(len(tmp3e)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i2 in range(len(tmp3d)):
 */
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp3e)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1778, __pyx_L1_error)
    __pyx_t_18 = __pyx_t_14;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_18; __pyx_t_9+=1) {
      __pyx_v_i1 = __pyx_t_9;

      /* "pyqcstrc/icosah/mics.pyx":1779
 * 
 *         for i1 in range(len(tmp3e)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i2 in range(len(tmp3d)):
 *                 if np.all(tmp3e[i1]==tmp3d[i2]):
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1780
 *         for i1 in range(len(tmp3e)):
 *             counter1=0
 *             for i2 in range(len(tmp3d)):             # <<<<<<<<<<<<<<
 *                 if np.all(tmp3e[i1]==tmp3d[i2]):
 *                     counter1+=1
 */
      __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp3d)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1780, __pyx_L1_error)
      __pyx_t_20 = __pyx_t_19;
      for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) {
        __pyx_v_i2 = __pyx_t_21;

        /* "pyqcstrc/icosah/mics.pyx":1781
 *             counter1=0
 *             for i2 in range(len(tmp3d)):
 *                 if np.all(tmp3e[i1]==tmp3d[i2]):             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_all); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3d), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__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_5) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1781, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1782
 *             for i2 in range(len(tmp3d)):
 *                 if np.all(tmp3e[i1]==tmp3d[i2]):
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":1783
 *                 if np.all(tmp3e[i1]==tmp3d[i2]):
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L13_break;

          /* "pyqcstrc/icosah/mics.pyx":1781
 *             counter1=0
 *             for i2 in range(len(tmp3d)):
 *                 if np.all(tmp3e[i1]==tmp3d[i2]):             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":1785
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if len(tmp1b)==1:
 */
        /*else*/ {
        }
      }
      __pyx_L13_break:;

      /* "pyqcstrc/icosah/mics.pyx":1786
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1b)==1:
 *                     tmp1b=tmp3e[i1].reshape(18)
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1787
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                     tmp1b=tmp3e[i1].reshape(18)
 *                 else:
 */
        __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1787, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_19 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1788
 *             if counter1==0:
 *                 if len(tmp1b)==1:
 *                     tmp1b=tmp3e[i1].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1b=np.append(tmp1b,tmp3e[i1])
 */
          __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1788, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          __pyx_t_2 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_15, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __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, 1788, __pyx_L1_error)
          __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_21 < 0)) {
              PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_21 < 0)) __PYX_ERR(0, 1788, __pyx_L1_error)
          }
          __pyx_t_10 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1787
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                     tmp1b=tmp3e[i1].reshape(18)
 *                 else:
 */
          goto __pyx_L16;
        }

        /* "pyqcstrc/icosah/mics.pyx":1790
 *                     tmp1b=tmp3e[i1].reshape(18)
 *                 else:
 *                     tmp1b=np.append(tmp1b,tmp3e[i1])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1790, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1790, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1790, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_17 = NULL;
          __pyx_t_21 = 0;
          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_21 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_15)) {
            PyObject *__pyx_temp[3] = {__pyx_t_17, ((PyObject *)__pyx_v_tmp1b), __pyx_t_5};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 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_15)) {
            PyObject *__pyx_temp[3] = {__pyx_t_17, ((PyObject *)__pyx_v_tmp1b), __pyx_t_5};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 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_21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_17) {
              __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_17); __pyx_t_17 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_21, ((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_21, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 1790, __pyx_L1_error)
          __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_21 < 0)) {
              PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_21 < 0)) __PYX_ERR(0, 1790, __pyx_L1_error)
          }
          __pyx_t_10 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L16:;

        /* "pyqcstrc/icosah/mics.pyx":1786
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1b)==1:
 *                     tmp1b=tmp3e[i1].reshape(18)
 */
        goto __pyx_L15;
      }

      /* "pyqcstrc/icosah/mics.pyx":1792
 *                     tmp1b=np.append(tmp1b,tmp3e[i1])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 * 
 *         #print 'len(tmp1b)/18=',len(tmp1b)/18
 */
      /*else*/ {
      }
      __pyx_L15:;
    }

    /* "pyqcstrc/icosah/mics.pyx":1796
 *         #print 'len(tmp1b)/18=',len(tmp1b)/18
 * 
 *         tmp3f=np.array([[[0]]])             # <<<<<<<<<<<<<<
 *         tmp3e=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         counter2=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1796, __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_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_15);
    PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_15);
    __pyx_t_15 = 0;
    __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_5);
    PyList_SET_ITEM(__pyx_t_15, 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_15) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_15);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __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, 1796, __pyx_L1_error)
    __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3f, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3f.diminfo[0].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3f.diminfo[0].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3f.diminfo[1].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3f.diminfo[1].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3f.diminfo[2].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3f.diminfo[2].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1796, __pyx_L1_error)
    }
    __pyx_t_16 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp3f, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1797
 * 
 *         tmp3f=np.array([[[0]]])
 *         tmp3e=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *         counter2=0
 *         counter3=0
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1797, __pyx_L1_error)
    __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 18.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_5 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_15, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_15, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_9, __pyx_t_15);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_9, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_9, __pyx_int_3);
      __pyx_t_15 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __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, 1797, __pyx_L1_error)
    __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3e.diminfo[0].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3e.diminfo[0].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3e.diminfo[1].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3e.diminfo[1].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3e.diminfo[2].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3e.diminfo[2].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1797, __pyx_L1_error)
    }
    __pyx_t_16 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp3e, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1798
 *         tmp3f=np.array([[[0]]])
 *         tmp3e=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         counter2=0             # <<<<<<<<<<<<<<
 *         counter3=0
 *         for i1 in range(len(tmp3e)): # len(tmp3e)=2
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1799
 *         tmp3e=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         counter2=0
 *         counter3=0             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp3e)): # len(tmp3e)=2
 *             tmp1b=np.append(tmp3d,tmp3e[i1])
 */
    __pyx_v_counter3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1800
 *         counter2=0
 *         counter3=0
 *         for i1 in range(len(tmp3e)): # len(tmp3e)=2             # <<<<<<<<<<<<<<
 *             tmp1b=np.append(tmp3d,tmp3e[i1])
 *             if coplanar_check(tmp1b.reshape(int(len(tmp1b)/18),6,3))==0: # not coplanar
 */
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp3e)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1800, __pyx_L1_error)
    __pyx_t_18 = __pyx_t_14;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_18; __pyx_t_9+=1) {
      __pyx_v_i1 = __pyx_t_9;

      /* "pyqcstrc/icosah/mics.pyx":1801
 *         counter3=0
 *         for i1 in range(len(tmp3e)): # len(tmp3e)=2
 *             tmp1b=np.append(tmp3d,tmp3e[i1])             # <<<<<<<<<<<<<<
 *             if coplanar_check(tmp1b.reshape(int(len(tmp1b)/18),6,3))==0: # not coplanar
 *                 tmp3f=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = NULL;
      __pyx_t_21 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_15)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_21 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp3d), __pyx_t_3};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 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_17)) {
        PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp3d), __pyx_t_3};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_21, 2+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_21); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1801, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_15) {
          __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_15); __pyx_t_15 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp3d));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3d));
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_21, ((PyObject *)__pyx_v_tmp3d));
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_21, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 1801, __pyx_L1_error)
      __pyx_t_10 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
        __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_21 < 0)) {
          PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_21 < 0)) __PYX_ERR(0, 1801, __pyx_L1_error)
      }
      __pyx_t_10 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1802
 *         for i1 in range(len(tmp3e)): # len(tmp3e)=2
 *             tmp1b=np.append(tmp3d,tmp3e[i1])
 *             if coplanar_check(tmp1b.reshape(int(len(tmp1b)/18),6,3))==0: # not coplanar             # <<<<<<<<<<<<<<
 *                 tmp3f=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *                 counter2+=1
 */
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1802, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_19) / 18.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = NULL;
      __pyx_t_21 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_21 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_5, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_21, 3+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_5, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_21, 3+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(3+__pyx_t_21); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1802, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_21, __pyx_t_5);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_21, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_21, __pyx_int_3);
        __pyx_t_5 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __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, 1802, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check(((PyArrayObject *)__pyx_t_2), 0) == 0) != 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1803
 *             tmp1b=np.append(tmp3d,tmp3e[i1])
 *             if coplanar_check(tmp1b.reshape(int(len(tmp1b)/18),6,3))==0: # not coplanar
 *                 tmp3f=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *             else:
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1803, __pyx_L1_error)
        __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_19) / 18.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_5 = NULL;
        __pyx_t_21 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_21 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_17)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_15, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_21, 3+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_15, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_21, 3+__pyx_t_21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(3+__pyx_t_21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1803, __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_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_21, __pyx_t_15);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_21, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_21, __pyx_int_3);
          __pyx_t_15 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 1803, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
          __pyx_t_21 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_21 < 0)) {
            PyErr_Fetch(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3f, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3f.diminfo[0].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3f.diminfo[0].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3f.diminfo[1].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3f.diminfo[1].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3f.diminfo[2].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3f.diminfo[2].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[2];
          if (unlikely(__pyx_t_21 < 0)) __PYX_ERR(0, 1803, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp3f, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1804
 *             if coplanar_check(tmp1b.reshape(int(len(tmp1b)/18),6,3))==0: # not coplanar
 *                 tmp3f=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 counter3+=1
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);

        /* "pyqcstrc/icosah/mics.pyx":1802
 *         for i1 in range(len(tmp3e)): # len(tmp3e)=2
 *             tmp1b=np.append(tmp3d,tmp3e[i1])
 *             if coplanar_check(tmp1b.reshape(int(len(tmp1b)/18),6,3))==0: # not coplanar             # <<<<<<<<<<<<<<
 *                 tmp3f=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *                 counter2+=1
 */
        goto __pyx_L19;
      }

      /* "pyqcstrc/icosah/mics.pyx":1806
 *                 counter2+=1
 *             else:
 *                 counter3+=1             # <<<<<<<<<<<<<<
 *         if counter2==1 and counter3==1:
 *             if verbose>0:
 */
      /*else*/ {
        __pyx_v_counter3 = (__pyx_v_counter3 + 1);
      }
      __pyx_L19:;
    }

    /* "pyqcstrc/icosah/mics.pyx":1807
 *             else:
 *                 counter3+=1
 *         if counter2==1 and counter3==1:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)
 */
    __pyx_t_22 = ((__pyx_v_counter2 == 1) != 0);
    if (__pyx_t_22) {
    } else {
      __pyx_t_1 = __pyx_t_22;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_22 = ((__pyx_v_counter3 == 1) != 0);
    __pyx_t_1 = __pyx_t_22;
    __pyx_L21_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1808
 *                 counter3+=1
 *         if counter2==1 and counter3==1:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1809
 *         if counter2==1 and counter3==1:
 *             if verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)             # <<<<<<<<<<<<<<
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *                 print('         volume sum 3  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 */
        __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tmp3f), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1809, __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, 1809, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_17 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_15 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_15);
          #else
          __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1809, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1809, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_15 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1809, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1809, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_17); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1809, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1809, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_15); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1809, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_v_w1 = __pyx_t_8;
        __pyx_v_w2 = __pyx_t_7;
        __pyx_v_w3 = __pyx_t_6;

        /* "pyqcstrc/icosah/mics.pyx":1810
 *             if verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))             # <<<<<<<<<<<<<<
 *                 print('         volume sum 3  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *                 # sum of two tetrahedra is forming a tetrahedron
 */
        __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_14 = 0;
        __pyx_t_23 = 127;
        __Pyx_INCREF(__pyx_kp_u_volume_merged_tet);
        __pyx_t_14 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_volume_merged_tet);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_volume_merged_tet);
        __pyx_t_15 = __Pyx_PyUnicode_From_long(__pyx_v_w1, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
        __pyx_t_15 = __Pyx_PyUnicode_From_long(__pyx_v_w2, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
        __pyx_t_15 = __Pyx_PyUnicode_From_long(__pyx_v_w3, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__18);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
        __pyx_t_24 = (__pyx_v_w1 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_w2));
        if (unlikely(__pyx_v_w3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1810, __pyx_L1_error)
        }
        __pyx_t_15 = PyFloat_FromDouble((__pyx_t_24 / ((__pyx_t_5numpy_float64_t)__pyx_v_w3))); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_3 = __Pyx_PyObject_Format(__pyx_t_15, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_23 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_23) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_23;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__19);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_14, __pyx_t_23); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __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/mics.pyx":1811
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *                 print('         volume sum 3  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))             # <<<<<<<<<<<<<<
 *                 # sum of two tetrahedra is forming a tetrahedron
 *                 print('         merged')
 */
        __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_14 = 0;
        __pyx_t_23 = 127;
        __Pyx_INCREF(__pyx_kp_u_volume_sum_3_tet);
        __pyx_t_14 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_volume_sum_3_tet);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_volume_sum_3_tet);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14 += __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__17);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14 += __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__17);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14 += __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__18);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
        __pyx_t_24 = (__pyx_v_v1 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v2));
        if (unlikely(__pyx_v_v3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 1811, __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, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_15 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_23 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_23) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_23;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__19);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_14, __pyx_t_23); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1813
 *                 print('         volume sum 3  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *                 # sum of two tetrahedra is forming a tetrahedron
 *                 print('         merged')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1808
 *                 counter3+=1
 *         if counter2==1 and counter3==1:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 */
        goto __pyx_L23;
      }

      /* "pyqcstrc/icosah/mics.pyx":1815
 *                 print('         merged')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp3f.reshape(4,6,3)
 *         else:
 */
      /*else*/ {
      }
      __pyx_L23:;

      /* "pyqcstrc/icosah/mics.pyx":1816
 *             else:
 *                 pass
 *             return tmp3f.reshape(4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[0]]])
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3f), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1816, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_15);
      __pyx_t_15 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":1807
 *             else:
 *                 counter3+=1
 *         if counter2==1 and counter3==1:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp3f)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":1818
 *             return tmp3f.reshape(4,6,3)
 *         else:
 *             return np.array([[[0]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[0]]])
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __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, 1818, __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, 1818, __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_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_17);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_17)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_17);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_15 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_17, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1818, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_15);
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":1765
 *     tmp1b=np.array([0])
 *     tmp1c=np.array([0])
 *     if flag==1:             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         tmp1a=np.append(tmp1a,tmp3b[3])
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1820
 *             return np.array([[[0]]])
 *     else:
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray merge_four_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1,\
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1820, __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, 1820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1820, __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_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_17);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_15 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1820, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1716
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray merge_three_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2, \
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_3, \
 */

  /* 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_15);
  __Pyx_XDECREF(__pyx_t_17);
  { 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_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_3.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_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.merge_three_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_3.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_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.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_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3d);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3e);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3f);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1822
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray merge_four_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_3,\
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_four_tetrahedra(PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2, PyArrayObject *__pyx_v_tetrahedron_3, PyArrayObject *__pyx_v_tetrahedron_4, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter1;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp3c = 0;
  PyArrayObject *__pyx_v_tmp3d = 0;
  PyArrayObject *__pyx_v_tmp3e = 0;
  PyArrayObject *__pyx_v_tmp3f = 0;
  PyArrayObject *__pyx_v_tmp3g = 0;
  PyArrayObject *__pyx_v_tmp3h = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  double __pyx_v_vol2;
  double __pyx_v_vol1;
  __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_tetrahedron_3;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tetrahedron_4;
  __Pyx_Buffer __pyx_pybuffer_tetrahedron_4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __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_tmp3c;
  __Pyx_Buffer __pyx_pybuffer_tmp3c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3d;
  __Pyx_Buffer __pyx_pybuffer_tmp3d;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3e;
  __Pyx_Buffer __pyx_pybuffer_tmp3e;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3f;
  __Pyx_Buffer __pyx_pybuffer_tmp3f;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3g;
  __Pyx_Buffer __pyx_pybuffer_tmp3g;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3h;
  __Pyx_Buffer __pyx_pybuffer_tmp3h;
  __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;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_four_tetrahedra", 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_tmp3b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3b.refcount = 0;
  __pyx_pybuffernd_tmp3b.data = NULL;
  __pyx_pybuffernd_tmp3b.rcbuffer = &__pyx_pybuffer_tmp3b;
  __pyx_pybuffer_tmp3c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3c.refcount = 0;
  __pyx_pybuffernd_tmp3c.data = NULL;
  __pyx_pybuffernd_tmp3c.rcbuffer = &__pyx_pybuffer_tmp3c;
  __pyx_pybuffer_tmp3d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3d.refcount = 0;
  __pyx_pybuffernd_tmp3d.data = NULL;
  __pyx_pybuffernd_tmp3d.rcbuffer = &__pyx_pybuffer_tmp3d;
  __pyx_pybuffer_tmp3e.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3e.refcount = 0;
  __pyx_pybuffernd_tmp3e.data = NULL;
  __pyx_pybuffernd_tmp3e.rcbuffer = &__pyx_pybuffer_tmp3e;
  __pyx_pybuffer_tmp3f.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3f.refcount = 0;
  __pyx_pybuffernd_tmp3f.data = NULL;
  __pyx_pybuffernd_tmp3f.rcbuffer = &__pyx_pybuffer_tmp3f;
  __pyx_pybuffer_tmp3g.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3g.refcount = 0;
  __pyx_pybuffernd_tmp3g.data = NULL;
  __pyx_pybuffernd_tmp3g.rcbuffer = &__pyx_pybuffer_tmp3g;
  __pyx_pybuffer_tmp3h.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3h.refcount = 0;
  __pyx_pybuffernd_tmp3h.data = NULL;
  __pyx_pybuffernd_tmp3h.rcbuffer = &__pyx_pybuffer_tmp3h;
  __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_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_pybuffer_tetrahedron_3.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_3.refcount = 0;
  __pyx_pybuffernd_tetrahedron_3.data = NULL;
  __pyx_pybuffernd_tetrahedron_3.rcbuffer = &__pyx_pybuffer_tetrahedron_3;
  __pyx_pybuffer_tetrahedron_4.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron_4.refcount = 0;
  __pyx_pybuffernd_tetrahedron_4.data = NULL;
  __pyx_pybuffernd_tetrahedron_4.rcbuffer = &__pyx_pybuffer_tetrahedron_4;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1822, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1822, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_3.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_3.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_3.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_3.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_3.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_3.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron_4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1822, __pyx_L1_error)
  }
  __pyx_pybuffernd_tetrahedron_4.diminfo[0].strides = __pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tetrahedron_4.diminfo[0].shape = __pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tetrahedron_4.diminfo[1].strides = __pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tetrahedron_4.diminfo[1].shape = __pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tetrahedron_4.diminfo[2].strides = __pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tetrahedron_4.diminfo[2].shape = __pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer.shape[2];

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

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

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

  /* "pyqcstrc/icosah/mics.pyx":1838
 *         print('         merge_four_tetrahedra()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     """
 *     # volume
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":1855
 *     tmp3e=remove_doubling_dim3_in_perp_space(tmp1b.reshape(len(tmp1b)/18,6,3))
 *     """
 *     flag=0             # <<<<<<<<<<<<<<
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 */
  __pyx_v_flag = 0;

  /* "pyqcstrc/icosah/mics.pyx":1856
 *     """
 *     flag=0
 *     tmp3d=np.array([[[0]]])             # <<<<<<<<<<<<<<
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __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, 1856, __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, 1856, __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, 1856, __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, 1856, __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 = 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, 1856, __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, 1856, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3d.diminfo[0].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3d.diminfo[0].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3d.diminfo[1].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3d.diminfo[1].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3d.diminfo[2].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3d.diminfo[2].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1856, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp3d = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1857
 *     flag=0
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)             # <<<<<<<<<<<<<<
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_2))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 1857, __pyx_L1_error)
  }
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":1858
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1858, __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, 1858, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1858, __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_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1859
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)             # <<<<<<<<<<<<<<
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)
 */
    __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_3))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 1859, __pyx_L1_error)
    }
    __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1860
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)
 *             if tmp3c.tolist()!=[[[0]]]:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3b), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __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, 1860, __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, 1860, __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, 1860, __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, 1860, __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 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1860, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1861
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)             # <<<<<<<<<<<<<<
 *             if tmp3c.tolist()!=[[[0]]]:
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_4))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
        if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1861, __pyx_L1_error)
      }
      __pyx_v_tmp3c = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1862
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)
 *             if tmp3c.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *                 if tmp3d.tolist()!=[[[0]]]:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __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, 1862, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __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_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1862, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1863
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)
 *             if tmp3c.tolist()!=[[[0]]]:
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)             # <<<<<<<<<<<<<<
 *                 if tmp3d.tolist()!=[[[0]]]:
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)
 */
        __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_2), ((PyArrayObject *)__pyx_v_tetrahedron_3))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
          __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3d.diminfo[0].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3d.diminfo[0].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3d.diminfo[1].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3d.diminfo[1].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3d.diminfo[2].strides = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3d.diminfo[2].shape = __pyx_pybuffernd_tmp3d.rcbuffer->pybuffer.shape[2];
          if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1863, __pyx_L1_error)
        }
        __Pyx_DECREF_SET(__pyx_v_tmp3d, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1864
 *             if tmp3c.tolist()!=[[[0]]]:
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *                 if tmp3d.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)
 *                     if tmp3e.tolist()!=[[[0]]]:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3d), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1864, __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, 1864, __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, 1864, __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, 1864, __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, 1864, __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 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1865
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *                 if tmp3d.tolist()!=[[[0]]]:
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)             # <<<<<<<<<<<<<<
 *                     if tmp3e.tolist()!=[[[0]]]:
 *                         tmp3f=check_two_tetrahedra(tetrahedron_3,tetrahedron_4)
 */
          __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_2), ((PyArrayObject *)__pyx_v_tetrahedron_4))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
            __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3e.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3e, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3e.diminfo[0].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3e.diminfo[0].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3e.diminfo[1].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3e.diminfo[1].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3e.diminfo[2].strides = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3e.diminfo[2].shape = __pyx_pybuffernd_tmp3e.rcbuffer->pybuffer.shape[2];
            if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1865, __pyx_L1_error)
          }
          __pyx_v_tmp3e = ((PyArrayObject *)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1866
 *                 if tmp3d.tolist()!=[[[0]]]:
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)
 *                     if tmp3e.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                         tmp3f=check_two_tetrahedra(tetrahedron_3,tetrahedron_4)
 *                         if tmp3f.tolist()!=[[[0]]]:
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3e), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __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, 1866, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_3);
          PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __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_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1866, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1867
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)
 *                     if tmp3e.tolist()!=[[[0]]]:
 *                         tmp3f=check_two_tetrahedra(tetrahedron_3,tetrahedron_4)             # <<<<<<<<<<<<<<
 *                         if tmp3f.tolist()!=[[[0]]]:
 *                             #
 */
            __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_3), ((PyArrayObject *)__pyx_v_tetrahedron_4))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1867, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
              __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3f.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3f, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3f.diminfo[0].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3f.diminfo[0].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3f.diminfo[1].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3f.diminfo[1].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3f.diminfo[2].strides = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3f.diminfo[2].shape = __pyx_pybuffernd_tmp3f.rcbuffer->pybuffer.shape[2];
              if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1867, __pyx_L1_error)
            }
            __pyx_v_tmp3f = ((PyArrayObject *)__pyx_t_3);
            __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1868
 *                     if tmp3e.tolist()!=[[[0]]]:
 *                         tmp3f=check_two_tetrahedra(tetrahedron_3,tetrahedron_4)
 *                         if tmp3f.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                             #
 *                             tmp1a=np.append(tmp3a[0],tmp3a[1])
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3f), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1868, __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, 1868, __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, 1868, __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, 1868, __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, 1868, __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 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1868, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1868, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1870
 *                         if tmp3f.tolist()!=[[[0]]]:
 *                             #
 *                             tmp1a=np.append(tmp3a[0],tmp3a[1])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3a[2])
 *                             tmp1a=np.append(tmp1a,tmp3b[0])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1870, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1870, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1870, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1870, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_11 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_4, __pyx_t_5};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __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;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_4, __pyx_t_5};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __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;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1870, __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_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_t_4);
                __Pyx_GIVEREF(__pyx_t_5);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_5);
                __pyx_t_4 = 0;
                __pyx_t_5 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __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, 1870, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1870, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1871
 *                             #
 *                             tmp1a=np.append(tmp3a[0],tmp3a[1])
 *                             tmp1a=np.append(tmp1a,tmp3a[2])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3b[0])
 *                             tmp1a=np.append(tmp1a,tmp3b[1])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1871, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __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_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __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_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_3);
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_3);
                __pyx_t_3 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1871, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1871, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1872
 *                             tmp1a=np.append(tmp3a[0],tmp3a[1])
 *                             tmp1a=np.append(tmp1a,tmp3a[2])
 *                             tmp1a=np.append(tmp1a,tmp3b[0])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3b[1])
 *                             tmp1a=np.append(tmp1a,tmp3b[2])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1872, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1872, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1872, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_3 = NULL;
              __pyx_t_7 = 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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1872, __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_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_12);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_12);
                __pyx_t_12 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __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, 1872, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1872, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1873
 *                             tmp1a=np.append(tmp1a,tmp3a[2])
 *                             tmp1a=np.append(tmp1a,tmp3b[0])
 *                             tmp1a=np.append(tmp1a,tmp3b[1])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3b[2])
 *                             tmp1a=np.append(tmp1a,tmp3c[0])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1873, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1873, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1873, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_12 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_12);
                  __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[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_5)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_4);
                __pyx_t_4 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1873, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1873, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1874
 *                             tmp1a=np.append(tmp1a,tmp3b[0])
 *                             tmp1a=np.append(tmp1a,tmp3b[1])
 *                             tmp1a=np.append(tmp1a,tmp3b[2])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3c[0])
 *                             tmp1a=np.append(tmp1a,tmp3c[1])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1874, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1874, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1874, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_4 = NULL;
              __pyx_t_7 = 0;
              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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __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_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __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_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1874, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 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_12, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_5);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_5);
                __pyx_t_5 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __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, 1874, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1874, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1875
 *                             tmp1a=np.append(tmp1a,tmp3b[1])
 *                             tmp1a=np.append(tmp1a,tmp3b[2])
 *                             tmp1a=np.append(tmp1a,tmp3c[0])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3c[1])
 *                             tmp1a=np.append(tmp1a,tmp3c[2])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1875, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __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_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __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_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_3);
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_3);
                __pyx_t_3 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1875, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1875, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1876
 *                             tmp1a=np.append(tmp1a,tmp3b[2])
 *                             tmp1a=np.append(tmp1a,tmp3c[0])
 *                             tmp1a=np.append(tmp1a,tmp3c[1])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3c[2])
 *                             tmp1a=np.append(tmp1a,tmp3d[0])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1876, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1876, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1876, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_3 = NULL;
              __pyx_t_7 = 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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1876, __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_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_12);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_12);
                __pyx_t_12 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __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, 1876, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1876, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1877
 *                             tmp1a=np.append(tmp1a,tmp3c[0])
 *                             tmp1a=np.append(tmp1a,tmp3c[1])
 *                             tmp1a=np.append(tmp1a,tmp3c[2])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3d[0])
 *                             tmp1a=np.append(tmp1a,tmp3d[1])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1877, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3c), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_12 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_12);
                  __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[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_5)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_4);
                __pyx_t_4 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1877, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1877, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1878
 *                             tmp1a=np.append(tmp1a,tmp3c[1])
 *                             tmp1a=np.append(tmp1a,tmp3c[2])
 *                             tmp1a=np.append(tmp1a,tmp3d[0])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3d[1])
 *                             tmp1a=np.append(tmp1a,tmp3d[2])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1878, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3d), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1878, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_4 = NULL;
              __pyx_t_7 = 0;
              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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __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_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __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_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1878, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 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_12, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_5);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_5);
                __pyx_t_5 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __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, 1878, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1878, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1879
 *                             tmp1a=np.append(tmp1a,tmp3c[2])
 *                             tmp1a=np.append(tmp1a,tmp3d[0])
 *                             tmp1a=np.append(tmp1a,tmp3d[1])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3d[2])
 *                             tmp1a=np.append(tmp1a,tmp3e[0])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1879, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3d), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __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_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __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_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_3);
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_3);
                __pyx_t_3 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1879, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1879, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1880
 *                             tmp1a=np.append(tmp1a,tmp3d[0])
 *                             tmp1a=np.append(tmp1a,tmp3d[1])
 *                             tmp1a=np.append(tmp1a,tmp3d[2])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3e[0])
 *                             tmp1a=np.append(tmp1a,tmp3e[1])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1880, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1880, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3d), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1880, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_3 = NULL;
              __pyx_t_7 = 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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1880, __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_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_12);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_12);
                __pyx_t_12 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __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, 1880, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1880, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1881
 *                             tmp1a=np.append(tmp1a,tmp3d[1])
 *                             tmp1a=np.append(tmp1a,tmp3d[2])
 *                             tmp1a=np.append(tmp1a,tmp3e[0])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3e[1])
 *                             tmp1a=np.append(tmp1a,tmp3e[2])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1881, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1881, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1881, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_12 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_12);
                  __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[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_5)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_4);
                __pyx_t_4 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1881, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1881, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1882
 *                             tmp1a=np.append(tmp1a,tmp3d[2])
 *                             tmp1a=np.append(tmp1a,tmp3e[0])
 *                             tmp1a=np.append(tmp1a,tmp3e[1])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3e[2])
 *                             tmp1a=np.append(tmp1a,tmp3f[0])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1882, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1882, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_4 = NULL;
              __pyx_t_7 = 0;
              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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __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_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __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_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1882, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 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_12, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_5);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_5);
                __pyx_t_5 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __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, 1882, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1882, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1883
 *                             tmp1a=np.append(tmp1a,tmp3e[0])
 *                             tmp1a=np.append(tmp1a,tmp3e[1])
 *                             tmp1a=np.append(tmp1a,tmp3e[2])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3f[0])
 *                             tmp1a=np.append(tmp1a,tmp3f[1])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1883, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1883, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3e), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1883, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __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_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __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_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1883, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_3);
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_3);
                __pyx_t_3 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1883, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1883, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1884
 *                             tmp1a=np.append(tmp1a,tmp3e[1])
 *                             tmp1a=np.append(tmp1a,tmp3e[2])
 *                             tmp1a=np.append(tmp1a,tmp3f[0])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3f[1])
 *                             tmp1a=np.append(tmp1a,tmp3f[2])
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1884, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3f), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1884, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_3 = NULL;
              __pyx_t_7 = 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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_12};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1884, __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_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_12);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_12);
                __pyx_t_12 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __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, 1884, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1884, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1885
 *                             tmp1a=np.append(tmp1a,tmp3e[2])
 *                             tmp1a=np.append(tmp1a,tmp3f[0])
 *                             tmp1a=np.append(tmp1a,tmp3f[1])             # <<<<<<<<<<<<<<
 *                             tmp1a=np.append(tmp1a,tmp3f[2])
 *                             tmp3g=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3f), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_12 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_12);
                  __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[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_5)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_4);
                __pyx_t_4 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1885, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1885, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1886
 *                             tmp1a=np.append(tmp1a,tmp3f[0])
 *                             tmp1a=np.append(tmp1a,tmp3f[1])
 *                             tmp1a=np.append(tmp1a,tmp3f[2])             # <<<<<<<<<<<<<<
 *                             tmp3g=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *                             tmp3h=remove_doubling_dim3_in_perp_space(tmp3g)
 */
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3f), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_4 = NULL;
              __pyx_t_7 = 0;
              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_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __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_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __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_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1886, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 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_12, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_5);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_5);
                __pyx_t_5 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __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, 1886, __pyx_L1_error)
              __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_7 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1886, __pyx_L1_error)
              }
              __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1887
 *                             tmp1a=np.append(tmp1a,tmp3f[1])
 *                             tmp1a=np.append(tmp1a,tmp3f[2])
 *                             tmp3g=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *                             tmp3h=remove_doubling_dim3_in_perp_space(tmp3g)
 *                             #
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1887, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1887, __pyx_L1_error)
              __pyx_t_12 = __Pyx_PyInt_FromDouble((((double)__pyx_t_14) / 18.0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1887, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_5 = NULL;
              __pyx_t_7 = 0;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_7 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_12, __pyx_int_6, __pyx_int_3};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
                PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_12, __pyx_int_6, __pyx_int_3};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else
              #endif
              {
                __pyx_t_4 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
                }
                __Pyx_GIVEREF(__pyx_t_12);
                PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_t_12);
                __Pyx_INCREF(__pyx_int_6);
                __Pyx_GIVEREF(__pyx_int_6);
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_int_6);
                __Pyx_INCREF(__pyx_int_3);
                __Pyx_GIVEREF(__pyx_int_3);
                PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_7, __pyx_int_3);
                __pyx_t_12 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1887, __pyx_L1_error)
              __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3g.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3g.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3g.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3g, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3g.diminfo[0].strides = __pyx_pybuffernd_tmp3g.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3g.diminfo[0].shape = __pyx_pybuffernd_tmp3g.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3g.diminfo[1].strides = __pyx_pybuffernd_tmp3g.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3g.diminfo[1].shape = __pyx_pybuffernd_tmp3g.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3g.diminfo[2].strides = __pyx_pybuffernd_tmp3g.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3g.diminfo[2].shape = __pyx_pybuffernd_tmp3g.rcbuffer->pybuffer.shape[2];
                if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1887, __pyx_L1_error)
              }
              __pyx_t_6 = 0;
              __pyx_v_tmp3g = ((PyArrayObject *)__pyx_t_2);
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1888
 *                             tmp1a=np.append(tmp1a,tmp3f[2])
 *                             tmp3g=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *                             tmp3h=remove_doubling_dim3_in_perp_space(tmp3g)             # <<<<<<<<<<<<<<
 *                             #
 *                             flag=1
 */
              __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3g), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1888, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3h.rcbuffer->pybuffer);
                __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3h.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3h.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3h, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3h.diminfo[0].strides = __pyx_pybuffernd_tmp3h.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3h.diminfo[0].shape = __pyx_pybuffernd_tmp3h.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3h.diminfo[1].strides = __pyx_pybuffernd_tmp3h.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3h.diminfo[1].shape = __pyx_pybuffernd_tmp3h.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3h.diminfo[2].strides = __pyx_pybuffernd_tmp3h.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3h.diminfo[2].shape = __pyx_pybuffernd_tmp3h.rcbuffer->pybuffer.shape[2];
                if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1888, __pyx_L1_error)
              }
              __pyx_v_tmp3h = ((PyArrayObject *)__pyx_t_2);
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1890
 *                             tmp3h=remove_doubling_dim3_in_perp_space(tmp3g)
 *                             #
 *                             flag=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_v_flag = 1;

              /* "pyqcstrc/icosah/mics.pyx":1868
 *                     if tmp3e.tolist()!=[[[0]]]:
 *                         tmp3f=check_two_tetrahedra(tetrahedron_3,tetrahedron_4)
 *                         if tmp3f.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                             #
 *                             tmp1a=np.append(tmp3a[0],tmp3a[1])
 */
              goto __pyx_L9;
            }

            /* "pyqcstrc/icosah/mics.pyx":1892
 *                             flag=1
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
            }
            __pyx_L9:;

            /* "pyqcstrc/icosah/mics.pyx":1866
 *                 if tmp3d.tolist()!=[[[0]]]:
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)
 *                     if tmp3e.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                         tmp3f=check_two_tetrahedra(tetrahedron_3,tetrahedron_4)
 *                         if tmp3f.tolist()!=[[[0]]]:
 */
            goto __pyx_L8;
          }

          /* "pyqcstrc/icosah/mics.pyx":1894
 *                             pass
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          /*else*/ {
          }
          __pyx_L8:;

          /* "pyqcstrc/icosah/mics.pyx":1864
 *             if tmp3c.tolist()!=[[[0]]]:
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *                 if tmp3d.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                     tmp3e=check_two_tetrahedra(tetrahedron_2,tetrahedron_4)
 *                     if tmp3e.tolist()!=[[[0]]]:
 */
          goto __pyx_L7;
        }

        /* "pyqcstrc/icosah/mics.pyx":1896
 *                         pass
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
        }
        __pyx_L7:;

        /* "pyqcstrc/icosah/mics.pyx":1862
 *         if tmp3b.tolist()!=[[[0]]]:
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)
 *             if tmp3c.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                 tmp3d=check_two_tetrahedra(tetrahedron_2,tetrahedron_3)
 *                 if tmp3d.tolist()!=[[[0]]]:
 */
        goto __pyx_L6;
      }

      /* "pyqcstrc/icosah/mics.pyx":1898
 *                     pass
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L6:;

      /* "pyqcstrc/icosah/mics.pyx":1860
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *             tmp3c=check_two_tetrahedra(tetrahedron_1,tetrahedron_4)
 *             if tmp3c.tolist()!=[[[0]]]:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":1900
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":1858
 *     tmp3d=np.array([[[0]]])
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         tmp3b=check_two_tetrahedra(tetrahedron_1,tetrahedron_3)
 *         if tmp3b.tolist()!=[[[0]]]:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":1902
 *             pass
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if flag==1:
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":1904
 *         pass
 * 
 *     if flag==1:             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp3h)):
 */
  __pyx_t_1 = ((__pyx_v_flag == 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1905
 * 
 *     if flag==1:
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp3h)):
 *             counter1=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1905, __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, 1905, __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, 1905, __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_12 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __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, 1905, __pyx_L1_error)
    __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1905, __pyx_L1_error)
    }
    __pyx_t_13 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1906
 *     if flag==1:
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp3h)):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i2 in range(len(tmp3g)):
 */
    __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp3h)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1906, __pyx_L1_error)
    __pyx_t_15 = __pyx_t_14;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_15; __pyx_t_7+=1) {
      __pyx_v_i1 = __pyx_t_7;

      /* "pyqcstrc/icosah/mics.pyx":1907
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp3h)):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i2 in range(len(tmp3g)):
 *                 if np.all(tmp3h[i1]==tmp3g[i2]):
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1908
 *         for i1 in range(len(tmp3h)):
 *             counter1=0
 *             for i2 in range(len(tmp3g)):             # <<<<<<<<<<<<<<
 *                 if np.all(tmp3h[i1]==tmp3g[i2]):
 *                     counter1+=1
 */
      __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp3g)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1908, __pyx_L1_error)
      __pyx_t_17 = __pyx_t_16;
      for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
        __pyx_v_i2 = __pyx_t_18;

        /* "pyqcstrc/icosah/mics.pyx":1909
 *             counter1=0
 *             for i2 in range(len(tmp3g)):
 *                 if np.all(tmp3h[i1]==tmp3g[i2]):             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                 else:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_all); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3h), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3g), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1909, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1910
 *             for i2 in range(len(tmp3g)):
 *                 if np.all(tmp3h[i1]==tmp3g[i2]):
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":1909
 *             counter1=0
 *             for i2 in range(len(tmp3g)):
 *                 if np.all(tmp3h[i1]==tmp3g[i2]):             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "pyqcstrc/icosah/mics.pyx":1912
 *                     counter1+=1
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             #print '%d %d'%(i1,counter1)
 *             if counter1==6:
 */
        /*else*/ {
        }
        __pyx_L15:;
      }

      /* "pyqcstrc/icosah/mics.pyx":1914
 *                     pass
 *             #print '%d %d'%(i1,counter1)
 *             if counter1==6:             # <<<<<<<<<<<<<<
 *                 pass
 *             elif counter1!=6:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 6) != 0);
      if (__pyx_t_1) {
        goto __pyx_L16;
      }

      /* "pyqcstrc/icosah/mics.pyx":1916
 *             if counter1==6:
 *                 pass
 *             elif counter1!=6:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp3h[i1].reshape(18)
 */
      __pyx_t_1 = ((__pyx_v_counter1 != 6) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":1917
 *                 pass
 *             elif counter1!=6:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3h[i1].reshape(18)
 *                 else:
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1917, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_16 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":1918
 *             elif counter1!=6:
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp3h[i1].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3h[i1])
 */
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3h), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1918, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1918, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __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_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __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, 1918, __pyx_L1_error)
          __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_18 < 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_4mics_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_18 < 0)) __PYX_ERR(0, 1918, __pyx_L1_error)
          }
          __pyx_t_13 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1917
 *                 pass
 *             elif counter1!=6:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3h[i1].reshape(18)
 *                 else:
 */
          goto __pyx_L17;
        }

        /* "pyqcstrc/icosah/mics.pyx":1920
 *                     tmp1a=tmp3h[i1].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3h[i1])             # <<<<<<<<<<<<<<
 * 
 *         if verbose>1:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3h), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_12 = NULL;
          __pyx_t_18 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_18 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_12) {
              __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __pyx_t_12 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_18, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_18, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1920, __pyx_L1_error)
          __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_18 < 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_4mics_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_18 < 0)) __PYX_ERR(0, 1920, __pyx_L1_error)
          }
          __pyx_t_13 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L17:;

        /* "pyqcstrc/icosah/mics.pyx":1916
 *             if counter1==6:
 *                 pass
 *             elif counter1!=6:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp3h[i1].reshape(18)
 */
      }
      __pyx_L16:;
    }

    /* "pyqcstrc/icosah/mics.pyx":1922
 *                     tmp1a=np.append(tmp1a,tmp3h[i1])
 * 
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             tmp4b=tmp1a.reshape(4,6,3)
 *             vol2=tetrahedron_volume_6d_numerical(tmp4b)
 */
    __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1923
 * 
 *         if verbose>1:
 *             tmp4b=tmp1a.reshape(4,6,3)             # <<<<<<<<<<<<<<
 *             vol2=tetrahedron_volume_6d_numerical(tmp4b)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1923, __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, 1923, __pyx_L1_error)
      __pyx_t_19 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_7 < 0)) __PYX_ERR(0, 1923, __pyx_L1_error)
      }
      __pyx_t_19 = 0;
      __pyx_v_tmp4b = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1924
 *         if verbose>1:
 *             tmp4b=tmp1a.reshape(4,6,3)
 *             vol2=tetrahedron_volume_6d_numerical(tmp4b)             # <<<<<<<<<<<<<<
 * 
 *             tmp1a=np.append(tetrahedron_1,tetrahedron_2)
 */
      __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_tetrahedron_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4b), 0);

      /* "pyqcstrc/icosah/mics.pyx":1926
 *             vol2=tetrahedron_volume_6d_numerical(tmp4b)
 * 
 *             tmp1a=np.append(tetrahedron_1,tetrahedron_2)             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(tmp1a,tetrahedron_3)
 *             tmp1a=np.append(tmp1a,tetrahedron_4)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __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, 1926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tetrahedron_1), ((PyObject *)__pyx_v_tetrahedron_2)};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tetrahedron_1), ((PyObject *)__pyx_v_tetrahedron_2)};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron_1));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_1));
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, ((PyObject *)__pyx_v_tetrahedron_1));
        __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron_2));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_2));
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, ((PyObject *)__pyx_v_tetrahedron_2));
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1926, __pyx_L1_error)
      __pyx_t_13 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1926, __pyx_L1_error)
      }
      __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1927
 * 
 *             tmp1a=np.append(tetrahedron_1,tetrahedron_2)
 *             tmp1a=np.append(tmp1a,tetrahedron_3)             # <<<<<<<<<<<<<<
 *             tmp1a=np.append(tmp1a,tetrahedron_4)
 *             tmp4a=tmp1a.reshape(4,4,6,3)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      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_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tetrahedron_3)};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tetrahedron_3)};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1927, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 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_2, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron_3));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_3));
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, ((PyObject *)__pyx_v_tetrahedron_3));
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __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, 1927, __pyx_L1_error)
      __pyx_t_13 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_7 < 0)) {
          PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1927, __pyx_L1_error)
      }
      __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1928
 *             tmp1a=np.append(tetrahedron_1,tetrahedron_2)
 *             tmp1a=np.append(tmp1a,tetrahedron_3)
 *             tmp1a=np.append(tmp1a,tetrahedron_4)             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(4,4,6,3)
 *             # Total volume of five tetrahedra
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1928, __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, 1928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_7 = 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_7 = 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_tetrahedron_4)};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __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_tetrahedron_4)};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_INCREF(((PyObject *)__pyx_v_tetrahedron_4));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tetrahedron_4));
        PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, ((PyObject *)__pyx_v_tetrahedron_4));
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __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, 1928, __pyx_L1_error)
      __pyx_t_13 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 1928, __pyx_L1_error)
      }
      __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1929
 *             tmp1a=np.append(tmp1a,tetrahedron_3)
 *             tmp1a=np.append(tmp1a,tetrahedron_4)
 *             tmp4a=tmp1a.reshape(4,4,6,3)             # <<<<<<<<<<<<<<
 *             # Total volume of five tetrahedra
 *             vol1=obj_volume_6d_numerical(tmp4a)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __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, 1929, __pyx_L1_error)
      __pyx_t_19 = ((PyArrayObject *)__pyx_t_2);
      {
        __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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 1929, __pyx_L1_error)
      }
      __pyx_t_19 = 0;
      __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1931
 *             tmp4a=tmp1a.reshape(4,4,6,3)
 *             # Total volume of five tetrahedra
 *             vol1=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 * 
 *             print('         volume merged tet = %10.8f'%(vol1))
 */
      __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

      /* "pyqcstrc/icosah/mics.pyx":1933
 *             vol1=obj_volume_6d_numerical(tmp4a)
 * 
 *             print('         volume merged tet = %10.8f'%(vol1))             # <<<<<<<<<<<<<<
 *             print('         volume sum 4  tet = %10.8f'%(vol2))
 *             # sum of two tetrahedra is forming a tetrahedron
 */
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1933, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_volume_merged_tet_10_8f, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1933, __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/mics.pyx":1934
 * 
 *             print('         volume merged tet = %10.8f'%(vol1))
 *             print('         volume sum 4  tet = %10.8f'%(vol2))             # <<<<<<<<<<<<<<
 *             # sum of two tetrahedra is forming a tetrahedron
 *             print('         merged')
 */
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_volume_sum_4_tet_10_8f, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __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/mics.pyx":1936
 *             print('         volume sum 4  tet = %10.8f'%(vol2))
 *             # sum of two tetrahedra is forming a tetrahedron
 *             print('         merged')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1936, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1922
 *                     tmp1a=np.append(tmp1a,tmp3h[i1])
 * 
 *         if verbose>1:             # <<<<<<<<<<<<<<
 *             tmp4b=tmp1a.reshape(4,6,3)
 *             vol2=tetrahedron_volume_6d_numerical(tmp4b)
 */
      goto __pyx_L18;
    }

    /* "pyqcstrc/icosah/mics.pyx":1938
 *             print('         merged')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4b
 *     else:
 */
    /*else*/ {
    }
    __pyx_L18:;

    /* "pyqcstrc/icosah/mics.pyx":1939
 *         else:
 *             pass
 *         return tmp4b             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[0]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
    __pyx_r = ((PyArrayObject *)__pyx_v_tmp4b);
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":1904
 *         pass
 * 
 *     if flag==1:             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         for i1 in range(len(tmp3h)):
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":1941
 *         return tmp4b
 *     else:
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray merge_3_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1941, __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, 1941, __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, 1941, __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, 1941, __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, 1941, __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 = 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, 1941, __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, 1941, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1822
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray merge_four_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_3,\
 */

  /* 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_11);
  __Pyx_XDECREF(__pyx_t_12);
  { 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_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3g.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3h.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.mics.merge_four_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3d.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3e.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3f.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3g.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3h.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3d);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3e);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3f);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3g);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3h);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":1943
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray merge_3_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     # this simplificates obj (set of tetrahedra)
 *     cdef int i1,i2,i3,i4,i5,counter1,counter2,counter3,counter4,counter5,num1,num2
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_3_tetrahedra_in_obj(PyArrayObject *__pyx_v_obj, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  CYTHON_UNUSED int __pyx_v_counter3;
  CYTHON_UNUSED int __pyx_v_counter4;
  double __pyx_v_vol1;
  double __pyx_v_vol2;
  PyObject *__pyx_v_a1 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  CYTHON_UNUSED PyObject *__pyx_v_tmp1b = NULL;
  __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_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;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  int __pyx_t_21;
  Py_UCS4 __pyx_t_22;
  int __pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyArrayObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_3_tetrahedra_in_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_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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 1943, __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/mics.pyx":1955
 *     # volume of initial obj
 *     #v1,v2,v3=obj_volume_6d(obj)
 *     vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 */
  __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

  /* "pyqcstrc/icosah/mics.pyx":1956
 *     #v1,v2,v3=obj_volume_6d(obj)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 *         print('         volume initial obj = %10.8f'%(vol1))
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1958
 *     if verbose>0:
 *         #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 *         print('         volume initial obj = %10.8f'%(vol1))             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_volume_initial_obj_10_8f, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __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/mics.pyx":1956
 *     #v1,v2,v3=obj_volume_6d(obj)
 *     vol1=obj_volume_6d_numerical(obj)
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         #print '         volume initial obj = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/float(v3))
 *         print('         volume initial obj = %10.8f'%(vol1))
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":1960
 *         print('         volume initial obj = %10.8f'%(vol1))
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if len(obj)>=3:
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":1962
 *         pass
 * 
 *     if len(obj)>=3:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        merge_3_tetrahedra_in_obj()')
 */
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1962, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_4 >= 3) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":1963
 * 
 *     if len(obj)>=3:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        merge_3_tetrahedra_in_obj()')
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":1964
 *     if len(obj)>=3:
 *         if verbose>0:
 *             print('        merge_3_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1963
 * 
 *     if len(obj)>=3:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('        merge_3_tetrahedra_in_obj()')
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":1966
 *             print('        merge_3_tetrahedra_in_obj()')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         a1=[]
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":1968
 *             pass
 * 
 *         a1=[]             # <<<<<<<<<<<<<<
 *         counter4=0
 *         tmp1a=np.array([0])
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_a1 = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1969
 * 
 *         a1=[]
 *         counter4=0             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 */
    __pyx_v_counter4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1970
 *         a1=[]
 *         counter4=0
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-2):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1970, __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, 1970, __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, 1970, __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_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_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __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, 1970, __pyx_L1_error)
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __pyx_t_9 = __pyx_t_10 = __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_8 < 0)) __PYX_ERR(0, 1970, __pyx_L1_error)
    }
    __pyx_t_7 = 0;
    __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1971
 *         counter4=0
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj)-2):
 *             counter3=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1971, __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, 1971, __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, 1971, __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_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_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __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_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_tmp1b = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":1972
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-2):             # <<<<<<<<<<<<<<
 *             counter3=0
 *             for i2 in range(i1+1,len(obj)-1):
 */
    __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1972, __pyx_L1_error)
    __pyx_t_12 = (__pyx_t_4 - 2);
    __pyx_t_4 = __pyx_t_12;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) {
      __pyx_v_i1 = __pyx_t_8;

      /* "pyqcstrc/icosah/mics.pyx":1973
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-2):
 *             counter3=0             # <<<<<<<<<<<<<<
 *             for i2 in range(i1+1,len(obj)-1):
 *                 counter2=0
 */
      __pyx_v_counter3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":1974
 *         for i1 in range(len(obj)-2):
 *             counter3=0
 *             for i2 in range(i1+1,len(obj)-1):             # <<<<<<<<<<<<<<
 *                 counter2=0
 *                 for i3 in range(i2+1,len(obj)):
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1974, __pyx_L1_error)
      __pyx_t_14 = (__pyx_t_13 - 1);
      __pyx_t_13 = __pyx_t_14;
      for (__pyx_t_15 = (__pyx_v_i1 + 1); __pyx_t_15 < __pyx_t_13; __pyx_t_15+=1) {
        __pyx_v_i2 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":1975
 *             counter3=0
 *             for i2 in range(i1+1,len(obj)-1):
 *                 counter2=0             # <<<<<<<<<<<<<<
 *                 for i3 in range(i2+1,len(obj)):
 *                     counter1=0
 */
        __pyx_v_counter2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":1976
 *             for i2 in range(i1+1,len(obj)-1):
 *                 counter2=0
 *                 for i3 in range(i2+1,len(obj)):             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     if len(a1)!=0:
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1976, __pyx_L1_error)
        __pyx_t_17 = __pyx_t_16;
        for (__pyx_t_18 = (__pyx_v_i2 + 1); __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
          __pyx_v_i3 = __pyx_t_18;

          /* "pyqcstrc/icosah/mics.pyx":1977
 *                 counter2=0
 *                 for i3 in range(i2+1,len(obj)):
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     if len(a1)!=0:
 *                         for i4 in a1: # skip tetrahedron already merged
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":1978
 *                 for i3 in range(i2+1,len(obj)):
 *                     counter1=0
 *                     if len(a1)!=0:             # <<<<<<<<<<<<<<
 *                         for i4 in a1: # skip tetrahedron already merged
 *                             if i1!=i4 and i2!=i4 and i3!=i4:
 */
          __pyx_t_19 = PyList_GET_SIZE(__pyx_v_a1); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1978, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_t_19 != 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1979
 *                     counter1=0
 *                     if len(a1)!=0:
 *                         for i4 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                             if i1!=i4 and i2!=i4 and i3!=i4:
 *                                 pass
 */
            __pyx_t_2 = __pyx_v_a1; __Pyx_INCREF(__pyx_t_2); __pyx_t_19 = 0;
            for (;;) {
              if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_2)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_19); __Pyx_INCREF(__pyx_t_3); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 1979, __pyx_L1_error)
              #else
              __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
              __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1979, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_v_i4 = __pyx_t_20;

              /* "pyqcstrc/icosah/mics.pyx":1980
 *                     if len(a1)!=0:
 *                         for i4 in a1: # skip tetrahedron already merged
 *                             if i1!=i4 and i2!=i4 and i3!=i4:             # <<<<<<<<<<<<<<
 *                                 pass
 *                             else:
 */
              __pyx_t_21 = ((__pyx_v_i1 != __pyx_v_i4) != 0);
              if (__pyx_t_21) {
              } else {
                __pyx_t_1 = __pyx_t_21;
                goto __pyx_L16_bool_binop_done;
              }
              __pyx_t_21 = ((__pyx_v_i2 != __pyx_v_i4) != 0);
              if (__pyx_t_21) {
              } else {
                __pyx_t_1 = __pyx_t_21;
                goto __pyx_L16_bool_binop_done;
              }
              __pyx_t_21 = ((__pyx_v_i3 != __pyx_v_i4) != 0);
              __pyx_t_1 = __pyx_t_21;
              __pyx_L16_bool_binop_done:;
              if (__pyx_t_1) {
                goto __pyx_L15;
              }

              /* "pyqcstrc/icosah/mics.pyx":1983
 *                                 pass
 *                             else:
 *                                 counter1+=1             # <<<<<<<<<<<<<<
 *                                 break
 *                     else:
 */
              /*else*/ {
                __pyx_v_counter1 = (__pyx_v_counter1 + 1);

                /* "pyqcstrc/icosah/mics.pyx":1984
 *                             else:
 *                                 counter1+=1
 *                                 break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
                goto __pyx_L14_break;
              }
              __pyx_L15:;

              /* "pyqcstrc/icosah/mics.pyx":1979
 *                     counter1=0
 *                     if len(a1)!=0:
 *                         for i4 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                             if i1!=i4 and i2!=i4 and i3!=i4:
 *                                 pass
 */
            }
            __pyx_L14_break:;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1978
 *                 for i3 in range(i2+1,len(obj)):
 *                     counter1=0
 *                     if len(a1)!=0:             # <<<<<<<<<<<<<<
 *                         for i4 in a1: # skip tetrahedron already merged
 *                             if i1!=i4 and i2!=i4 and i3!=i4:
 */
            goto __pyx_L12;
          }

          /* "pyqcstrc/icosah/mics.pyx":1986
 *                                 break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 */
          /*else*/ {
          }
          __pyx_L12:;

          /* "pyqcstrc/icosah/mics.pyx":1987
 *                     else:
 *                         pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 *                         if tmp3a.tolist()!=[[[0]]]:
 */
          __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":1988
 *                         pass
 *                     if counter1==0:
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)             # <<<<<<<<<<<<<<
 *                         if tmp3a.tolist()!=[[[0]]]:
 *                             if verbose>1:
 */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __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, 1988, __pyx_L1_error)
            __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1988, __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, 1988, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1988, __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, 1988, __pyx_L1_error)
            __pyx_t_6 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_merge_three_tetrahedra(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), __pyx_v_verbose)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1988, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
              __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_6), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
              if (unlikely(__pyx_t_20 < 0)) {
                PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
                  Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
                  __Pyx_RaiseBufferFallbackError();
                } else {
                  PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
                }
                __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 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_20 < 0)) __PYX_ERR(0, 1988, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_6));
            __pyx_t_6 = 0;

            /* "pyqcstrc/icosah/mics.pyx":1989
 *                     if counter1==0:
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 *                         if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                             if verbose>1:
 *                                 print('         %d %d %d (merged)'%(i1,i2,i3))
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1989, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __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_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1989, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1989, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __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, 1989, __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 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1989, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":1990
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 *                         if tmp3a.tolist()!=[[[0]]]:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('         %d %d %d (merged)'%(i1,i2,i3))
 *                             else:
 */
              __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":1991
 *                         if tmp3a.tolist()!=[[[0]]]:
 *                             if verbose>1:
 *                                 print('         %d %d %d (merged)'%(i1,i2,i3))             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1991, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_19 = 0;
                __pyx_t_22 = 127;
                __Pyx_INCREF(__pyx_kp_u__40);
                __pyx_t_19 += 9;
                __Pyx_GIVEREF(__pyx_kp_u__40);
                PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__40);
                __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_19 += __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__17);
                __pyx_t_19 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__17);
                PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
                __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_19 += __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__17);
                __pyx_t_19 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__17);
                PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__17);
                __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i3, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_19 += __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_merged_2);
                __pyx_t_19 += 9;
                __Pyx_GIVEREF(__pyx_kp_u_merged_2);
                PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u_merged_2);
                __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 7, __pyx_t_19, __pyx_t_22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1991, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1990
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 *                         if tmp3a.tolist()!=[[[0]]]:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('         %d %d %d (merged)'%(i1,i2,i3))
 *                             else:
 */
                goto __pyx_L21;
              }

              /* "pyqcstrc/icosah/mics.pyx":1993
 *                                 print('         %d %d %d (merged)'%(i1,i2,i3))
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                             a1.append(i1)
 *                             a1.append(i2)
 */
              /*else*/ {
              }
              __pyx_L21:;

              /* "pyqcstrc/icosah/mics.pyx":1994
 *                             else:
 *                                 pass
 *                             a1.append(i1)             # <<<<<<<<<<<<<<
 *                             a1.append(i2)
 *                             a1.append(i3)
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1994, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_23 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_3); if (unlikely(__pyx_t_23 == ((int)-1))) __PYX_ERR(0, 1994, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1995
 *                                 pass
 *                             a1.append(i1)
 *                             a1.append(i2)             # <<<<<<<<<<<<<<
 *                             a1.append(i3)
 *                             if len(tmp1a)==1:
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1995, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_23 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_3); if (unlikely(__pyx_t_23 == ((int)-1))) __PYX_ERR(0, 1995, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1996
 *                             a1.append(i1)
 *                             a1.append(i2)
 *                             a1.append(i3)             # <<<<<<<<<<<<<<
 *                             if len(tmp1a)==1:
 *                                 tmp1a=tmp3a.reshape(72)
 */
              __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1996, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_23 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_3); if (unlikely(__pyx_t_23 == ((int)-1))) __PYX_ERR(0, 1996, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":1997
 *                             a1.append(i2)
 *                             a1.append(i3)
 *                             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                                 tmp1a=tmp3a.reshape(72)
 *                             else:
 */
              __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1997, __pyx_L1_error)
              __pyx_t_1 = ((__pyx_t_19 == 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":1998
 *                             a1.append(i3)
 *                             if len(tmp1a)==1:
 *                                 tmp1a=tmp3a.reshape(72)             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp3a)
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1998, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_6 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
                  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
                  if (likely(__pyx_t_6)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_6);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_5, function);
                  }
                }
                __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_72);
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1998, __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, 1998, __pyx_L1_error)
                __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                  __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_20 < 0)) {
                    PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                    }
                    __pyx_t_9 = __pyx_t_10 = __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_20 < 0)) __PYX_ERR(0, 1998, __pyx_L1_error)
                }
                __pyx_t_7 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":1997
 *                             a1.append(i2)
 *                             a1.append(i3)
 *                             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                                 tmp1a=tmp3a.reshape(72)
 *                             else:
 */
                goto __pyx_L22;
              }

              /* "pyqcstrc/icosah/mics.pyx":2000
 *                                 tmp1a=tmp3a.reshape(72)
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp3a)             # <<<<<<<<<<<<<<
 *                             counter2+=1
 *                         else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2000, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2000, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __pyx_t_5 = NULL;
                __pyx_t_20 = 0;
                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_20 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_6)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __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_6)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_GOTREF(__pyx_t_3);
                } else
                #endif
                {
                  __pyx_t_2 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  if (__pyx_t_5) {
                    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 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_2, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1a));
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
                  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_20, ((PyObject *)__pyx_v_tmp3a));
                  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                }
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2000, __pyx_L1_error)
                __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                  __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_20 < 0)) {
                    PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                      Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
                      __Pyx_RaiseBufferFallbackError();
                    } else {
                      PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
                    }
                    __pyx_t_11 = __pyx_t_10 = __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_20 < 0)) __PYX_ERR(0, 2000, __pyx_L1_error)
                }
                __pyx_t_7 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
                __pyx_t_3 = 0;
              }
              __pyx_L22:;

              /* "pyqcstrc/icosah/mics.pyx":2001
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp3a)
 *                             counter2+=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             if verbose>1:
 */
              __pyx_v_counter2 = (__pyx_v_counter2 + 1);

              /* "pyqcstrc/icosah/mics.pyx":1989
 *                     if counter1==0:
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 *                         if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                             if verbose>1:
 *                                 print('         %d %d %d (merged)'%(i1,i2,i3))
 */
              goto __pyx_L20;
            }

            /* "pyqcstrc/icosah/mics.pyx":2003
 *                             counter2+=1
 *                         else:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('         %d %d %d'%(i1,i2,i3))
 *                             else:
 */
            /*else*/ {
              __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":2004
 *                         else:
 *                             if verbose>1:
 *                                 print('         %d %d %d'%(i1,i2,i3))             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2004, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_19 = 0;
                __pyx_t_22 = 127;
                __Pyx_INCREF(__pyx_kp_u__40);
                __pyx_t_19 += 9;
                __Pyx_GIVEREF(__pyx_kp_u__40);
                PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__40);
                __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2004, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                __Pyx_GIVEREF(__pyx_t_6);
                PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
                __pyx_t_6 = 0;
                __Pyx_INCREF(__pyx_kp_u__17);
                __pyx_t_19 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__17);
                PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
                __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2004, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                __Pyx_GIVEREF(__pyx_t_6);
                PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6);
                __pyx_t_6 = 0;
                __Pyx_INCREF(__pyx_kp_u__17);
                __pyx_t_19 += 1;
                __Pyx_GIVEREF(__pyx_kp_u__17);
                PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__17);
                __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i3, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2004, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_19 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
                __Pyx_GIVEREF(__pyx_t_6);
                PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_6);
                __pyx_t_6 = 0;
                __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_19, __pyx_t_22); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2004, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2004, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":2003
 *                             counter2+=1
 *                         else:
 *                             if verbose>1:             # <<<<<<<<<<<<<<
 *                                 print('         %d %d %d'%(i1,i2,i3))
 *                             else:
 */
                goto __pyx_L23;
              }

              /* "pyqcstrc/icosah/mics.pyx":2006
 *                                 print('         %d %d %d'%(i1,i2,i3))
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
              /*else*/ {
              }
              __pyx_L23:;
            }
            __pyx_L20:;

            /* "pyqcstrc/icosah/mics.pyx":1987
 *                     else:
 *                         pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         tmp3a=merge_three_tetrahedra(obj[i1],obj[i2],obj[i3],verbose)
 *                         if tmp3a.tolist()!=[[[0]]]:
 */
            goto __pyx_L19;
          }

          /* "pyqcstrc/icosah/mics.pyx":2008
 *                                 pass
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter2!=0:
 *                     break
 */
          /*else*/ {
          }
          __pyx_L19:;
        }

        /* "pyqcstrc/icosah/mics.pyx":2009
 *                     else:
 *                         pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter2 != 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2010
 *                         pass
 *                 if counter2!=0:
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L9_break;

          /* "pyqcstrc/icosah/mics.pyx":2009
 *                     else:
 *                         pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":2012
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 * 
 *         if len(a1)!=0:
 */
        /*else*/ {
        }
      }
      __pyx_L9_break:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2014
 *                     pass
 * 
 *         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *             for i1 in range(len(obj)):
 *                 counter1=0
 */
    __pyx_t_12 = PyList_GET_SIZE(__pyx_v_a1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2014, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_12 != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2015
 * 
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):             # <<<<<<<<<<<<<<
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 */
      __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2015, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_12;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) {
        __pyx_v_i1 = __pyx_t_8;

        /* "pyqcstrc/icosah/mics.pyx":2016
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):
 *                 counter1=0             # <<<<<<<<<<<<<<
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:
 */
        __pyx_v_counter1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2017
 *             for i1 in range(len(obj)):
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                     if i1==i2:
 *                         counter1+=1
 */
        __pyx_t_3 = __pyx_v_a1; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
        for (;;) {
          if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 2017, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2017, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2017, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_v_i2 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":2018
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          __pyx_t_1 = ((__pyx_v_i1 == __pyx_v_i2) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":2019
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:
 *                         counter1+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter1 = (__pyx_v_counter1 + 1);

            /* "pyqcstrc/icosah/mics.pyx":2020
 *                     if i1==i2:
 *                         counter1+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L29_break;

            /* "pyqcstrc/icosah/mics.pyx":2018
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":2022
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=np.append(tmp1a,obj[i1])
 */
          /*else*/ {
          }

          /* "pyqcstrc/icosah/mics.pyx":2017
 *             for i1 in range(len(obj)):
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                     if i1==i2:
 *                         counter1+=1
 */
        }
        __pyx_L29_break:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2023
 *                     else:
 *                         pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2024
 *                         pass
 *                 if counter1==0:
 *                     tmp1a=np.append(tmp1a,obj[i1])             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2024, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2024, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2024, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = NULL;
          __pyx_t_15 = 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_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_6};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_6};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          {
            __pyx_t_24 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2024, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_24, 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_24, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_15, __pyx_t_6);
            __pyx_t_6 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 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, 2024, __pyx_L1_error)
          __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
              }
              __pyx_t_9 = __pyx_t_10 = __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_15 < 0)) __PYX_ERR(0, 2024, __pyx_L1_error)
          }
          __pyx_t_7 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2023
 *                     else:
 *                         pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 */
          goto __pyx_L31;
        }

        /* "pyqcstrc/icosah/mics.pyx":2026
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=obj[0].reshape(72)
 */
        /*else*/ {
        }
        __pyx_L31:;
      }

      /* "pyqcstrc/icosah/mics.pyx":2014
 *                     pass
 * 
 *         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *             for i1 in range(len(obj)):
 *                 counter1=0
 */
      goto __pyx_L25;
    }

    /* "pyqcstrc/icosah/mics.pyx":2028
 *                     pass
 *         else:
 *             tmp1a=obj[0].reshape(72)             # <<<<<<<<<<<<<<
 *             for i1 in range(1,len(obj)):
 *                 tmp1a=np.append(tmp1a,obj[i1])
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_24))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_24);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_24, function);
        }
      }
      __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_24, __pyx_t_2, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_24, __pyx_int_72);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2028, __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, 2028, __pyx_L1_error)
      __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
        __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_8 < 0)) {
          PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
          }
          __pyx_t_11 = __pyx_t_10 = __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_8 < 0)) __PYX_ERR(0, 2028, __pyx_L1_error)
      }
      __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2029
 *         else:
 *             tmp1a=obj[0].reshape(72)
 *             for i1 in range(1,len(obj)):             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp1a,obj[i1])
 * 
 */
      __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2029, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_12;
      for (__pyx_t_8 = 1; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) {
        __pyx_v_i1 = __pyx_t_8;

        /* "pyqcstrc/icosah/mics.pyx":2030
 *             tmp1a=obj[0].reshape(72)
 *             for i1 in range(1,len(obj)):
 *                 tmp1a=np.append(tmp1a,obj[i1])             # <<<<<<<<<<<<<<
 * 
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_np); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_24);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        __pyx_t_24 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_24);
        __pyx_t_6 = NULL;
        __pyx_t_15 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), __pyx_t_24};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), __pyx_t_24};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2030, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_24);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_15, __pyx_t_24);
          __pyx_t_24 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 2030, __pyx_L1_error)
        __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
            }
            __pyx_t_9 = __pyx_t_10 = __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_15 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error)
        }
        __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;
      }
    }
    __pyx_L25:;

    /* "pyqcstrc/icosah/mics.pyx":2032
 *                 tmp1a=np.append(tmp1a,obj[i1])
 * 
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 * 
 *         # volume of simplized obj
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2032, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_12) / 72.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_24 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_24)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_24);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_24, __pyx_t_5, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_24, __pyx_t_5, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_24) {
        __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_24); __pyx_t_24 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_int_3);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2032, __pyx_L1_error)
    __pyx_t_25 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_25, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
        __pyx_t_11 = __pyx_t_10 = __pyx_t_9 = 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_8 < 0)) __PYX_ERR(0, 2032, __pyx_L1_error)
    }
    __pyx_t_25 = 0;
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2036
 *         # volume of simplized obj
 *         #w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 */
    __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

    /* "pyqcstrc/icosah/mics.pyx":2037
 *         #w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 *             print('         volume simplified obj = %10.8f'%(vol2))
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2039
 *         if verbose>0:
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 *             print('         volume simplified obj = %10.8f'%(vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_volume_simplified_obj_10_8f, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __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/mics.pyx":2037
 *         #w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             #print '         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/float(w3))
 *             print('         volume simplified obj = %10.8f'%(vol2))
 */
      goto __pyx_L34;
    }

    /* "pyqcstrc/icosah/mics.pyx":2041
 *             print('         volume simplified obj = %10.8f'%(vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 */
    /*else*/ {
    }
    __pyx_L34:;

    /* "pyqcstrc/icosah/mics.pyx":2044
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
    __pyx_t_1 = ((fabs((__pyx_v_vol1 - __pyx_v_vol2)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2045
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>0:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":2044
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":2047
 *             return tmp4a
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *             else:
 */
    /*else*/ {
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2048
 *         else:
 *             if verbose>0:
 *                 print('         fail')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2048, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2047
 *             return tmp4a
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *             else:
 */
        goto __pyx_L36;
      }

      /* "pyqcstrc/icosah/mics.pyx":2050
 *                 print('         fail')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return np.array([[[[0]]]])
 *     else:
 */
      /*else*/ {
      }
      __pyx_L36:;

      /* "pyqcstrc/icosah/mics.pyx":2051
 *             else:
 *                 pass
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return obj
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __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, 2051, __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, 2051, __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, 2051, __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 = 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_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __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_3)) __PYX_ERR(0, 2051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2051, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":1962
 *         pass
 * 
 *     if len(obj)>=3:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('        merge_3_tetrahedra_in_obj()')
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2053
 *             return np.array([[[[0]]]])
 *     else:
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray merge_2_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":1943
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray merge_3_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     # this simplificates obj (set of tetrahedra)
 *     cdef int i1,i2,i3,i4,i5,counter1,counter2,counter3,counter4,counter5,num1,num2
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_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_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.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.mics.merge_3_tetrahedra_in_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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF(__pyx_v_tmp1b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2055
 *         return obj
 * 
 * cdef np.ndarray merge_2_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     # this simplificates obj (set of tetrahedra)
 *     cdef int i1,i2,i3,i4,counter1,counter2,counter3,counter4,num
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_2_tetrahedra_in_obj(PyArrayObject *__pyx_v_obj, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  CYTHON_UNUSED int __pyx_v_counter3;
  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_vol1;
  double __pyx_v_vol2;
  PyObject *__pyx_v_a1 = 0;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  CYTHON_UNUSED PyObject *__pyx_v_tmp1b = NULL;
  __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_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4a;
  __Pyx_Buffer __pyx_pybuffer_tmp4a;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  long __pyx_t_7;
  long __pyx_t_8;
  long __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  __pyx_t_5numpy_float64_t __pyx_t_11;
  PyArrayObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_t_22;
  int __pyx_t_23;
  int __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyArrayObject *__pyx_t_26 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_2_tetrahedra_in_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_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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2055, __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/mics.pyx":2065
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if len(obj)>=2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         merge_2_tetrahedra_in_obj()')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2065, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 >= 2) != 0);
  if (__pyx_t_2) {

    /* "pyqcstrc/icosah/mics.pyx":2066
 * 
 *     if len(obj)>=2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         merge_2_tetrahedra_in_obj()')
 *         else:
 */
    __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":2067
 *     if len(obj)>=2:
 *         if verbose>0:
 *             print('         merge_2_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2067, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2066
 * 
 *     if len(obj)>=2:
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         merge_2_tetrahedra_in_obj()')
 *         else:
 */
      goto __pyx_L4;
    }

    /* "pyqcstrc/icosah/mics.pyx":2069
 *             print('         merge_2_tetrahedra_in_obj()')
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         # volume of initial obj
 */
    /*else*/ {
    }
    __pyx_L4:;

    /* "pyqcstrc/icosah/mics.pyx":2072
 * 
 *         # volume of initial obj
 *         v1,v2,v3=obj_volume_6d(obj)             # <<<<<<<<<<<<<<
 *         vol1=obj_volume_6d_numerical(obj)
 *         if verbose>0:
 */
    __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_obj), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2072, __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, 2072, __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_6 = PyList_GET_ITEM(sequence, 2); 
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2072, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2072, __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, 2072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_v1 = __pyx_t_7;
    __pyx_v_v2 = __pyx_t_8;
    __pyx_v_v3 = __pyx_t_9;

    /* "pyqcstrc/icosah/mics.pyx":2073
 *         # volume of initial obj
 *         v1,v2,v3=obj_volume_6d(obj)
 *         vol1=obj_volume_6d_numerical(obj)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         volume initial obj = %d %d %d (%10.8f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 */
    __pyx_v_vol1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_obj), 0);

    /* "pyqcstrc/icosah/mics.pyx":2074
 *         v1,v2,v3=obj_volume_6d(obj)
 *         vol1=obj_volume_6d_numerical(obj)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         volume initial obj = %d %d %d (%10.8f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *             print('                            = %10.8f'%(vol1))
 */
    __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":2075
 *         vol1=obj_volume_6d_numerical(obj)
 *         if verbose>0:
 *             print('         volume initial obj = %d %d %d (%10.8f)'%(v1,v2,v3,(v1+TAU*v2)/v3))             # <<<<<<<<<<<<<<
 *             print('                            = %10.8f'%(vol1))
 *         else:
 */
      __pyx_t_3 = PyTuple_New(9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_volume_initial_obj);
      __pyx_t_1 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_volume_initial_obj);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_volume_initial_obj);
      __pyx_t_6 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_1 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
      __pyx_t_6 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u__17);
      __pyx_t_1 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__17);
      __pyx_t_6 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u__18);
      __pyx_t_1 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__18);
      __pyx_t_11 = (__pyx_v_v1 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v2));
      if (unlikely(__pyx_v_v3 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 2075, __pyx_L1_error)
      }
      __pyx_t_6 = PyFloat_FromDouble((__pyx_t_11 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_kp_u_10_8f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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_1 += __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__19);
      __pyx_t_1 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_kp_u__19);
      __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 9, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2076
 *         if verbose>0:
 *             print('         volume initial obj = %d %d %d (%10.8f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *             print('                            = %10.8f'%(vol1))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_10_8f_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2074
 *         v1,v2,v3=obj_volume_6d(obj)
 *         vol1=obj_volume_6d_numerical(obj)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         volume initial obj = %d %d %d (%10.8f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *             print('                            = %10.8f'%(vol1))
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":2078
 *             print('                            = %10.8f'%(vol1))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         a1=[]
 */
    /*else*/ {
    }
    __pyx_L5:;

    /* "pyqcstrc/icosah/mics.pyx":2080
 *             pass
 * 
 *         a1=[]             # <<<<<<<<<<<<<<
 *         counter3=0
 *         tmp1a=np.array([0])
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_a1 = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2081
 * 
 *         a1=[]
 *         counter3=0             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 */
    __pyx_v_counter3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2082
 *         a1=[]
 *         counter3=0
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-1):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2082, __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, 2082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2082, __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_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __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_3)) __PYX_ERR(0, 2082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2082, __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_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_13 < 0)) {
        PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
        }
        __pyx_t_14 = __pyx_t_15 = __pyx_t_16 = 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, 2082, __pyx_L1_error)
    }
    __pyx_t_12 = 0;
    __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2083
 *         counter3=0
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj)-1):
 *             counter2=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2083, __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_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_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_tmp1b = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2084
 *         tmp1a=np.array([0])
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-1):             # <<<<<<<<<<<<<<
 *             counter2=0
 *             for i2 in range(i1+1,len(obj)):
 */
    __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2084, __pyx_L1_error)
    __pyx_t_17 = (__pyx_t_1 - 1);
    __pyx_t_1 = __pyx_t_17;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i1 = __pyx_t_13;

      /* "pyqcstrc/icosah/mics.pyx":2085
 *         tmp1b=np.array([0])
 *         for i1 in range(len(obj)-1):
 *             counter2=0             # <<<<<<<<<<<<<<
 *             for i2 in range(i1+1,len(obj)):
 *                 counter1=0
 */
      __pyx_v_counter2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2086
 *         for i1 in range(len(obj)-1):
 *             counter2=0
 *             for i2 in range(i1+1,len(obj)):             # <<<<<<<<<<<<<<
 *                 counter1=0
 *                 if len(a1)!=0:
 */
      __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2086, __pyx_L1_error)
      __pyx_t_19 = __pyx_t_18;
      for (__pyx_t_20 = (__pyx_v_i1 + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
        __pyx_v_i2 = __pyx_t_20;

        /* "pyqcstrc/icosah/mics.pyx":2087
 *             counter2=0
 *             for i2 in range(i1+1,len(obj)):
 *                 counter1=0             # <<<<<<<<<<<<<<
 *                 if len(a1)!=0:
 *                     for i3 in a1: # skip tetrahedron already merged
 */
        __pyx_v_counter1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2088
 *             for i2 in range(i1+1,len(obj)):
 *                 counter1=0
 *                 if len(a1)!=0:             # <<<<<<<<<<<<<<
 *                     for i3 in a1: # skip tetrahedron already merged
 *                         if i1!=i3 and i2!=i3:
 */
        __pyx_t_21 = PyList_GET_SIZE(__pyx_v_a1); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2088, __pyx_L1_error)
        __pyx_t_2 = ((__pyx_t_21 != 0) != 0);
        if (__pyx_t_2) {

          /* "pyqcstrc/icosah/mics.pyx":2089
 *                 counter1=0
 *                 if len(a1)!=0:
 *                     for i3 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                         if i1!=i3 and i2!=i3:
 *                             pass
 */
          __pyx_t_3 = __pyx_v_a1; __Pyx_INCREF(__pyx_t_3); __pyx_t_21 = 0;
          for (;;) {
            if (__pyx_t_21 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_21); __Pyx_INCREF(__pyx_t_5); __pyx_t_21++; if (unlikely(0 < 0)) __PYX_ERR(0, 2089, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_21); __pyx_t_21++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2089, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
            __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2089, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_v_i3 = __pyx_t_22;

            /* "pyqcstrc/icosah/mics.pyx":2090
 *                 if len(a1)!=0:
 *                     for i3 in a1: # skip tetrahedron already merged
 *                         if i1!=i3 and i2!=i3:             # <<<<<<<<<<<<<<
 *                             pass
 *                         else:
 */
            __pyx_t_23 = ((__pyx_v_i1 != __pyx_v_i3) != 0);
            if (__pyx_t_23) {
            } else {
              __pyx_t_2 = __pyx_t_23;
              goto __pyx_L14_bool_binop_done;
            }
            __pyx_t_23 = ((__pyx_v_i2 != __pyx_v_i3) != 0);
            __pyx_t_2 = __pyx_t_23;
            __pyx_L14_bool_binop_done:;
            if (__pyx_t_2) {
              goto __pyx_L13;
            }

            /* "pyqcstrc/icosah/mics.pyx":2093
 *                             pass
 *                         else:
 *                             counter1+=1             # <<<<<<<<<<<<<<
 *                             break
 *                 else:
 */
            /*else*/ {
              __pyx_v_counter1 = (__pyx_v_counter1 + 1);

              /* "pyqcstrc/icosah/mics.pyx":2094
 *                         else:
 *                             counter1+=1
 *                             break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
              goto __pyx_L12_break;
            }
            __pyx_L13:;

            /* "pyqcstrc/icosah/mics.pyx":2089
 *                 counter1=0
 *                 if len(a1)!=0:
 *                     for i3 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                         if i1!=i3 and i2!=i3:
 *                             pass
 */
          }
          __pyx_L12_break:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2088
 *             for i2 in range(i1+1,len(obj)):
 *                 counter1=0
 *                 if len(a1)!=0:             # <<<<<<<<<<<<<<
 *                     for i3 in a1: # skip tetrahedron already merged
 *                         if i1!=i3 and i2!=i3:
 */
          goto __pyx_L10;
        }

        /* "pyqcstrc/icosah/mics.pyx":2096
 *                             break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 */
        /*else*/ {
        }
        __pyx_L10:;

        /* "pyqcstrc/icosah/mics.pyx":2097
 *                 else:
 *                     pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 *                     if tmp3a.tolist()!=[[[0]]]:
 */
        __pyx_t_2 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_2) {

          /* "pyqcstrc/icosah/mics.pyx":2098
 *                     pass
 *                 if counter1==0:
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)             # <<<<<<<<<<<<<<
 *                     if tmp3a.tolist()!=[[[0]]]:
 *                         if verbose>1:
 */
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __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, 2098, __pyx_L1_error)
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __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, 2098, __pyx_L1_error)
          __pyx_t_6 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_merge_two_tetrahedra(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_5), __pyx_v_verbose)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2098, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
            __pyx_t_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_6), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
            if (unlikely(__pyx_t_22 < 0)) {
              PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
              }
              __pyx_t_16 = __pyx_t_15 = __pyx_t_14 = 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_22 < 0)) __PYX_ERR(0, 2098, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_6));
          __pyx_t_6 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2099
 *                 if counter1==0:
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 *                     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                         if verbose>1:
 *                             print('         %d %d (merged)'%(i1,i2))
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __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_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2099, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2099, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2099, __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, 2099, __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 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2099, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_2) {

            /* "pyqcstrc/icosah/mics.pyx":2100
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 *                     if tmp3a.tolist()!=[[[0]]]:
 *                         if verbose>1:             # <<<<<<<<<<<<<<
 *                             print('         %d %d (merged)'%(i1,i2))
 *                         else:
 */
            __pyx_t_2 = ((__pyx_v_verbose > 1) != 0);
            if (__pyx_t_2) {

              /* "pyqcstrc/icosah/mics.pyx":2101
 *                     if tmp3a.tolist()!=[[[0]]]:
 *                         if verbose>1:
 *                             print('         %d %d (merged)'%(i1,i2))             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_21 = 0;
              __pyx_t_10 = 127;
              __Pyx_INCREF(__pyx_kp_u__40);
              __pyx_t_21 += 9;
              __Pyx_GIVEREF(__pyx_kp_u__40);
              PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__40);
              __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2101, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_21 += __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__17);
              __pyx_t_21 += 1;
              __Pyx_GIVEREF(__pyx_kp_u__17);
              PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
              __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2101, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_21 += __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_merged_2);
              __pyx_t_21 += 9;
              __Pyx_GIVEREF(__pyx_kp_u_merged_2);
              PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_merged_2);
              __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_21, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2101, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2101, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2100
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 *                     if tmp3a.tolist()!=[[[0]]]:
 *                         if verbose>1:             # <<<<<<<<<<<<<<
 *                             print('         %d %d (merged)'%(i1,i2))
 *                         else:
 */
              goto __pyx_L18;
            }

            /* "pyqcstrc/icosah/mics.pyx":2103
 *                             print('         %d %d (merged)'%(i1,i2))
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                         a1.append(i1)
 *                         a1.append(i2)
 */
            /*else*/ {
            }
            __pyx_L18:;

            /* "pyqcstrc/icosah/mics.pyx":2104
 *                         else:
 *                             pass
 *                         a1.append(i1)             # <<<<<<<<<<<<<<
 *                         a1.append(i2)
 *                         if len(tmp1a)==1:
 */
            __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2104, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_3); if (unlikely(__pyx_t_24 == ((int)-1))) __PYX_ERR(0, 2104, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2105
 *                             pass
 *                         a1.append(i1)
 *                         a1.append(i2)             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp3a.reshape(72)
 */
            __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2105, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_24 = __Pyx_PyList_Append(__pyx_v_a1, __pyx_t_3); if (unlikely(__pyx_t_24 == ((int)-1))) __PYX_ERR(0, 2105, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2106
 *                         a1.append(i1)
 *                         a1.append(i2)
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp3a.reshape(72)
 *                         else:
 */
            __pyx_t_21 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_21 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2106, __pyx_L1_error)
            __pyx_t_2 = ((__pyx_t_21 == 1) != 0);
            if (__pyx_t_2) {

              /* "pyqcstrc/icosah/mics.pyx":2107
 *                         a1.append(i2)
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp3a.reshape(72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp3a)
 */
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_6 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_6)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_6);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_5, function);
                }
              }
              __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2107, __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, 2107, __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_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_22 < 0)) {
                  PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
                  }
                  __pyx_t_14 = __pyx_t_15 = __pyx_t_16 = 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, 2107, __pyx_L1_error)
              }
              __pyx_t_12 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
              __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2106
 *                         a1.append(i1)
 *                         a1.append(i2)
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp3a.reshape(72)
 *                         else:
 */
              goto __pyx_L19;
            }

            /* "pyqcstrc/icosah/mics.pyx":2109
 *                             tmp1a=tmp3a.reshape(72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp3a)             # <<<<<<<<<<<<<<
 *                         counter2+=1
 *                         break
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2109, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2109, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = NULL;
              __pyx_t_22 = 0;
              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_22 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_6)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __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_6)) {
                PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              {
                __pyx_t_4 = PyTuple_New(2+__pyx_t_22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                if (__pyx_t_5) {
                  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_22, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
                PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_22, ((PyObject *)__pyx_v_tmp3a));
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              }
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2109, __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_22 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_22 < 0)) {
                  PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                    Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14);
                    __Pyx_RaiseBufferFallbackError();
                  } else {
                    PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
                  }
                  __pyx_t_16 = __pyx_t_15 = __pyx_t_14 = 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, 2109, __pyx_L1_error)
              }
              __pyx_t_12 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
              __pyx_t_3 = 0;
            }
            __pyx_L19:;

            /* "pyqcstrc/icosah/mics.pyx":2110
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp3a)
 *                         counter2+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter2 = (__pyx_v_counter2 + 1);

            /* "pyqcstrc/icosah/mics.pyx":2111
 *                             tmp1a=np.append(tmp1a,tmp3a)
 *                         counter2+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         if verbose>1:
 */
            goto __pyx_L9_break;

            /* "pyqcstrc/icosah/mics.pyx":2099
 *                 if counter1==0:
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 *                     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                         if verbose>1:
 *                             print('         %d %d (merged)'%(i1,i2))
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":2113
 *                         break
 *                     else:
 *                         if verbose>1:             # <<<<<<<<<<<<<<
 *                             print('         %d %d'%(i1,i2) )
 *                         else:
 */
          /*else*/ {
            __pyx_t_2 = ((__pyx_v_verbose > 1) != 0);
            if (__pyx_t_2) {

              /* "pyqcstrc/icosah/mics.pyx":2114
 *                     else:
 *                         if verbose>1:
 *                             print('         %d %d'%(i1,i2) )             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_21 = 0;
              __pyx_t_10 = 127;
              __Pyx_INCREF(__pyx_kp_u__40);
              __pyx_t_21 += 9;
              __Pyx_GIVEREF(__pyx_kp_u__40);
              PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__40);
              __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i1, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
              __Pyx_GIVEREF(__pyx_t_6);
              PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
              __pyx_t_6 = 0;
              __Pyx_INCREF(__pyx_kp_u__17);
              __pyx_t_21 += 1;
              __Pyx_GIVEREF(__pyx_kp_u__17);
              PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
              __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_i2, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_21 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
              __Pyx_GIVEREF(__pyx_t_6);
              PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6);
              __pyx_t_6 = 0;
              __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_21, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2113
 *                         break
 *                     else:
 *                         if verbose>1:             # <<<<<<<<<<<<<<
 *                             print('         %d %d'%(i1,i2) )
 *                         else:
 */
              goto __pyx_L20;
            }

            /* "pyqcstrc/icosah/mics.pyx":2116
 *                             print('         %d %d'%(i1,i2) )
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
            /*else*/ {
            }
            __pyx_L20:;
          }

          /* "pyqcstrc/icosah/mics.pyx":2097
 *                 else:
 *                     pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp3a=merge_two_tetrahedra(obj[i1],obj[i2],verbose)
 *                     if tmp3a.tolist()!=[[[0]]]:
 */
          goto __pyx_L16;
        }

        /* "pyqcstrc/icosah/mics.pyx":2118
 *                             pass
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if counter2!=0:
 *                     break
 */
        /*else*/ {
        }
        __pyx_L16:;

        /* "pyqcstrc/icosah/mics.pyx":2119
 *                 else:
 *                     pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        __pyx_t_2 = ((__pyx_v_counter2 != 0) != 0);
        if (__pyx_t_2) {

          /* "pyqcstrc/icosah/mics.pyx":2120
 *                     pass
 *                 if counter2!=0:
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L9_break;

          /* "pyqcstrc/icosah/mics.pyx":2119
 *                 else:
 *                     pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":2122
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 * 
 *         if len(a1)!=0:
 */
        /*else*/ {
        }
      }
      __pyx_L9_break:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2124
 *                     pass
 * 
 *         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *             for i1 in range(len(obj)):
 *                 counter1=0
 */
    __pyx_t_17 = PyList_GET_SIZE(__pyx_v_a1); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2124, __pyx_L1_error)
    __pyx_t_2 = ((__pyx_t_17 != 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":2125
 * 
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):             # <<<<<<<<<<<<<<
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 */
      __pyx_t_17 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2125, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_17;
      for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
        __pyx_v_i1 = __pyx_t_13;

        /* "pyqcstrc/icosah/mics.pyx":2126
 *         if len(a1)!=0:
 *             for i1 in range(len(obj)):
 *                 counter1=0             # <<<<<<<<<<<<<<
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:
 */
        __pyx_v_counter1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2127
 *             for i1 in range(len(obj)):
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                     if i1==i2:
 *                         counter1+=1
 */
        __pyx_t_3 = __pyx_v_a1; __Pyx_INCREF(__pyx_t_3); __pyx_t_18 = 0;
        for (;;) {
          if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_6); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 2127, __pyx_L1_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2127, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2127, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_v_i2 = __pyx_t_20;

          /* "pyqcstrc/icosah/mics.pyx":2128
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          __pyx_t_2 = ((__pyx_v_i1 == __pyx_v_i2) != 0);
          if (__pyx_t_2) {

            /* "pyqcstrc/icosah/mics.pyx":2129
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:
 *                         counter1+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter1 = (__pyx_v_counter1 + 1);

            /* "pyqcstrc/icosah/mics.pyx":2130
 *                     if i1==i2:
 *                         counter1+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L26_break;

            /* "pyqcstrc/icosah/mics.pyx":2128
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged
 *                     if i1==i2:             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":2132
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=np.append(tmp1a,obj[i1])
 */
          /*else*/ {
          }

          /* "pyqcstrc/icosah/mics.pyx":2127
 *             for i1 in range(len(obj)):
 *                 counter1=0
 *                 for i2 in a1: # skip tetrahedron already merged             # <<<<<<<<<<<<<<
 *                     if i1==i2:
 *                         counter1+=1
 */
        }
        __pyx_L26_break:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2133
 *                     else:
 *                         pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 */
        __pyx_t_2 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_2) {

          /* "pyqcstrc/icosah/mics.pyx":2134
 *                         pass
 *                 if counter1==0:
 *                     tmp1a=np.append(tmp1a,obj[i1])             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = NULL;
          __pyx_t_20 = 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_20 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_6};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2134, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_6};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2134, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          {
            __pyx_t_25 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_25);
            if (__pyx_t_5) {
              __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_25, 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_25, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_25, 1+__pyx_t_20, __pyx_t_6);
            __pyx_t_6 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          }
          __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, 2134, __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_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_20 < 0)) {
              PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
                Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
                __Pyx_RaiseBufferFallbackError();
              } else {
                PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
              }
              __pyx_t_14 = __pyx_t_15 = __pyx_t_16 = 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_20 < 0)) __PYX_ERR(0, 2134, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2133
 *                     else:
 *                         pass
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 */
          goto __pyx_L28;
        }

        /* "pyqcstrc/icosah/mics.pyx":2136
 *                     tmp1a=np.append(tmp1a,obj[i1])
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1a=obj[0].reshape(72)
 */
        /*else*/ {
        }
        __pyx_L28:;
      }

      /* "pyqcstrc/icosah/mics.pyx":2124
 *                     pass
 * 
 *         if len(a1)!=0:             # <<<<<<<<<<<<<<
 *             for i1 in range(len(obj)):
 *                 counter1=0
 */
      goto __pyx_L22;
    }

    /* "pyqcstrc/icosah/mics.pyx":2138
 *                     pass
 *         else:
 *             tmp1a=obj[0].reshape(72)             # <<<<<<<<<<<<<<
 *             for i1 in range(1,len(obj)):
 *                 tmp1a=np.append(tmp1a,obj[i1])
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_25))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_25);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_25);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_25, function);
        }
      }
      __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_25, __pyx_t_4, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_25, __pyx_int_72);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2138, __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_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_13 < 0)) {
          PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          }
          __pyx_t_16 = __pyx_t_15 = __pyx_t_14 = 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, 2138, __pyx_L1_error)
      }
      __pyx_t_12 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2139
 *         else:
 *             tmp1a=obj[0].reshape(72)
 *             for i1 in range(1,len(obj)):             # <<<<<<<<<<<<<<
 *                 tmp1a=np.append(tmp1a,obj[i1])
 * 
 */
      __pyx_t_17 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2139, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_17;
      for (__pyx_t_13 = 1; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
        __pyx_v_i1 = __pyx_t_13;

        /* "pyqcstrc/icosah/mics.pyx":2140
 *             tmp1a=obj[0].reshape(72)
 *             for i1 in range(1,len(obj)):
 *                 tmp1a=np.append(tmp1a,obj[i1])             # <<<<<<<<<<<<<<
 * 
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_n_s_np); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2140, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_25);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2140, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
        __pyx_t_25 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2140, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_25);
        __pyx_t_6 = NULL;
        __pyx_t_20 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_20 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), __pyx_t_25};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_tmp1a), __pyx_t_25};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_25);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_20, __pyx_t_25);
          __pyx_t_25 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2140, __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_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_20 < 0)) {
            PyErr_Fetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
              Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16);
              __Pyx_RaiseBufferFallbackError();
            } else {
              PyErr_Restore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
            }
            __pyx_t_14 = __pyx_t_15 = __pyx_t_16 = 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_20 < 0)) __PYX_ERR(0, 2140, __pyx_L1_error)
        }
        __pyx_t_12 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;
      }
    }
    __pyx_L22:;

    /* "pyqcstrc/icosah/mics.pyx":2142
 *                 tmp1a=np.append(tmp1a,obj[i1])
 * 
 *         tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 * 
 *         # volume of simplized obj
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_17 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2142, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_17) / 72.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_25 = NULL;
    __pyx_t_13 = 0;
    if (CYTHON_UNPACK_METHODS && likely(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_13 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_25, __pyx_t_5, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __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[5] = {__pyx_t_25, __pyx_t_5, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_25) {
        __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_25); __pyx_t_25 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_13, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_13, __pyx_int_3);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __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, 2142, __pyx_L1_error)
    __pyx_t_26 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_26, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
      if (unlikely(__pyx_t_13 < 0)) {
        PyErr_Fetch(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_16, __pyx_t_15, __pyx_t_14);
        }
        __pyx_t_16 = __pyx_t_15 = __pyx_t_14 = 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, 2142, __pyx_L1_error)
    }
    __pyx_t_26 = 0;
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2145
 * 
 *         # volume of simplized obj
 *         w1,w2,w3=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:
 */
    __pyx_t_3 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2145, __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, 2145, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_4 = 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_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2145, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_9 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_6); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_w1 = __pyx_t_9;
    __pyx_v_w2 = __pyx_t_8;
    __pyx_v_w3 = __pyx_t_7;

    /* "pyqcstrc/icosah/mics.pyx":2146
 *         # volume of simplized obj
 *         w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 */
    __pyx_v_vol2 = __pyx_f_8pyqcstrc_6icosah_10numericalc_obj_volume_6d_numerical(((PyArrayObject *)__pyx_v_tmp4a), 0);

    /* "pyqcstrc/icosah/mics.pyx":2147
 *         w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *             print('                               = %10.8f'%(vol2))
 */
    __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":2148
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:
 *             print('         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))             # <<<<<<<<<<<<<<
 *             print('                               = %10.8f'%(vol2))
 *         else:
 */
      __pyx_t_3 = PyTuple_New(9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_17 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_volume_simplified_obj);
      __pyx_t_17 += 33;
      __Pyx_GIVEREF(__pyx_kp_u_volume_simplified_obj);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_volume_simplified_obj);
      __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_w1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_17 += __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__17);
      __pyx_t_17 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__17);
      __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_w2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_17 += __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__17);
      __pyx_t_17 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__17);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__17);
      __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_w3, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_17 += __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__18);
      __pyx_t_17 += 2;
      __Pyx_GIVEREF(__pyx_kp_u__18);
      PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__18);
      __pyx_t_11 = (__pyx_v_w1 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_w2));
      if (unlikely(__pyx_v_w3 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 2148, __pyx_L1_error)
      }
      __pyx_t_5 = PyFloat_FromDouble((__pyx_t_11 / ((__pyx_t_5numpy_float64_t)__pyx_v_w3))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
      __pyx_t_17 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u__19);
      __pyx_t_17 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__19);
      PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_kp_u__19);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 9, __pyx_t_17, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2149
 *         if verbose>0:
 *             print('         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *             print('                               = %10.8f'%(vol2))             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_10_8f_3, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2147
 *         w1,w2,w3=obj_volume_6d(tmp4a)
 *         vol2=obj_volume_6d_numerical(tmp4a)
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('         volume simplified obj = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *             print('                               = %10.8f'%(vol2))
 */
      goto __pyx_L31;
    }

    /* "pyqcstrc/icosah/mics.pyx":2151
 *             print('                               = %10.8f'%(vol2))
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 */
    /*else*/ {
    }
    __pyx_L31:;

    /* "pyqcstrc/icosah/mics.pyx":2154
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
    __pyx_t_2 = ((fabs((__pyx_v_vol1 - __pyx_v_vol2)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
    if (__pyx_t_2) {

      /* "pyqcstrc/icosah/mics.pyx":2155
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>0:
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":2154
 * 
 *         #if v1==w1 and v2==w2 and v3==w3:
 *         if abs(vol1-vol2)<TOL:             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":2157
 *             return tmp4a
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_2) {

        /* "pyqcstrc/icosah/mics.pyx":2158
 *         else:
 *             if verbose>0:
 *                 print('         fail')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2158, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2157
 *             return tmp4a
 *         else:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('         fail')
 *             else:
 */
        goto __pyx_L33;
      }

      /* "pyqcstrc/icosah/mics.pyx":2160
 *                 print('         fail')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return np.array([[[[0]]]])
 *     else:
 */
      /*else*/ {
      }
      __pyx_L33:;

      /* "pyqcstrc/icosah/mics.pyx":2161
 *             else:
 *                 pass
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return obj
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2161, __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_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __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_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __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, 2161, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":2065
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if len(obj)>=2:             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('         merge_2_tetrahedra_in_obj()')
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2163
 *             return np.array([[[[0]]]])
 *     else:
 *         return obj             # <<<<<<<<<<<<<<
 * 
 * # new
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2055
 *         return obj
 * 
 * cdef np.ndarray merge_2_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj,int verbose):             # <<<<<<<<<<<<<<
 *     # this simplificates obj (set of tetrahedra)
 *     cdef int i1,i2,i3,i4,counter1,counter2,counter3,counter4,num
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_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_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.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.mics.merge_2_tetrahedra_in_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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_a1);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF(__pyx_v_tmp1b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2166
 * 
 * # new
 * cdef np.ndarray merge_two_tetrahedra(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_1, \             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=3] tetrahedron_2, \
 *                                         int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_merge_two_tetrahedra(PyArrayObject *__pyx_v_tetrahedron_1, PyArrayObject *__pyx_v_tetrahedron_2, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_i1;
  int __pyx_v_counter1;
  long __pyx_v_a1;
  long __pyx_v_b1;
  long __pyx_v_c1;
  long __pyx_v_a2;
  long __pyx_v_b2;
  long __pyx_v_c2;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  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_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_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;
  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;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_UCS4 __pyx_t_19;
  __pyx_t_5numpy_float64_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_two_tetrahedra", 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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2166, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2166, __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/mics.pyx":2177
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         merge_two_tetrahedra()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":2177
 *     cdef np.ndarray[DTYPE_int_t,ndim=3] tmp3a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('         merge_two_tetrahedra()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":2180
 *         print('         merge_two_tetrahedra()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     # volume
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":2182
 *         pass
 *     # volume
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)             # <<<<<<<<<<<<<<
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2182, __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, 2182, __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, 2182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2182, __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, 2182, __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, 2182, __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, 2182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_a1 = __pyx_t_6;
  __pyx_v_b1 = __pyx_t_7;
  __pyx_v_c1 = __pyx_t_8;

  /* "pyqcstrc/icosah/mics.pyx":2183
 *     # volume
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)             # <<<<<<<<<<<<<<
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)
 * 
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_v_tetrahedron_2), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2183, __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, 2183, __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_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2183, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_a2 = __pyx_t_8;
  __pyx_v_b2 = __pyx_t_7;
  __pyx_v_c2 = __pyx_t_6;

  /* "pyqcstrc/icosah/mics.pyx":2184
 *     a1,b1,c1=tetrahedron_volume_6d(tetrahedron_1)
 *     a2,b2,c2=tetrahedron_volume_6d(tetrahedron_2)
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5math1_add(__pyx_v_a1, __pyx_v_b1, __pyx_v_c1, __pyx_v_a2, __pyx_v_b2, __pyx_v_c2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __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, 2184, __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, 2184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2184, __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, 2184, __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, 2184, __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, 2184, __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/mics.pyx":2186
 *     v1,v2,v3=add(a1,b1,c1,a2,b2,c2)
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp3a=np.array([0]).reshape(1,1,1)
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2186, __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_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, 2186, __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, 2186, __pyx_L1_error)
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2186, __pyx_L1_error)
  }
  __pyx_t_9 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2187
 * 
 *     tmp1a=np.array([0])
 *     tmp3a=np.array([0]).reshape(1,1,1)             # <<<<<<<<<<<<<<
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2187, __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, 2187, __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, 2187, __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_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_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, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __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, 2187, __pyx_L1_error)
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_10 < 0)) __PYX_ERR(0, 2187, __pyx_L1_error)
  }
  __pyx_t_14 = 0;
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2188
 *     tmp1a=np.array([0])
 *     tmp3a=np.array([0]).reshape(1,1,1)
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)             # <<<<<<<<<<<<<<
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_check_two_tetrahedra(((PyArrayObject *)__pyx_v_tetrahedron_1), ((PyArrayObject *)__pyx_v_tetrahedron_2))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_10 < 0)) __PYX_ERR(0, 2188, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2189
 *     tmp3a=np.array([0]).reshape(1,1,1)
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         counter1=0
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2189, __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, 2189, __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, 2189, __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, 2189, __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, 2189, __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 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2190
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])             # <<<<<<<<<<<<<<
 *         counter1=0
 *         for i1 in range(3):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2190, __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, 2190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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, __pyx_t_5, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2190, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __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[3] = {__pyx_t_15, __pyx_t_5, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2190, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_16 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2190, __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_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_10, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_10, __pyx_t_3);
      __pyx_t_5 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2190, __pyx_L1_error)
    __pyx_t_9 = ((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_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2190, __pyx_L1_error)
    }
    __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2191
 *     if tmp3a.tolist()!=[[[0]]]:
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i1 in range(3):
 *             flag=point_on_segment(tmp3a[i1],tmp3a[3],tmp3a[4])
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2192
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         counter1=0
 *         for i1 in range(3):             # <<<<<<<<<<<<<<
 *             flag=point_on_segment(tmp3a[i1],tmp3a[3],tmp3a[4])
 *             # a vertex of common triangle is on the line segment between tmp2a and tmp2b
 */
    for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
      __pyx_v_i1 = __pyx_t_10;

      /* "pyqcstrc/icosah/mics.pyx":2193
 *         counter1=0
 *         for i1 in range(3):
 *             flag=point_on_segment(tmp3a[i1],tmp3a[3],tmp3a[4])             # <<<<<<<<<<<<<<
 *             # a vertex of common triangle is on the line segment between tmp2a and tmp2b
 *             # this means that sum of tetrahedron_1 and _2 forms a tetrahedron.
 */
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __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, 2193, __pyx_L1_error)
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2193, __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, 2193, __pyx_L1_error)
      __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2193, __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, 2193, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_16), 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2196
 *             # a vertex of common triangle is on the line segment between tmp2a and tmp2b
 *             # this means that sum of tetrahedron_1 and _2 forms a tetrahedron.
 *             if flag==0:             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2197
 *             # this means that sum of tetrahedron_1 and _2 forms a tetrahedron.
 *             if flag==0:
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":2196
 *             # a vertex of common triangle is on the line segment between tmp2a and tmp2b
 *             # this means that sum of tetrahedron_1 and _2 forms a tetrahedron.
 *             if flag==0:             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/mics.pyx":2199
 *                 counter1+=1
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])             # <<<<<<<<<<<<<<
 *         if counter1==1:
 *             if  verbose>0:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2199, __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, 2199, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2199, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_17 = 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_17 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
          __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2199, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
          __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2199, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2199, __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_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_17, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2199, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2199, __pyx_L1_error)
        __pyx_t_9 = ((PyArrayObject *)__pyx_t_16);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 2199, __pyx_L1_error)
        }
        __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_16));
        __pyx_t_16 = 0;
      }
      __pyx_L7:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2200
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 *         if counter1==1:             # <<<<<<<<<<<<<<
 *             if  verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))
 */
    switch (__pyx_v_counter1) {
      case 1:

      /* "pyqcstrc/icosah/mics.pyx":2201
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 *         if counter1==1:
 *             if  verbose>0:             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2202
 *         if counter1==1:
 *             if  verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))             # <<<<<<<<<<<<<<
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *                 print('         volume sum 2  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 */
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2202, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2202, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2202, __pyx_L1_error)
        __pyx_t_16 = __pyx_f_8pyqcstrc_6icosah_5utils_tetrahedron_volume_6d(((PyArrayObject *)__pyx_t_4), 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2202, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (likely(__pyx_t_16 != Py_None)) {
          PyObject* sequence = __pyx_t_16;
          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, 2202, __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_2 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2202, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2202, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2202, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2202, __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, 2202, __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, 2202, __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, 2202, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_w1 = __pyx_t_8;
        __pyx_v_w2 = __pyx_t_7;
        __pyx_v_w3 = __pyx_t_6;

        /* "pyqcstrc/icosah/mics.pyx":2203
 *             if  verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))             # <<<<<<<<<<<<<<
 *                 print('         volume sum 2  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *                 # sum of two tetrahedra is forming a tetrahedron
 */
        __pyx_t_16 = PyTuple_New(9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_18 = 0;
        __pyx_t_19 = 127;
        __Pyx_INCREF(__pyx_kp_u_volume_merged_tet);
        __pyx_t_18 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_volume_merged_tet);
        PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_volume_merged_tet);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_w1, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2203, __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_16, 1, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_kp_u__17);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_w2, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2203, __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_16, 3, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_kp_u__17);
        __pyx_t_2 = __Pyx_PyUnicode_From_long(__pyx_v_w3, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2203, __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_16, 5, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__18);
        __pyx_t_18 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_kp_u__18);
        __pyx_t_20 = (__pyx_v_w1 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_w2));
        if (unlikely(__pyx_v_w3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 2203, __pyx_L1_error)
        }
        __pyx_t_2 = PyFloat_FromDouble((__pyx_t_20 / ((__pyx_t_5numpy_float64_t)__pyx_v_w3))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_2, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_19 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_19) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_19;
        __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__19);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_kp_u__19);
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_16, 9, __pyx_t_18, __pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2204
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 *                 print('         volume sum 2  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))             # <<<<<<<<<<<<<<
 *                 # sum of two tetrahedra is forming a tetrahedron
 *                 print('         merged')
 */
        __pyx_t_16 = PyTuple_New(9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_18 = 0;
        __pyx_t_19 = 127;
        __Pyx_INCREF(__pyx_kp_u_volume_sum_2_tet);
        __pyx_t_18 += 29;
        __Pyx_GIVEREF(__pyx_kp_u_volume_sum_2_tet);
        PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_volume_sum_2_tet);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v1, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2204, __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_16, 1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_kp_u__17);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v2, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2204, __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_16, 3, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_kp_u__17);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_v3, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2204, __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_16, 5, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__18);
        __pyx_t_18 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_kp_u__18);
        __pyx_t_20 = (__pyx_v_v1 + (__pyx_v_8pyqcstrc_6icosah_4mics_TAU * __pyx_v_v2));
        if (unlikely(__pyx_v_v3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 2204, __pyx_L1_error)
        }
        __pyx_t_5 = PyFloat_FromDouble((__pyx_t_20 / ((__pyx_t_5numpy_float64_t)__pyx_v_v3))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_kp_u_8_6f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_19 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_19) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_19;
        __pyx_t_18 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u__19);
        __pyx_t_18 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_kp_u__19);
        __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_16, 9, __pyx_t_18, __pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2206
 *                 print('         volume sum 2  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *                 # sum of two tetrahedra is forming a tetrahedron
 *                 print('         merged')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2201
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 *         if counter1==1:
 *             if  verbose>0:             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))
 *                 print('         volume merged tet = %d %d %d (%8.6f)'%(w1,w2,w3,(w1+TAU*w2)/w3))
 */
        goto __pyx_L8;
      }

      /* "pyqcstrc/icosah/mics.pyx":2208
 *                 print('         merged')
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp1a.reshape(4,6,3)
 *         elif  counter1==0:
 */
      /*else*/ {
      }
      __pyx_L8:;

      /* "pyqcstrc/icosah/mics.pyx":2209
 *             else:
 *                 pass
 *             return tmp1a.reshape(4,6,3)             # <<<<<<<<<<<<<<
 *         elif  counter1==0:
 *             # sum of two tetrahedra is not tetrahedron
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2209, __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, 2209, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":2200
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp3a[i1])
 *         if counter1==1:             # <<<<<<<<<<<<<<
 *             if  verbose>0:
 *                 w1,w2,w3=tetrahedron_volume_6d(tmp1a.reshape(4,6,3))
 */
      break;
      case 0:

      /* "pyqcstrc/icosah/mics.pyx":2212
 *         elif  counter1==0:
 *             # sum of two tetrahedra is not tetrahedron
 *             return np.array([[[0]]])             # <<<<<<<<<<<<<<
 *         else:
 *             # something strange
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_0);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_16);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_16);
      __pyx_t_16 = 0;
      __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_16, 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_16) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_16);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2212, __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, 2212, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":2210
 *                 pass
 *             return tmp1a.reshape(4,6,3)
 *         elif  counter1==0:             # <<<<<<<<<<<<<<
 *             # sum of two tetrahedra is not tetrahedron
 *             return np.array([[[0]]])
 */
      break;
      default:

      /* "pyqcstrc/icosah/mics.pyx":2215
 *         else:
 *             # something strange
 *             return np.array([[[0]]])             # <<<<<<<<<<<<<<
 *     else:
 *         # no common triangle
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2215, __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, 2215, __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, 2215, __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_16))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __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, 2215, __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, 2215, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
      break;
    }

    /* "pyqcstrc/icosah/mics.pyx":2189
 *     tmp3a=np.array([0]).reshape(1,1,1)
 *     tmp3a=check_two_tetrahedra(tetrahedron_1,tetrahedron_2)
 *     if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *         tmp1a=np.append(tmp3a[3],tmp3a[4])
 *         counter1=0
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2218
 *     else:
 *         # no common triangle
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray do_merge_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj, int numbre_of_cycle, int numbre_of_tetrahedron, int verbose):
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_0);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_16);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_16);
    __pyx_t_16 = 0;
    __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_4);
    PyList_SET_ITEM(__pyx_t_16, 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_16) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_16);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __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, 2218, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2166
 * 
 * # new
 * cdef np.ndarray merge_two_tetrahedra(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_15);
  __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_tetrahedron_1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron_2.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.mics.merge_two_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __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_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;
}

/* "pyqcstrc/icosah/mics.pyx":2220
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray do_merge_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj, int numbre_of_cycle, int numbre_of_tetrahedron, int verbose):             # <<<<<<<<<<<<<<
 *     cdef int i1
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a,tmp4b
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_do_merge_tetrahedra_in_obj(PyArrayObject *__pyx_v_obj, int __pyx_v_numbre_of_cycle, int __pyx_v_numbre_of_tetrahedron, int __pyx_v_verbose) {
  CYTHON_UNUSED int __pyx_v_i1;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __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;
  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;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("do_merge_tetrahedra_in_obj", 0);
  __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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2220, __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/mics.pyx":2224
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a,tmp4b
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        do_merge_tetrahedra_in_obj()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

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

  /* "pyqcstrc/icosah/mics.pyx":2227
 *         print('        do_merge_tetrahedra_in_obj()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp4a=np.array([[[[0]]]])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":2229
 *         pass
 * 
 *     tmp4a=np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     tmp4a=obj
 *     if len(obj)>=numbre_of_tetrahedron:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2229, __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, 2229, __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, 2229, __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, 2229, __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, 2229, __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, 2229, __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, 2229, __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, 2229, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2229, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2230
 * 
 *     tmp4a=np.array([[[[0]]]])
 *     tmp4a=obj             # <<<<<<<<<<<<<<
 *     if len(obj)>=numbre_of_tetrahedron:
 *         # merging two tetrahedra
 */
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_obj), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 2230, __pyx_L1_error)
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_obj));
  __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_v_obj));

  /* "pyqcstrc/icosah/mics.pyx":2231
 *     tmp4a=np.array([[[[0]]]])
 *     tmp4a=obj
 *     if len(obj)>=numbre_of_tetrahedron:             # <<<<<<<<<<<<<<
 *         # merging two tetrahedra
 *         for i1 in range(numbre_of_cycle):
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2231, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_11 >= __pyx_v_numbre_of_tetrahedron) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2233
 *     if len(obj)>=numbre_of_tetrahedron:
 *         # merging two tetrahedra
 *         for i1 in range(numbre_of_cycle):             # <<<<<<<<<<<<<<
 *             #
 *             if numbre_of_tetrahedron==2:
 */
    __pyx_t_7 = __pyx_v_numbre_of_cycle;
    __pyx_t_12 = __pyx_t_7;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
      __pyx_v_i1 = __pyx_t_13;

      /* "pyqcstrc/icosah/mics.pyx":2235
 *         for i1 in range(numbre_of_cycle):
 *             #
 *             if numbre_of_tetrahedron==2:             # <<<<<<<<<<<<<<
 *                 tmp4b=merge_2_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif numbre_of_tetrahedron==3:
 */
      switch (__pyx_v_numbre_of_tetrahedron) {
        case 2:

        /* "pyqcstrc/icosah/mics.pyx":2236
 *             #
 *             if numbre_of_tetrahedron==2:
 *                 tmp4b=merge_2_tetrahedra_in_obj(tmp4a,verbose-1)             # <<<<<<<<<<<<<<
 *             elif numbre_of_tetrahedron==3:
 *                 tmp4b=merge_3_tetrahedra_in_obj(tmp4a,verbose-1)
 */
        __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_merge_2_tetrahedra_in_obj(((PyArrayObject *)__pyx_v_tmp4a), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_14 < 0)) {
            PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_14 < 0)) __PYX_ERR(0, 2236, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2235
 *         for i1 in range(numbre_of_cycle):
 *             #
 *             if numbre_of_tetrahedron==2:             # <<<<<<<<<<<<<<
 *                 tmp4b=merge_2_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif numbre_of_tetrahedron==3:
 */
        break;
        case 3:

        /* "pyqcstrc/icosah/mics.pyx":2238
 *                 tmp4b=merge_2_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif numbre_of_tetrahedron==3:
 *                 tmp4b=merge_3_tetrahedra_in_obj(tmp4a,verbose-1)             # <<<<<<<<<<<<<<
 *             elif  numbre_of_tetrahedron==4:
 *                 tmp4b=merge_4_tetrahedra_in_obj(tmp4a,verbose-1)
 */
        __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_merge_3_tetrahedra_in_obj(((PyArrayObject *)__pyx_v_tmp4a), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_14 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_14 < 0)) __PYX_ERR(0, 2238, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2237
 *             if numbre_of_tetrahedron==2:
 *                 tmp4b=merge_2_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif numbre_of_tetrahedron==3:             # <<<<<<<<<<<<<<
 *                 tmp4b=merge_3_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif  numbre_of_tetrahedron==4:
 */
        break;
        case 4:

        /* "pyqcstrc/icosah/mics.pyx":2240
 *                 tmp4b=merge_3_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif  numbre_of_tetrahedron==4:
 *                 tmp4b=merge_4_tetrahedra_in_obj(tmp4a,verbose-1)             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_merge_4_tetrahedra_in_obj(((PyArrayObject *)__pyx_v_tmp4a), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
          __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_14 < 0)) {
            PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_14 < 0)) __PYX_ERR(0, 2240, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2239
 *             elif numbre_of_tetrahedron==3:
 *                 tmp4b=merge_3_tetrahedra_in_obj(tmp4a,verbose-1)
 *             elif  numbre_of_tetrahedron==4:             # <<<<<<<<<<<<<<
 *                 tmp4b=merge_4_tetrahedra_in_obj(tmp4a,verbose-1)
 *             else:
 */
        break;
        default:
        break;
      }

      /* "pyqcstrc/icosah/mics.pyx":2244
 *                 pass
 *             #
 *             if tmp4b.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('        simplification: %d -> %d'%(len(tmp4a),len(tmp4b)))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      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_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2244, __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, 2244, __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, 2244, __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, 2244, __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, 2244, __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 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2244, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2244, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2245
 *             #
 *             if tmp4b.tolist()!=[[[[0]]]]:
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('        simplification: %d -> %d'%(len(tmp4a),len(tmp4b)))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2246
 *             if tmp4b.tolist()!=[[[[0]]]]:
 *                 if verbose>1:
 *                     print('        simplification: %d -> %d'%(len(tmp4a),len(tmp4b)))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = 0;
          __pyx_t_15 = 127;
          __Pyx_INCREF(__pyx_kp_u_simplification);
          __pyx_t_11 += 24;
          __Pyx_GIVEREF(__pyx_kp_u_simplification);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_simplification);
          __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2246, __pyx_L1_error)
          __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_16, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_11 += __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__42);
          __pyx_t_11 += 4;
          __Pyx_GIVEREF(__pyx_kp_u__42);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__42);
          __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2246, __pyx_L1_error)
          __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_16, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_11 += __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_11, __pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __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, 2246, __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/mics.pyx":2245
 *             #
 *             if tmp4b.tolist()!=[[[[0]]]]:
 *                 if verbose>1:             # <<<<<<<<<<<<<<
 *                     print('        simplification: %d -> %d'%(len(tmp4a),len(tmp4b)))
 *                 else:
 */
          goto __pyx_L8;
        }

        /* "pyqcstrc/icosah/mics.pyx":2248
 *                     print('        simplification: %d -> %d'%(len(tmp4a),len(tmp4b)))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 if len(obj)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *                     tmp4a=tmp4b
 */
        /*else*/ {
        }
        __pyx_L8:;

        /* "pyqcstrc/icosah/mics.pyx":2249
 *                 else:
 *                     pass
 *                 if len(obj)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:             # <<<<<<<<<<<<<<
 *                     tmp4a=tmp4b
 *                     break
 */
        __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2249, __pyx_L1_error)
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2249, __pyx_L1_error)
        __pyx_t_17 = ((__pyx_t_11 == __pyx_t_16) != 0);
        if (!__pyx_t_17) {
        } else {
          __pyx_t_1 = __pyx_t_17;
          goto __pyx_L10_bool_binop_done;
        }
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2249, __pyx_L1_error)
        __pyx_t_17 = ((__pyx_t_16 < __pyx_v_numbre_of_tetrahedron) != 0);
        __pyx_t_1 = __pyx_t_17;
        __pyx_L10_bool_binop_done:;
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2250
 *                     pass
 *                 if len(obj)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *                     tmp4a=tmp4b             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_14 < 0)) {
              PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_14 < 0)) __PYX_ERR(0, 2250, __pyx_L1_error)
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
          __Pyx_DECREF_SET(__pyx_v_tmp4a, __pyx_v_tmp4b);

          /* "pyqcstrc/icosah/mics.pyx":2251
 *                 if len(obj)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *                     tmp4a=tmp4b
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp4a=tmp4b
 */
          goto __pyx_L6_break;

          /* "pyqcstrc/icosah/mics.pyx":2249
 *                 else:
 *                     pass
 *                 if len(obj)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:             # <<<<<<<<<<<<<<
 *                     tmp4a=tmp4b
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":2253
 *                     break
 *                 else:
 *                     tmp4a=tmp4b             # <<<<<<<<<<<<<<
 *             else:
 *                 if verbose>0:
 */
        /*else*/ {
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_14 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_14 < 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_4mics_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_14 < 0)) __PYX_ERR(0, 2253, __pyx_L1_error)
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
          __Pyx_DECREF_SET(__pyx_v_tmp4a, __pyx_v_tmp4b);
        }

        /* "pyqcstrc/icosah/mics.pyx":2244
 *                 pass
 *             #
 *             if tmp4b.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 if verbose>1:
 *                     print('        simplification: %d -> %d'%(len(tmp4a),len(tmp4b)))
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/mics.pyx":2255
 *                     tmp4a=tmp4b
 *             else:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('      simplification: fail')
 *                     print('      return previous obj')
 */
      /*else*/ {
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2256
 *             else:
 *                 if verbose>0:
 *                     print('      simplification: fail')             # <<<<<<<<<<<<<<
 *                     print('      return previous obj')
 *                 else:
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2256, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2257
 *                 if verbose>0:
 *                     print('      simplification: fail')
 *                     print('      return previous obj')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2257, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2255
 *                     tmp4a=tmp4b
 *             else:
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('      simplification: fail')
 *                     print('      return previous obj')
 */
          goto __pyx_L12;
        }

        /* "pyqcstrc/icosah/mics.pyx":2259
 *                     print('      return previous obj')
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 break
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 */
        /*else*/ {
        }
        __pyx_L12:;

        /* "pyqcstrc/icosah/mics.pyx":2260
 *                 else:
 *                     pass
 *                 break             # <<<<<<<<<<<<<<
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *             if verbose>0:
 */
        goto __pyx_L6_break;
      }
      __pyx_L7:;
    }
    __pyx_L6_break:;

    /* "pyqcstrc/icosah/mics.pyx":2261
 *                     pass
 *                 break
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('        succeed: %d to %d'%(len(obj),len(tmp4b)))
 */
    __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2261, __pyx_L1_error)
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2261, __pyx_L1_error)
    __pyx_t_17 = ((__pyx_t_16 == __pyx_t_11) != 0);
    if (!__pyx_t_17) {
    } else {
      __pyx_t_1 = __pyx_t_17;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2261, __pyx_L1_error)
    __pyx_t_17 = ((__pyx_t_11 < __pyx_v_numbre_of_tetrahedron) != 0);
    __pyx_t_1 = __pyx_t_17;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2262
 *                 break
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        succeed: %d to %d'%(len(obj),len(tmp4b)))
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2263
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *             if verbose>0:
 *                 print('        succeed: %d to %d'%(len(obj),len(tmp4b)))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2263, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = 0;
        __pyx_t_15 = 127;
        __Pyx_INCREF(__pyx_kp_u_succeed);
        __pyx_t_11 += 17;
        __Pyx_GIVEREF(__pyx_kp_u_succeed);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_succeed);
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2263, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_16, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2263, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 += __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_to);
        __pyx_t_11 += 4;
        __Pyx_GIVEREF(__pyx_kp_u_to);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to);
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2263, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_16, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2263, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 += __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_11, __pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2263, __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, 2263, __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/mics.pyx":2262
 *                 break
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('        succeed: %d to %d'%(len(obj),len(tmp4b)))
 *             else:
 */
        goto __pyx_L16;
      }

      /* "pyqcstrc/icosah/mics.pyx":2265
 *                 print('        succeed: %d to %d'%(len(obj),len(tmp4b)))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             tmp4a=tmp4b
 *         else:
 */
      /*else*/ {
      }
      __pyx_L16:;

      /* "pyqcstrc/icosah/mics.pyx":2266
 *             else:
 *                 pass
 *             tmp4a=tmp4b             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      {
        __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_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 2266, __pyx_L1_error)
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4b));
      __Pyx_DECREF_SET(__pyx_v_tmp4a, __pyx_v_tmp4b);

      /* "pyqcstrc/icosah/mics.pyx":2261
 *                     pass
 *                 break
 *         if len(tmp4a)==len(tmp4b) or len(tmp4b)<numbre_of_tetrahedron:             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('        succeed: %d to %d'%(len(obj),len(tmp4b)))
 */
      goto __pyx_L13;
    }

    /* "pyqcstrc/icosah/mics.pyx":2268
 *             tmp4a=tmp4b
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         return tmp4a
 *     else:
 */
    /*else*/ {
    }
    __pyx_L13:;

    /* "pyqcstrc/icosah/mics.pyx":2269
 *         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/mics.pyx":2231
 *     tmp4a=np.array([[[[0]]]])
 *     tmp4a=obj
 *     if len(obj)>=numbre_of_tetrahedron:             # <<<<<<<<<<<<<<
 *         # merging two tetrahedra
 *         for i1 in range(numbre_of_cycle):
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2271
 *         return tmp4a
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray simplification(np.ndarray[DTYPE_int_t, ndim=4] obj,
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2271, __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, 2271, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2271, __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, 2271, __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, 2271, __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 = 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_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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, 2271, __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, 2271, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2220
 *         return np.array([[[0]]])
 * 
 * cdef np.ndarray do_merge_tetrahedra_in_obj(np.ndarray[DTYPE_int_t, ndim=4] obj, int numbre_of_cycle, int numbre_of_tetrahedron, int verbose):             # <<<<<<<<<<<<<<
 *     cdef int i1
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] tmp4a,tmp4b
 */

  /* 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);
  { 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_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.do_merge_tetrahedra_in_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_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2273
 *         return np.array([[[[0]]]])
 * 
 * cpdef np.ndarray simplification(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                 int num2_of_cycle,
 *                                 int num3_of_cycle,
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_11simplification(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_simplification(PyArrayObject *__pyx_v_obj, int __pyx_v_num2_of_cycle, int __pyx_v_num3_of_cycle, int __pyx_v_num4_of_cycle, int __pyx_v_num2_of_shuffle, int __pyx_v_num3_of_shuffle, int __pyx_v_num4_of_shuffle, int __pyx_v_verbose_level, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_index_min;
  PyObject *__pyx_v_b = 0;
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  PyArrayObject *__pyx_v_obj_new = 0;
  PyObject *__pyx_v_obj_min = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __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_obj_new;
  __Pyx_Buffer __pyx_pybuffer_obj_new;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  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;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification", 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_pybuffer_obj_new.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_new.refcount = 0;
  __pyx_pybuffernd_obj_new.data = NULL;
  __pyx_pybuffernd_obj_new.rcbuffer = &__pyx_pybuffer_obj_new;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2273, __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/mics.pyx":2287
 * 
 *     # verbose_level  0 > 4 (no comment, verbose)
 *     if verbose_level>=0:             # <<<<<<<<<<<<<<
 *         print('    simplification()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose_level >= 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2288
 *     # verbose_level  0 > 4 (no comment, verbose)
 *     if verbose_level>=0:
 *         print('    simplification()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2287
 * 
 *     # verbose_level  0 > 4 (no comment, verbose)
 *     if verbose_level>=0:             # <<<<<<<<<<<<<<
 *         print('    simplification()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":2290
 *         print('    simplification()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     # obj44.
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":2295
 *     # .
 * 
 *     if num2_of_shuffle>0:             # <<<<<<<<<<<<<<
 *         b=[]
 *         for i1 in range(num2_of_shuffle):
 */
  __pyx_t_1 = ((__pyx_v_num2_of_shuffle > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2296
 * 
 *     if num2_of_shuffle>0:
 *         b=[]             # <<<<<<<<<<<<<<
 *         for i1 in range(num2_of_shuffle):
 *             obj1=shuffle_obj(obj)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_b = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2297
 *     if num2_of_shuffle>0:
 *         b=[]
 *         for i1 in range(num2_of_shuffle):             # <<<<<<<<<<<<<<
 *             obj1=shuffle_obj(obj)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num2_of_cycle,2,verbose_level-1)
 */
    __pyx_t_3 = __pyx_v_num2_of_shuffle;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i1 = __pyx_t_5;

      /* "pyqcstrc/icosah/mics.pyx":2298
 *         b=[]
 *         for i1 in range(num2_of_shuffle):
 *             obj1=shuffle_obj(obj)             # <<<<<<<<<<<<<<
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num2_of_cycle,2,verbose_level-1)
 *             if len(obj2)!=1:
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_shuffle_obj(((PyArrayObject *)__pyx_v_obj))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2298, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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];
        if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2298, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_obj1, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2299
 *         for i1 in range(num2_of_shuffle):
 *             obj1=shuffle_obj(obj)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num2_of_cycle,2,verbose_level-1)             # <<<<<<<<<<<<<<
 *             if len(obj2)!=1:
 *                 obj_new=obj2
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_do_merge_tetrahedra_in_obj(((PyArrayObject *)__pyx_v_obj1), __pyx_v_num2_of_cycle, 2, (__pyx_v_verbose_level - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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];
        if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2299, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_obj2, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2300
 *             obj1=shuffle_obj(obj)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num2_of_cycle,2,verbose_level-1)
 *             if len(obj2)!=1:             # <<<<<<<<<<<<<<
 *                 obj_new=obj2
 *             else:
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2300, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_10 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2301
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num2_of_cycle,2,verbose_level-1)
 *             if len(obj2)!=1:
 *                 obj_new=obj2             # <<<<<<<<<<<<<<
 *             else:
 *                 obj_new=obj1
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
          __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2301, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_obj2));
        __Pyx_XDECREF_SET(__pyx_v_obj_new, __pyx_v_obj2);

        /* "pyqcstrc/icosah/mics.pyx":2300
 *             obj1=shuffle_obj(obj)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num2_of_cycle,2,verbose_level-1)
 *             if len(obj2)!=1:             # <<<<<<<<<<<<<<
 *                 obj_new=obj2
 *             else:
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/mics.pyx":2303
 *                 obj_new=obj2
 *             else:
 *                 obj_new=obj1             # <<<<<<<<<<<<<<
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))
 */
      /*else*/ {
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
          __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2303, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_obj1));
        __Pyx_XDECREF_SET(__pyx_v_obj_new, __pyx_v_obj1);
      }
      __pyx_L7:;

      /* "pyqcstrc/icosah/mics.pyx":2304
 *             else:
 *                 obj_new=obj1
 *             make_tmp_pod(obj_new,i1)             # <<<<<<<<<<<<<<
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))
 */
      (void)(__pyx_f_8pyqcstrc_6icosah_4mics_make_tmp_pod(((PyArrayObject *)__pyx_v_obj_new), __pyx_v_i1));

      /* "pyqcstrc/icosah/mics.pyx":2305
 *                 obj_new=obj1
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))             # <<<<<<<<<<<<<<
 *         index_min=b.index(min(b))
 *         obj_min=read_tmp_pod(index_min)
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj_new)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2305, __pyx_L1_error)
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2305, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_b, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2305, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "pyqcstrc/icosah/mics.pyx":2306
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))             # <<<<<<<<<<<<<<
 *         obj_min=read_tmp_pod(index_min)
 *     else:
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_b, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2306, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_v_index_min = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":2307
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))
 *         obj_min=read_tmp_pod(index_min)             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_12 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_read_tmp_pod(__pyx_v_index_min)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_v_obj_min = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2295
 *     # .
 * 
 *     if num2_of_shuffle>0:             # <<<<<<<<<<<<<<
 *         b=[]
 *         for i1 in range(num2_of_shuffle):
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":2309
 *         obj_min=read_tmp_pod(index_min)
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if num3_of_shuffle>0:
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":2311
 *         pass
 * 
 *     if num3_of_shuffle>0:             # <<<<<<<<<<<<<<
 *         b=[]
 *         for i1 in range(num3_of_shuffle):
 */
  __pyx_t_1 = ((__pyx_v_num3_of_shuffle > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2312
 * 
 *     if num3_of_shuffle>0:
 *         b=[]             # <<<<<<<<<<<<<<
 *         for i1 in range(num3_of_shuffle):
 *             #obj1=shuffle_obj(obj)
 */
    __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_XDECREF_SET(__pyx_v_b, ((PyObject*)__pyx_t_12));
    __pyx_t_12 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2313
 *     if num3_of_shuffle>0:
 *         b=[]
 *         for i1 in range(num3_of_shuffle):             # <<<<<<<<<<<<<<
 *             #obj1=shuffle_obj(obj)
 *             obj1=shuffle_obj(obj_min)
 */
    __pyx_t_3 = __pyx_v_num3_of_shuffle;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i1 = __pyx_t_5;

      /* "pyqcstrc/icosah/mics.pyx":2315
 *         for i1 in range(num3_of_shuffle):
 *             #obj1=shuffle_obj(obj)
 *             obj1=shuffle_obj(obj_min)             # <<<<<<<<<<<<<<
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num3_of_cycle,3,verbose_level-1)
 *             if len(obj2)!=1:
 */
      if (unlikely(!__pyx_v_obj_min)) { __Pyx_RaiseUnboundLocalError("obj_min"); __PYX_ERR(0, 2315, __pyx_L1_error) }
      if (!(likely(((__pyx_v_obj_min) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_obj_min, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2315, __pyx_L1_error)
      __pyx_t_12 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_shuffle_obj(((PyArrayObject *)__pyx_v_obj_min))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2315, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_12), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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];
        if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2315, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_obj1, ((PyArrayObject *)__pyx_t_12));
      __pyx_t_12 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2316
 *             #obj1=shuffle_obj(obj)
 *             obj1=shuffle_obj(obj_min)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num3_of_cycle,3,verbose_level-1)             # <<<<<<<<<<<<<<
 *             if len(obj2)!=1:
 *                 obj_new=obj2
 */
      __pyx_t_12 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_do_merge_tetrahedra_in_obj(((PyArrayObject *)__pyx_v_obj1), __pyx_v_num3_of_cycle, 3, (__pyx_v_verbose_level - 1))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_12), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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];
        if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2316, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_obj2, ((PyArrayObject *)__pyx_t_12));
      __pyx_t_12 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2317
 *             obj1=shuffle_obj(obj_min)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num3_of_cycle,3,verbose_level-1)
 *             if len(obj2)!=1:             # <<<<<<<<<<<<<<
 *                 obj_new=obj2
 *             else:
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2317, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_10 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2318
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num3_of_cycle,3,verbose_level-1)
 *             if len(obj2)!=1:
 *                 obj_new=obj2             # <<<<<<<<<<<<<<
 *             else:
 *                 obj_new=obj1
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
          __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2318, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_obj2));
        __Pyx_XDECREF_SET(__pyx_v_obj_new, __pyx_v_obj2);

        /* "pyqcstrc/icosah/mics.pyx":2317
 *             obj1=shuffle_obj(obj_min)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num3_of_cycle,3,verbose_level-1)
 *             if len(obj2)!=1:             # <<<<<<<<<<<<<<
 *                 obj_new=obj2
 *             else:
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/mics.pyx":2320
 *                 obj_new=obj2
 *             else:
 *                 obj_new=obj1             # <<<<<<<<<<<<<<
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))
 */
      /*else*/ {
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
          __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2320, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_obj1));
        __Pyx_XDECREF_SET(__pyx_v_obj_new, __pyx_v_obj1);
      }
      __pyx_L11:;

      /* "pyqcstrc/icosah/mics.pyx":2321
 *             else:
 *                 obj_new=obj1
 *             make_tmp_pod(obj_new,i1)             # <<<<<<<<<<<<<<
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))
 */
      (void)(__pyx_f_8pyqcstrc_6icosah_4mics_make_tmp_pod(((PyArrayObject *)__pyx_v_obj_new), __pyx_v_i1));

      /* "pyqcstrc/icosah/mics.pyx":2322
 *                 obj_new=obj1
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))             # <<<<<<<<<<<<<<
 *         index_min=b.index(min(b))
 *         obj_min=read_tmp_pod(index_min)
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj_new)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2322, __pyx_L1_error)
      __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_b, __pyx_t_12); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2322, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }

    /* "pyqcstrc/icosah/mics.pyx":2323
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))             # <<<<<<<<<<<<<<
 *         obj_min=read_tmp_pod(index_min)
 *     else:
 */
    __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_v_b); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_b, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2323, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_index_min = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":2324
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))
 *         obj_min=read_tmp_pod(index_min)             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_read_tmp_pod(__pyx_v_index_min)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_obj_min, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2311
 *         pass
 * 
 *     if num3_of_shuffle>0:             # <<<<<<<<<<<<<<
 *         b=[]
 *         for i1 in range(num3_of_shuffle):
 */
    goto __pyx_L8;
  }

  /* "pyqcstrc/icosah/mics.pyx":2326
 *         obj_min=read_tmp_pod(index_min)
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if num4_of_shuffle>0:
 */
  /*else*/ {
  }
  __pyx_L8:;

  /* "pyqcstrc/icosah/mics.pyx":2328
 *         pass
 * 
 *     if num4_of_shuffle>0:             # <<<<<<<<<<<<<<
 *         b=[]
 *         for i1 in range(num4_of_shuffle):
 */
  __pyx_t_1 = ((__pyx_v_num4_of_shuffle > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2329
 * 
 *     if num4_of_shuffle>0:
 *         b=[]             # <<<<<<<<<<<<<<
 *         for i1 in range(num4_of_shuffle):
 *             #obj1=shuffle_obj(obj)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_b, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2330
 *     if num4_of_shuffle>0:
 *         b=[]
 *         for i1 in range(num4_of_shuffle):             # <<<<<<<<<<<<<<
 *             #obj1=shuffle_obj(obj)
 *             obj1=shuffle_obj(obj_min)
 */
    __pyx_t_3 = __pyx_v_num4_of_shuffle;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i1 = __pyx_t_5;

      /* "pyqcstrc/icosah/mics.pyx":2332
 *         for i1 in range(num4_of_shuffle):
 *             #obj1=shuffle_obj(obj)
 *             obj1=shuffle_obj(obj_min)             # <<<<<<<<<<<<<<
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num4_of_cycle,4,verbose_level-1)
 *             if len(obj2)!=1:
 */
      if (unlikely(!__pyx_v_obj_min)) { __Pyx_RaiseUnboundLocalError("obj_min"); __PYX_ERR(0, 2332, __pyx_L1_error) }
      if (!(likely(((__pyx_v_obj_min) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_obj_min, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2332, __pyx_L1_error)
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_shuffle_obj(((PyArrayObject *)__pyx_v_obj_min))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj1.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj1.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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];
        if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2332, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_obj1, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2333
 *             #obj1=shuffle_obj(obj)
 *             obj1=shuffle_obj(obj_min)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num4_of_cycle,4,verbose_level-1)             # <<<<<<<<<<<<<<
 *             if len(obj2)!=1:
 *                 obj_new=obj2
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_do_merge_tetrahedra_in_obj(((PyArrayObject *)__pyx_v_obj1), __pyx_v_num4_of_cycle, 4, (__pyx_v_verbose_level - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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];
        if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2333, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_obj2, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2334
 *             obj1=shuffle_obj(obj_min)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num4_of_cycle,4,verbose_level-1)
 *             if len(obj2)!=1:             # <<<<<<<<<<<<<<
 *                 obj_new=obj2
 *             else:
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2334, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_10 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2335
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num4_of_cycle,4,verbose_level-1)
 *             if len(obj2)!=1:
 *                 obj_new=obj2             # <<<<<<<<<<<<<<
 *             else:
 *                 obj_new=obj1
 */
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
          __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2335, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_obj2));
        __Pyx_XDECREF_SET(__pyx_v_obj_new, __pyx_v_obj2);

        /* "pyqcstrc/icosah/mics.pyx":2334
 *             obj1=shuffle_obj(obj_min)
 *             obj2=do_merge_tetrahedra_in_obj(obj1,num4_of_cycle,4,verbose_level-1)
 *             if len(obj2)!=1:             # <<<<<<<<<<<<<<
 *                 obj_new=obj2
 *             else:
 */
        goto __pyx_L15;
      }

      /* "pyqcstrc/icosah/mics.pyx":2337
 *                 obj_new=obj2
 *             else:
 *                 obj_new=obj1             # <<<<<<<<<<<<<<
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))
 */
      /*else*/ {
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
          __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2337, __pyx_L1_error)
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_obj1));
        __Pyx_XDECREF_SET(__pyx_v_obj_new, __pyx_v_obj1);
      }
      __pyx_L15:;

      /* "pyqcstrc/icosah/mics.pyx":2338
 *             else:
 *                 obj_new=obj1
 *             make_tmp_pod(obj_new,i1)             # <<<<<<<<<<<<<<
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))
 */
      (void)(__pyx_f_8pyqcstrc_6icosah_4mics_make_tmp_pod(((PyArrayObject *)__pyx_v_obj_new), __pyx_v_i1));

      /* "pyqcstrc/icosah/mics.pyx":2339
 *                 obj_new=obj1
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))             # <<<<<<<<<<<<<<
 *         index_min=b.index(min(b))
 *         obj_min=read_tmp_pod(index_min)
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj_new)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2339, __pyx_L1_error)
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_b, __pyx_t_2); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2339, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "pyqcstrc/icosah/mics.pyx":2340
 *             make_tmp_pod(obj_new,i1)
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))             # <<<<<<<<<<<<<<
 *         obj_min=read_tmp_pod(index_min)
 *     else:
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_b, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_v_index_min = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":2341
 *             b.append(len(obj_new))
 *         index_min=b.index(min(b))
 *         obj_min=read_tmp_pod(index_min)             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_12 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_read_tmp_pod(__pyx_v_index_min)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_XDECREF_SET(__pyx_v_obj_min, __pyx_t_12);
    __pyx_t_12 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2328
 *         pass
 * 
 *     if num4_of_shuffle>0:             # <<<<<<<<<<<<<<
 *         b=[]
 *         for i1 in range(num4_of_shuffle):
 */
    goto __pyx_L12;
  }

  /* "pyqcstrc/icosah/mics.pyx":2343
 *         obj_min=read_tmp_pod(index_min)
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     if num2_of_shuffle==0 and num3_of_shuffle==0 and num4_of_shuffle==0:
 */
  /*else*/ {
  }
  __pyx_L12:;

  /* "pyqcstrc/icosah/mics.pyx":2345
 *         pass
 * 
 *     if num2_of_shuffle==0 and num3_of_shuffle==0 and num4_of_shuffle==0:             # <<<<<<<<<<<<<<
 *         obj_min=obj
 *     else:
 */
  __pyx_t_13 = ((__pyx_v_num2_of_shuffle == 0) != 0);
  if (__pyx_t_13) {
  } else {
    __pyx_t_1 = __pyx_t_13;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_13 = ((__pyx_v_num3_of_shuffle == 0) != 0);
  if (__pyx_t_13) {
  } else {
    __pyx_t_1 = __pyx_t_13;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_13 = ((__pyx_v_num4_of_shuffle == 0) != 0);
  __pyx_t_1 = __pyx_t_13;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2346
 * 
 *     if num2_of_shuffle==0 and num3_of_shuffle==0 and num4_of_shuffle==0:
 *         obj_min=obj             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_obj));
    __Pyx_XDECREF_SET(__pyx_v_obj_min, ((PyObject *)__pyx_v_obj));

    /* "pyqcstrc/icosah/mics.pyx":2345
 *         pass
 * 
 *     if num2_of_shuffle==0 and num3_of_shuffle==0 and num4_of_shuffle==0:             # <<<<<<<<<<<<<<
 *         obj_min=obj
 *     else:
 */
    goto __pyx_L16;
  }

  /* "pyqcstrc/icosah/mics.pyx":2348
 *         obj_min=obj
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     return obj_min
 */
  /*else*/ {
  }
  __pyx_L16:;

  /* "pyqcstrc/icosah/mics.pyx":2350
 *         pass
 * 
 *     return obj_min             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray shuffle_obj(np.ndarray[DTYPE_int_t, ndim=4] obj):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (unlikely(!__pyx_v_obj_min)) { __Pyx_RaiseUnboundLocalError("obj_min"); __PYX_ERR(0, 2350, __pyx_L1_error) }
  if (!(likely(((__pyx_v_obj_min) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_obj_min, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_obj_min);
  __pyx_r = ((PyArrayObject *)__pyx_v_obj_min);
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":2273
 *         return np.array([[[[0]]]])
 * 
 * cpdef np.ndarray simplification(np.ndarray[DTYPE_int_t, ndim=4] obj,             # <<<<<<<<<<<<<<
 *                                 int num2_of_cycle,
 *                                 int num3_of_cycle,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_12);
  { 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_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification", __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_obj1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj1);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj2);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_new);
  __Pyx_XDECREF(__pyx_v_obj_min);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_11simplification(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_11simplification(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj = 0;
  int __pyx_v_num2_of_cycle;
  int __pyx_v_num3_of_cycle;
  int __pyx_v_num4_of_cycle;
  int __pyx_v_num2_of_shuffle;
  int __pyx_v_num3_of_shuffle;
  int __pyx_v_num4_of_shuffle;
  int __pyx_v_verbose_level;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simplification (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_num2_of_cycle,&__pyx_n_s_num3_of_cycle,&__pyx_n_s_num4_of_cycle,&__pyx_n_s_num2_of_shuffle,&__pyx_n_s_num3_of_shuffle,&__pyx_n_s_num4_of_shuffle,&__pyx_n_s_verbose_level,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        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_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_num2_of_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 1); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num3_of_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 2); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num4_of_cycle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 3); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num2_of_shuffle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 4); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num3_of_shuffle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 5); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num4_of_shuffle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 6); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose_level)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, 7); __PYX_ERR(0, 2273, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "simplification") < 0)) __PYX_ERR(0, 2273, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_obj = ((PyArrayObject *)values[0]);
    __pyx_v_num2_of_cycle = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num2_of_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2274, __pyx_L3_error)
    __pyx_v_num3_of_cycle = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_num3_of_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2275, __pyx_L3_error)
    __pyx_v_num4_of_cycle = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num4_of_cycle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2276, __pyx_L3_error)
    __pyx_v_num2_of_shuffle = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_num2_of_shuffle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2277, __pyx_L3_error)
    __pyx_v_num3_of_shuffle = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_num3_of_shuffle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
    __pyx_v_num4_of_shuffle = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_num4_of_shuffle == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2279, __pyx_L3_error)
    __pyx_v_verbose_level = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_verbose_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplification", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2273, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification", __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, 2273, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_10simplification(__pyx_self, __pyx_v_obj, __pyx_v_num2_of_cycle, __pyx_v_num3_of_cycle, __pyx_v_num4_of_cycle, __pyx_v_num2_of_shuffle, __pyx_v_num3_of_shuffle, __pyx_v_num4_of_shuffle, __pyx_v_verbose_level);

  /* 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_4mics_10simplification(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj, int __pyx_v_num2_of_cycle, int __pyx_v_num3_of_cycle, int __pyx_v_num4_of_cycle, int __pyx_v_num2_of_shuffle, int __pyx_v_num3_of_shuffle, int __pyx_v_num4_of_shuffle, int __pyx_v_verbose_level) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplification", 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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2273, __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_4mics_simplification(((PyArrayObject *)__pyx_v_obj), __pyx_v_num2_of_cycle, __pyx_v_num3_of_cycle, __pyx_v_num4_of_cycle, __pyx_v_num2_of_shuffle, __pyx_v_num3_of_shuffle, __pyx_v_num4_of_shuffle, __pyx_v_verbose_level, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2273, __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_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.simplification", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2352
 *     return obj_min
 * 
 * cdef np.ndarray shuffle_obj(np.ndarray[DTYPE_int_t, ndim=4] obj):             # <<<<<<<<<<<<<<
 *     cdef int i1
 *     cdef list a
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_shuffle_obj(PyArrayObject *__pyx_v_obj) {
  int __pyx_v_i1;
  PyObject *__pyx_v_a = 0;
  PyArrayObject *__pyx_v_index_list = 0;
  PyArrayObject *__pyx_v_tmp1 = 0;
  PyArrayObject *__pyx_v_obj_new = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index_list;
  __Pyx_Buffer __pyx_pybuffer_index_list;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj;
  __Pyx_Buffer __pyx_pybuffer_obj;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj_new;
  __Pyx_Buffer __pyx_pybuffer_obj_new;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1;
  __Pyx_Buffer __pyx_pybuffer_tmp1;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = 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;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyArrayObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("shuffle_obj", 0);
  __pyx_pybuffer_index_list.pybuffer.buf = NULL;
  __pyx_pybuffer_index_list.refcount = 0;
  __pyx_pybuffernd_index_list.data = NULL;
  __pyx_pybuffernd_index_list.rcbuffer = &__pyx_pybuffer_index_list;
  __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_obj_new.pybuffer.buf = NULL;
  __pyx_pybuffer_obj_new.refcount = 0;
  __pyx_pybuffernd_obj_new.data = NULL;
  __pyx_pybuffernd_obj_new.rcbuffer = &__pyx_pybuffer_obj_new;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2352, __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/mics.pyx":2358
 *     cdef np.ndarray[DTYPE_int_t, ndim=4] obj_new
 * 
 *     index_list = np.arange(len(obj))             # <<<<<<<<<<<<<<
 *     np.random.shuffle(index_list)
 *     a=index_list.tolist()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_arange); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2358, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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_1 = (__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_1)) __PYX_ERR(0, 2358, __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, 2358, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index_list.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index_list.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_index_list.rcbuffer->pybuffer, (PyObject*)__pyx_v_index_list, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_index_list.diminfo[0].strides = __pyx_pybuffernd_index_list.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index_list.diminfo[0].shape = __pyx_pybuffernd_index_list.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2358, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_index_list = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2359
 * 
 *     index_list = np.arange(len(obj))
 *     np.random.shuffle(index_list)             # <<<<<<<<<<<<<<
 *     a=index_list.tolist()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_random); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shuffle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_index_list)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_index_list));
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2360
 *     index_list = np.arange(len(obj))
 *     np.random.shuffle(index_list)
 *     a=index_list.tolist()             # <<<<<<<<<<<<<<
 * 
 *     for i1 in range(len(a)):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_index_list), __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2360, __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_1 = (__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_1)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 2360, __pyx_L1_error)
  __pyx_v_a = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2362
 *     a=index_list.tolist()
 * 
 *     for i1 in range(len(a)):             # <<<<<<<<<<<<<<
 *         if i1==0:
 *             tmp1=obj[a[0]].reshape(72)
 */
  if (unlikely(__pyx_v_a == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2362, __pyx_L1_error)
  }
  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_a); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2362, __pyx_L1_error)
  __pyx_t_11 = __pyx_t_4;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_11; __pyx_t_7+=1) {
    __pyx_v_i1 = __pyx_t_7;

    /* "pyqcstrc/icosah/mics.pyx":2363
 * 
 *     for i1 in range(len(a)):
 *         if i1==0:             # <<<<<<<<<<<<<<
 *             tmp1=obj[a[0]].reshape(72)
 *         else:
 */
    __pyx_t_12 = ((__pyx_v_i1 == 0) != 0);
    if (__pyx_t_12) {

      /* "pyqcstrc/icosah/mics.pyx":2364
 *     for i1 in range(len(a)):
 *         if i1==0:
 *             tmp1=obj[a[0]].reshape(72)             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1=np.append(tmp1,obj[a[i1]])
 */
      if (unlikely(__pyx_v_a == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 2364, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_obj), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __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_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2364, __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, 2364, __pyx_L1_error)
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_13 < 0)) __PYX_ERR(0, 2364, __pyx_L1_error)
      }
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2363
 * 
 *     for i1 in range(len(a)):
 *         if i1==0:             # <<<<<<<<<<<<<<
 *             tmp1=obj[a[0]].reshape(72)
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":2366
 *             tmp1=obj[a[0]].reshape(72)
 *         else:
 *             tmp1=np.append(tmp1,obj[a[i1]])             # <<<<<<<<<<<<<<
 *     obj_new=tmp1.reshape(int(len(tmp1)/72),4,6,3)
 *     return obj_new
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__pyx_v_a == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 2366, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_a, __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_obj), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1), __pyx_t_5};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1), __pyx_t_5};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1));
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 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, 2366, __pyx_L1_error)
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_13 < 0)) __PYX_ERR(0, 2366, __pyx_L1_error)
      }
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;
    }
    __pyx_L5:;
  }

  /* "pyqcstrc/icosah/mics.pyx":2367
 *         else:
 *             tmp1=np.append(tmp1,obj[a[i1]])
 *     obj_new=tmp1.reshape(int(len(tmp1)/72),4,6,3)             # <<<<<<<<<<<<<<
 *     return obj_new
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_tmp1)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2367, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyInt_FromDouble((((double)__pyx_t_4) / 72.0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_14, __pyx_int_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_14, __pyx_int_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2367, __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_GIVEREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_t_14);
    __Pyx_INCREF(__pyx_int_4);
    __Pyx_GIVEREF(__pyx_int_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_int_4);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_7, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_7, __pyx_int_3);
    __pyx_t_14 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __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, 2367, __pyx_L1_error)
  __pyx_t_15 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_t_15, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj_new, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj_new.diminfo[0].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj_new.diminfo[0].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj_new.diminfo[1].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj_new.diminfo[1].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj_new.diminfo[2].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj_new.diminfo[2].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj_new.diminfo[3].strides = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj_new.diminfo[3].shape = __pyx_pybuffernd_obj_new.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2367, __pyx_L1_error)
  }
  __pyx_t_15 = 0;
  __pyx_v_obj_new = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2368
 *             tmp1=np.append(tmp1,obj[a[i1]])
 *     obj_new=tmp1.reshape(int(len(tmp1)/72),4,6,3)
 *     return obj_new             # <<<<<<<<<<<<<<
 * 
 * ######################################################################################################
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_obj_new));
  __pyx_r = ((PyArrayObject *)__pyx_v_obj_new);
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":2352
 *     return obj_min
 * 
 * cdef np.ndarray shuffle_obj(np.ndarray[DTYPE_int_t, ndim=4] obj):             # <<<<<<<<<<<<<<
 *     cdef int i1
 *     cdef list a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_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_index_list.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.shuffle_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index_list.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj_new.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF((PyObject *)__pyx_v_index_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj_new);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2379
 * 
 * 
 * cdef int on_out_surface(np.ndarray[DTYPE_int_t, ndim=2] point,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=3] triangle):
 * 
 */

static int __pyx_f_8pyqcstrc_6icosah_4mics_on_out_surface(PyArrayObject *__pyx_v_point, PyArrayObject *__pyx_v_triangle) {
  CYTHON_UNUSED PyArrayObject *__pyx_v_m1 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_m2 = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_m3 = 0;
  PyArrayObject *__pyx_v_m4 = 0;
  PyArrayObject *__pyx_v_m5 = 0;
  PyArrayObject *__pyx_v_m6 = 0;
  PyArrayObject *__pyx_v_p1 = 0;
  PyArrayObject *__pyx_v_p2 = 0;
  PyArrayObject *__pyx_v_p3 = 0;
  double __pyx_v_volume0;
  double __pyx_v_volume1;
  PyObject *__pyx_v_p0 = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_m1;
  __Pyx_Buffer __pyx_pybuffer_m1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_m2;
  __Pyx_Buffer __pyx_pybuffer_m2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_m3;
  __Pyx_Buffer __pyx_pybuffer_m3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_m4;
  __Pyx_Buffer __pyx_pybuffer_m4;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_m5;
  __Pyx_Buffer __pyx_pybuffer_m5;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_m6;
  __Pyx_Buffer __pyx_pybuffer_m6;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_p1;
  __Pyx_Buffer __pyx_pybuffer_p1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_p2;
  __Pyx_Buffer __pyx_pybuffer_p2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_p3;
  __Pyx_Buffer __pyx_pybuffer_p3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point;
  __Pyx_Buffer __pyx_pybuffer_point;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_triangle;
  __Pyx_Buffer __pyx_pybuffer_triangle;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_out_surface", 0);
  __pyx_pybuffer_m1.pybuffer.buf = NULL;
  __pyx_pybuffer_m1.refcount = 0;
  __pyx_pybuffernd_m1.data = NULL;
  __pyx_pybuffernd_m1.rcbuffer = &__pyx_pybuffer_m1;
  __pyx_pybuffer_m2.pybuffer.buf = NULL;
  __pyx_pybuffer_m2.refcount = 0;
  __pyx_pybuffernd_m2.data = NULL;
  __pyx_pybuffernd_m2.rcbuffer = &__pyx_pybuffer_m2;
  __pyx_pybuffer_m3.pybuffer.buf = NULL;
  __pyx_pybuffer_m3.refcount = 0;
  __pyx_pybuffernd_m3.data = NULL;
  __pyx_pybuffernd_m3.rcbuffer = &__pyx_pybuffer_m3;
  __pyx_pybuffer_m4.pybuffer.buf = NULL;
  __pyx_pybuffer_m4.refcount = 0;
  __pyx_pybuffernd_m4.data = NULL;
  __pyx_pybuffernd_m4.rcbuffer = &__pyx_pybuffer_m4;
  __pyx_pybuffer_m5.pybuffer.buf = NULL;
  __pyx_pybuffer_m5.refcount = 0;
  __pyx_pybuffernd_m5.data = NULL;
  __pyx_pybuffernd_m5.rcbuffer = &__pyx_pybuffer_m5;
  __pyx_pybuffer_m6.pybuffer.buf = NULL;
  __pyx_pybuffer_m6.refcount = 0;
  __pyx_pybuffernd_m6.data = NULL;
  __pyx_pybuffernd_m6.rcbuffer = &__pyx_pybuffer_m6;
  __pyx_pybuffer_p1.pybuffer.buf = NULL;
  __pyx_pybuffer_p1.refcount = 0;
  __pyx_pybuffernd_p1.data = NULL;
  __pyx_pybuffernd_p1.rcbuffer = &__pyx_pybuffer_p1;
  __pyx_pybuffer_p2.pybuffer.buf = NULL;
  __pyx_pybuffer_p2.refcount = 0;
  __pyx_pybuffernd_p2.data = NULL;
  __pyx_pybuffernd_p2.rcbuffer = &__pyx_pybuffer_p2;
  __pyx_pybuffer_p3.pybuffer.buf = NULL;
  __pyx_pybuffer_p3.refcount = 0;
  __pyx_pybuffernd_p3.data = NULL;
  __pyx_pybuffernd_p3.rcbuffer = &__pyx_pybuffer_p3;
  __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_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_point.rcbuffer->pybuffer, (PyObject*)__pyx_v_point, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2379, __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_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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2379, __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/mics.pyx":2386
 *     cdef double volume0,volume1
 * 
 *     m1,m2,m3,m4,m5,m6=projection(point[0],point[1],point[2],point[3],point[4],point[5])             # <<<<<<<<<<<<<<
 *     p0=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[0][0],triangle[0][1],triangle[0][2],triangle[0][3],triangle[0][4],triangle[0][5])
 */
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_point), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_point), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_point), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_point), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_point), 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_point), 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_1), ((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, 2386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_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, 2386, __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_1 = 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_1);
    #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_1};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2386, __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, 2386, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2386, __pyx_L1_error)
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2386, __pyx_L1_error)
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2386, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2386, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2386, __pyx_L1_error)
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2386, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m1.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_v_m1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m1.diminfo[0].strides = __pyx_pybuffernd_m1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m1.diminfo[0].shape = __pyx_pybuffernd_m1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_v_m1 = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m2.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_v_m2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m2.diminfo[0].strides = __pyx_pybuffernd_m2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m2.diminfo[0].shape = __pyx_pybuffernd_m2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_v_m2 = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m3.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_v_m3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m3.diminfo[0].strides = __pyx_pybuffernd_m3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m3.diminfo[0].shape = __pyx_pybuffernd_m3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_v_m3 = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m4.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_v_m4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m4.diminfo[0].strides = __pyx_pybuffernd_m4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m4.diminfo[0].shape = __pyx_pybuffernd_m4.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_v_m4 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m5.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_v_m5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m5.diminfo[0].strides = __pyx_pybuffernd_m5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m5.diminfo[0].shape = __pyx_pybuffernd_m5.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_v_m5 = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m6.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_v_m6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m6.diminfo[0].strides = __pyx_pybuffernd_m6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m6.diminfo[0].shape = __pyx_pybuffernd_m6.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2386, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __pyx_v_m6 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2387
 * 
 *     m1,m2,m3,m4,m5,m6=projection(point[0],point[1],point[2],point[3],point[4],point[5])
 *     p0=np.array([m4,m5,m6])             # <<<<<<<<<<<<<<
 *     m1,m2,m3,m4,m5,m6=projection(triangle[0][0],triangle[0][1],triangle[0][2],triangle[0][3],triangle[0][4],triangle[0][5])
 *     p1=np.array([m4,m5,m6])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_m4));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m4));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_m4));
  __Pyx_INCREF(((PyObject *)__pyx_v_m5));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m5));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_m5));
  __Pyx_INCREF(((PyObject *)__pyx_v_m6));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m6));
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_m6));
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_p0 = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2388
 *     m1,m2,m3,m4,m5,m6=projection(point[0],point[1],point[2],point[3],point[4],point[5])
 *     p0=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[0][0],triangle[0][1],triangle[0][2],triangle[0][3],triangle[0][4],triangle[0][5])             # <<<<<<<<<<<<<<
 *     p1=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[1][0],triangle[1][1],triangle[1][2],triangle[1][3],triangle[1][4],triangle[1][5])
 */
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2388, __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, 2388, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2388, __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, 2388, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2388, __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, 2388, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_1), ((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, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_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, 2388, __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_1 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_2 = 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_1);
    __Pyx_INCREF(__pyx_t_2);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_6,&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_1,&__pyx_t_2};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2388, __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, 2388, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2388, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m1.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_v_m1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m1.diminfo[0].strides = __pyx_pybuffernd_m1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m1.diminfo[0].shape = __pyx_pybuffernd_m1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m1, ((PyArrayObject *)__pyx_t_6));
  __pyx_t_6 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m2.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_v_m2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m2.diminfo[0].strides = __pyx_pybuffernd_m2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m2.diminfo[0].shape = __pyx_pybuffernd_m2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m2, ((PyArrayObject *)__pyx_t_5));
  __pyx_t_5 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m3.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_v_m3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m3.diminfo[0].strides = __pyx_pybuffernd_m3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m3.diminfo[0].shape = __pyx_pybuffernd_m3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m3, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m4.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_v_m4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m4.diminfo[0].strides = __pyx_pybuffernd_m4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m4.diminfo[0].shape = __pyx_pybuffernd_m4.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m4, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m5.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_v_m5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m5.diminfo[0].strides = __pyx_pybuffernd_m5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m5.diminfo[0].shape = __pyx_pybuffernd_m5.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m5, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m6.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_v_m6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m6.diminfo[0].strides = __pyx_pybuffernd_m6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m6.diminfo[0].shape = __pyx_pybuffernd_m6.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m6, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2389
 *     p0=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[0][0],triangle[0][1],triangle[0][2],triangle[0][3],triangle[0][4],triangle[0][5])
 *     p1=np.array([m4,m5,m6])             # <<<<<<<<<<<<<<
 *     m1,m2,m3,m4,m5,m6=projection(triangle[1][0],triangle[1][1],triangle[1][2],triangle[1][3],triangle[1][4],triangle[1][5])
 *     p2=np.array([m4,m5,m6])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2389, __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, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_m4));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m4));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_m4));
  __Pyx_INCREF(((PyObject *)__pyx_v_m5));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m5));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_m5));
  __Pyx_INCREF(((PyObject *)__pyx_v_m6));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m6));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_m6));
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_7)) __PYX_ERR(0, 2389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2389, __pyx_L1_error)
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p1.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p1.rcbuffer->pybuffer, (PyObject*)__pyx_v_p1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_p1.diminfo[0].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p1.diminfo[0].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p1.diminfo[1].strides = __pyx_pybuffernd_p1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p1.diminfo[1].shape = __pyx_pybuffernd_p1.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2389, __pyx_L1_error)
  }
  __pyx_t_13 = 0;
  __pyx_v_p1 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2390
 *     m1,m2,m3,m4,m5,m6=projection(triangle[0][0],triangle[0][1],triangle[0][2],triangle[0][3],triangle[0][4],triangle[0][5])
 *     p1=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[1][0],triangle[1][1],triangle[1][2],triangle[1][3],triangle[1][4],triangle[1][5])             # <<<<<<<<<<<<<<
 *     p2=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[2][0],triangle[2][1],triangle[2][2],triangle[2][3],triangle[2][4],triangle[2][5])
 */
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __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, 2390, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2390, __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, 2390, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2390, __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, 2390, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_1), ((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, 2390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_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, 2390, __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_1 = 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_1);
    #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_1};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2390, __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, 2390, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2390, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m1.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_v_m1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m1.diminfo[0].strides = __pyx_pybuffernd_m1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m1.diminfo[0].shape = __pyx_pybuffernd_m1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m1, ((PyArrayObject *)__pyx_t_6));
  __pyx_t_6 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m2.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_v_m2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m2.diminfo[0].strides = __pyx_pybuffernd_m2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m2.diminfo[0].shape = __pyx_pybuffernd_m2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m2, ((PyArrayObject *)__pyx_t_5));
  __pyx_t_5 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m3.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_v_m3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m3.diminfo[0].strides = __pyx_pybuffernd_m3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m3.diminfo[0].shape = __pyx_pybuffernd_m3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m3, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m4.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_v_m4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m4.diminfo[0].strides = __pyx_pybuffernd_m4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m4.diminfo[0].shape = __pyx_pybuffernd_m4.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m4, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m5.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_v_m5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m5.diminfo[0].strides = __pyx_pybuffernd_m5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m5.diminfo[0].shape = __pyx_pybuffernd_m5.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m5, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m6.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_v_m6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m6.diminfo[0].strides = __pyx_pybuffernd_m6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m6.diminfo[0].shape = __pyx_pybuffernd_m6.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2390, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m6, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2391
 *     p1=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[1][0],triangle[1][1],triangle[1][2],triangle[1][3],triangle[1][4],triangle[1][5])
 *     p2=np.array([m4,m5,m6])             # <<<<<<<<<<<<<<
 *     m1,m2,m3,m4,m5,m6=projection(triangle[2][0],triangle[2][1],triangle[2][2],triangle[2][3],triangle[2][4],triangle[2][5])
 *     p3=np.array([m4,m5,m6])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_m4));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m4));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_m4));
  __Pyx_INCREF(((PyObject *)__pyx_v_m5));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m5));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_m5));
  __Pyx_INCREF(((PyObject *)__pyx_v_m6));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m6));
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_m6));
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2391, __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, 2391, __pyx_L1_error)
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p2.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p2.rcbuffer->pybuffer, (PyObject*)__pyx_v_p2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_p2.diminfo[0].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p2.diminfo[0].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p2.diminfo[1].strides = __pyx_pybuffernd_p2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p2.diminfo[1].shape = __pyx_pybuffernd_p2.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2391, __pyx_L1_error)
  }
  __pyx_t_13 = 0;
  __pyx_v_p2 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2392
 *     m1,m2,m3,m4,m5,m6=projection(triangle[1][0],triangle[1][1],triangle[1][2],triangle[1][3],triangle[1][4],triangle[1][5])
 *     p2=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[2][0],triangle[2][1],triangle[2][2],triangle[2][3],triangle[2][4],triangle[2][5])             # <<<<<<<<<<<<<<
 *     p3=np.array([m4,m5,m6])
 *     volume0=triangle_area(p1,p2,p3)
 */
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_7, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2392, __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, 2392, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2392, __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, 2392, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_triangle), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2392, __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, 2392, __pyx_L1_error)
  __pyx_t_7 = __pyx_f_8pyqcstrc_6icosah_5math1_projection(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_1), ((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, 2392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_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, 2392, __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_1 = PyList_GET_ITEM(sequence, 4); 
    __pyx_t_2 = 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_1);
    __Pyx_INCREF(__pyx_t_2);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[6] = {&__pyx_t_6,&__pyx_t_5,&__pyx_t_4,&__pyx_t_3,&__pyx_t_1,&__pyx_t_2};
      for (i=0; i < 6; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2392, __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, 2392, __pyx_L1_error)
  }
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2392, __pyx_L1_error)
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m1.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m1.rcbuffer->pybuffer, (PyObject*)__pyx_v_m1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m1.diminfo[0].strides = __pyx_pybuffernd_m1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m1.diminfo[0].shape = __pyx_pybuffernd_m1.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m1, ((PyArrayObject *)__pyx_t_6));
  __pyx_t_6 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m2.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m2.rcbuffer->pybuffer, (PyObject*)__pyx_v_m2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m2.diminfo[0].strides = __pyx_pybuffernd_m2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m2.diminfo[0].shape = __pyx_pybuffernd_m2.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m2, ((PyArrayObject *)__pyx_t_5));
  __pyx_t_5 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m3.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m3.rcbuffer->pybuffer, (PyObject*)__pyx_v_m3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m3.diminfo[0].strides = __pyx_pybuffernd_m3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m3.diminfo[0].shape = __pyx_pybuffernd_m3.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m3, ((PyArrayObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m4.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m4.rcbuffer->pybuffer, (PyObject*)__pyx_v_m4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m4.diminfo[0].strides = __pyx_pybuffernd_m4.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m4.diminfo[0].shape = __pyx_pybuffernd_m4.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m4, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m5.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m5.rcbuffer->pybuffer, (PyObject*)__pyx_v_m5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_m5.diminfo[0].strides = __pyx_pybuffernd_m5.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m5.diminfo[0].shape = __pyx_pybuffernd_m5.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m5, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m6.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_m6.rcbuffer->pybuffer, (PyObject*)__pyx_v_m6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
      __pyx_t_12 = __pyx_t_11 = __pyx_t_10 = 0;
    }
    __pyx_pybuffernd_m6.diminfo[0].strides = __pyx_pybuffernd_m6.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_m6.diminfo[0].shape = __pyx_pybuffernd_m6.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
  }
  __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_m6, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2393
 *     p2=np.array([m4,m5,m6])
 *     m1,m2,m3,m4,m5,m6=projection(triangle[2][0],triangle[2][1],triangle[2][2],triangle[2][3],triangle[2][4],triangle[2][5])
 *     p3=np.array([m4,m5,m6])             # <<<<<<<<<<<<<<
 *     volume0=triangle_area(p1,p2,p3)
 *     volume1=triangle_area(p0,p2,p3)+triangle_area(p1,p0,p3)+triangle_area(p1,p2,p0)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2393, __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, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_m4));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m4));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_m4));
  __Pyx_INCREF(((PyObject *)__pyx_v_m5));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m5));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_m5));
  __Pyx_INCREF(((PyObject *)__pyx_v_m6));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_m6));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_m6));
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_7)) __PYX_ERR(0, 2393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2393, __pyx_L1_error)
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p3.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_p3.rcbuffer->pybuffer, (PyObject*)__pyx_v_p3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0;
    }
    __pyx_pybuffernd_p3.diminfo[0].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_p3.diminfo[0].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_p3.diminfo[1].strides = __pyx_pybuffernd_p3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_p3.diminfo[1].shape = __pyx_pybuffernd_p3.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2393, __pyx_L1_error)
  }
  __pyx_t_13 = 0;
  __pyx_v_p3 = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2394
 *     m1,m2,m3,m4,m5,m6=projection(triangle[2][0],triangle[2][1],triangle[2][2],triangle[2][3],triangle[2][4],triangle[2][5])
 *     p3=np.array([m4,m5,m6])
 *     volume0=triangle_area(p1,p2,p3)             # <<<<<<<<<<<<<<
 *     volume1=triangle_area(p0,p2,p3)+triangle_area(p1,p0,p3)+triangle_area(p1,p2,p0)
 *     if abs(volume0-volume1)< TOL:
 */
  __pyx_v_volume0 = __pyx_f_8pyqcstrc_6icosah_5math1_triangle_area(((PyArrayObject *)__pyx_v_p1), ((PyArrayObject *)__pyx_v_p2), ((PyArrayObject *)__pyx_v_p3), 0);

  /* "pyqcstrc/icosah/mics.pyx":2395
 *     p3=np.array([m4,m5,m6])
 *     volume0=triangle_area(p1,p2,p3)
 *     volume1=triangle_area(p0,p2,p3)+triangle_area(p1,p0,p3)+triangle_area(p1,p2,p0)             # <<<<<<<<<<<<<<
 *     if abs(volume0-volume1)< TOL:
 *         return 0
 */
  if (!(likely(((__pyx_v_p0) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_p0, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2395, __pyx_L1_error)
  if (!(likely(((__pyx_v_p0) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_p0, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2395, __pyx_L1_error)
  if (!(likely(((__pyx_v_p0) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_p0, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2395, __pyx_L1_error)
  __pyx_v_volume1 = ((__pyx_f_8pyqcstrc_6icosah_5math1_triangle_area(((PyArrayObject *)__pyx_v_p0), ((PyArrayObject *)__pyx_v_p2), ((PyArrayObject *)__pyx_v_p3), 0) + __pyx_f_8pyqcstrc_6icosah_5math1_triangle_area(((PyArrayObject *)__pyx_v_p1), ((PyArrayObject *)__pyx_v_p0), ((PyArrayObject *)__pyx_v_p3), 0)) + __pyx_f_8pyqcstrc_6icosah_5math1_triangle_area(((PyArrayObject *)__pyx_v_p1), ((PyArrayObject *)__pyx_v_p2), ((PyArrayObject *)__pyx_v_p0), 0));

  /* "pyqcstrc/icosah/mics.pyx":2396
 *     volume0=triangle_area(p1,p2,p3)
 *     volume1=triangle_area(p0,p2,p3)+triangle_area(p1,p0,p3)+triangle_area(p1,p2,p0)
 *     if abs(volume0-volume1)< TOL:             # <<<<<<<<<<<<<<
 *         return 0
 *     else:
 */
  __pyx_t_14 = ((fabs((__pyx_v_volume0 - __pyx_v_volume1)) < __pyx_v_8pyqcstrc_6icosah_4mics_TOL) != 0);
  if (__pyx_t_14) {

    /* "pyqcstrc/icosah/mics.pyx":2397
 *     volume1=triangle_area(p0,p2,p3)+triangle_area(p1,p0,p3)+triangle_area(p1,p2,p0)
 *     if abs(volume0-volume1)< TOL:
 *         return 0             # <<<<<<<<<<<<<<
 *     else:
 *         return 1
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":2396
 *     volume0=triangle_area(p1,p2,p3)
 *     volume1=triangle_area(p0,p2,p3)+triangle_area(p1,p0,p3)+triangle_area(p1,p2,p0)
 *     if abs(volume0-volume1)< TOL:             # <<<<<<<<<<<<<<
 *         return 0
 *     else:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2399
 *         return 0
 *     else:
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * cdef int make_tmp_pod(np.ndarray[DTYPE_int_t, ndim=4] pod, int number):
 */
  /*else*/ {
    __pyx_r = 1;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2379
 * 
 * 
 * cdef int on_out_surface(np.ndarray[DTYPE_int_t, ndim=2] point,             # <<<<<<<<<<<<<<
 *                         np.ndarray[DTYPE_int_t, ndim=3] triangle):
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  { 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_m1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m4.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m5.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m6.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangle.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.mics.on_out_surface", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m4.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m5.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_m6.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_p3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_triangle.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_m1);
  __Pyx_XDECREF((PyObject *)__pyx_v_m2);
  __Pyx_XDECREF((PyObject *)__pyx_v_m3);
  __Pyx_XDECREF((PyObject *)__pyx_v_m4);
  __Pyx_XDECREF((PyObject *)__pyx_v_m5);
  __Pyx_XDECREF((PyObject *)__pyx_v_m6);
  __Pyx_XDECREF((PyObject *)__pyx_v_p1);
  __Pyx_XDECREF((PyObject *)__pyx_v_p2);
  __Pyx_XDECREF((PyObject *)__pyx_v_p3);
  __Pyx_XDECREF(__pyx_v_p0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2401
 *         return 1
 * 
 * cdef int make_tmp_pod(np.ndarray[DTYPE_int_t, ndim=4] pod, int number):             # <<<<<<<<<<<<<<
 *     generator_xyz_dim4_tetrahedron(pod,'tmp%d'%(number),0)
 *     return 0
 */

static int __pyx_f_8pyqcstrc_6icosah_4mics_make_tmp_pod(PyArrayObject *__pyx_v_pod, int __pyx_v_number) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pod;
  __Pyx_Buffer __pyx_pybuffer_pod;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("make_tmp_pod", 0);
  __pyx_pybuffer_pod.pybuffer.buf = NULL;
  __pyx_pybuffer_pod.refcount = 0;
  __pyx_pybuffernd_pod.data = NULL;
  __pyx_pybuffernd_pod.rcbuffer = &__pyx_pybuffer_pod;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pod.rcbuffer->pybuffer, (PyObject*)__pyx_v_pod, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2401, __pyx_L1_error)
  }
  __pyx_pybuffernd_pod.diminfo[0].strides = __pyx_pybuffernd_pod.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pod.diminfo[0].shape = __pyx_pybuffernd_pod.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_pod.diminfo[1].strides = __pyx_pybuffernd_pod.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_pod.diminfo[1].shape = __pyx_pybuffernd_pod.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_pod.diminfo[2].strides = __pyx_pybuffernd_pod.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_pod.diminfo[2].shape = __pyx_pybuffernd_pod.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_pod.diminfo[3].strides = __pyx_pybuffernd_pod.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_pod.diminfo[3].shape = __pyx_pybuffernd_pod.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":2402
 * 
 * cdef int make_tmp_pod(np.ndarray[DTYPE_int_t, ndim=4] pod, int number):
 *     generator_xyz_dim4_tetrahedron(pod,'tmp%d'%(number),0)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_tmp_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  (void)(__pyx_f_8pyqcstrc_6icosah_5utils_generator_xyz_dim4_tetrahedron(((PyArrayObject *)__pyx_v_pod), __pyx_t_3, 0, 0));

  /* "pyqcstrc/icosah/mics.pyx":2403
 * cdef int make_tmp_pod(np.ndarray[DTYPE_int_t, ndim=4] pod, int number):
 *     generator_xyz_dim4_tetrahedron(pod,'tmp%d'%(number),0)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray read_tmp_pod(int number):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":2401
 *         return 1
 * 
 * cdef int make_tmp_pod(np.ndarray[DTYPE_int_t, ndim=4] pod, int number):             # <<<<<<<<<<<<<<
 *     generator_xyz_dim4_tetrahedron(pod,'tmp%d'%(number),0)
 *     return 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  { 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_pod.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("pyqcstrc.icosah.mics.make_tmp_pod", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pod.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2405
 *     return 0
 * 
 * cdef np.ndarray read_tmp_pod(int number):             # <<<<<<<<<<<<<<
 *     cdef int a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6
 *     cdef int i,num
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_read_tmp_pod(int __pyx_v_number) {
  int __pyx_v_a1;
  int __pyx_v_b1;
  int __pyx_v_c1;
  int __pyx_v_a2;
  int __pyx_v_b2;
  int __pyx_v_c2;
  int __pyx_v_a3;
  int __pyx_v_b3;
  int __pyx_v_c3;
  int __pyx_v_a4;
  int __pyx_v_b4;
  int __pyx_v_c4;
  int __pyx_v_a5;
  int __pyx_v_b5;
  int __pyx_v_c5;
  int __pyx_v_a6;
  int __pyx_v_b6;
  int __pyx_v_c6;
  int __pyx_v_i;
  int __pyx_v_num;
  PyArrayObject *__pyx_v_tmp1 = 0;
  PyObject *__pyx_v_file_name = NULL;
  PyObject *__pyx_v_f1 = NULL;
  PyObject *__pyx_v_f0 = NULL;
  PyObject *__pyx_v_fi = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1;
  __Pyx_Buffer __pyx_pybuffer_tmp1;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  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;
  PyArrayObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  Py_ssize_t __pyx_t_32;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_tmp_pod", 0);
  __pyx_pybuffer_tmp1.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1.refcount = 0;
  __pyx_pybuffernd_tmp1.data = NULL;
  __pyx_pybuffernd_tmp1.rcbuffer = &__pyx_pybuffer_tmp1;

  /* "pyqcstrc/icosah/mics.pyx":2410
 *     cdef np.ndarray[DTYPE_int_t, ndim=1] tmp1
 * 
 *     file_name='./tmp%d.xyz'%(number)             # <<<<<<<<<<<<<<
 *     f1=read_file(file_name)
 *     f0=f1[0].split()
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_number); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_tmp_d_xyz, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_file_name = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2411
 * 
 *     file_name='./tmp%d.xyz'%(number)
 *     f1=read_file(file_name)             # <<<<<<<<<<<<<<
 *     f0=f1[0].split()
 *     num=int(f0[0])
 */
  __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_v_file_name); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 2411, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_4mics_read_file(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_f1 = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2412
 *     file_name='./tmp%d.xyz'%(number)
 *     f1=read_file(file_name)
 *     f0=f1[0].split()             # <<<<<<<<<<<<<<
 *     num=int(f0[0])
 *     for i in range(2,num+2):
 */
  if (unlikely(__pyx_v_f1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 2412, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_f1, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_f0 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2413
 *     f1=read_file(file_name)
 *     f0=f1[0].split()
 *     num=int(f0[0])             # <<<<<<<<<<<<<<
 *     for i in range(2,num+2):
 *         fi=f1[i]
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_f0, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_num = __pyx_t_5;

  /* "pyqcstrc/icosah/mics.pyx":2414
 *     f0=f1[0].split()
 *     num=int(f0[0])
 *     for i in range(2,num+2):             # <<<<<<<<<<<<<<
 *         fi=f1[i]
 *         fi=fi.split()
 */
  __pyx_t_6 = (__pyx_v_num + 2);
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_5 = 2; __pyx_t_5 < __pyx_t_7; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pyqcstrc/icosah/mics.pyx":2415
 *     num=int(f0[0])
 *     for i in range(2,num+2):
 *         fi=f1[i]             # <<<<<<<<<<<<<<
 *         fi=fi.split()
 *         a1=int(fi[10])
 */
    if (unlikely(__pyx_v_f1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2415, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_f1, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_fi, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2416
 *     for i in range(2,num+2):
 *         fi=f1[i]
 *         fi=fi.split()             # <<<<<<<<<<<<<<
 *         a1=int(fi[10])
 *         b1=int(fi[11])
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fi, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_fi, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2417
 *         fi=f1[i]
 *         fi=fi.split()
 *         a1=int(fi[10])             # <<<<<<<<<<<<<<
 *         b1=int(fi[11])
 *         c1=int(fi[12])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_a1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2418
 *         fi=fi.split()
 *         a1=int(fi[10])
 *         b1=int(fi[11])             # <<<<<<<<<<<<<<
 *         c1=int(fi[12])
 *         a2=int(fi[13])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2418, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_b1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2419
 *         a1=int(fi[10])
 *         b1=int(fi[11])
 *         c1=int(fi[12])             # <<<<<<<<<<<<<<
 *         a2=int(fi[13])
 *         b2=int(fi[14])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2419, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_c1 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2420
 *         b1=int(fi[11])
 *         c1=int(fi[12])
 *         a2=int(fi[13])             # <<<<<<<<<<<<<<
 *         b2=int(fi[14])
 *         c2=int(fi[15])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_a2 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2421
 *         c1=int(fi[12])
 *         a2=int(fi[13])
 *         b2=int(fi[14])             # <<<<<<<<<<<<<<
 *         c2=int(fi[15])
 *         a3=int(fi[16])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_b2 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2422
 *         a2=int(fi[13])
 *         b2=int(fi[14])
 *         c2=int(fi[15])             # <<<<<<<<<<<<<<
 *         a3=int(fi[16])
 *         b3=int(fi[17])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2422, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_c2 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2423
 *         b2=int(fi[14])
 *         c2=int(fi[15])
 *         a3=int(fi[16])             # <<<<<<<<<<<<<<
 *         b3=int(fi[17])
 *         c3=int(fi[18])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2423, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_a3 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2424
 *         c2=int(fi[15])
 *         a3=int(fi[16])
 *         b3=int(fi[17])             # <<<<<<<<<<<<<<
 *         c3=int(fi[18])
 *         a4=int(fi[19])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2424, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_b3 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2425
 *         a3=int(fi[16])
 *         b3=int(fi[17])
 *         c3=int(fi[18])             # <<<<<<<<<<<<<<
 *         a4=int(fi[19])
 *         b4=int(fi[20])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 18, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_c3 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2426
 *         b3=int(fi[17])
 *         c3=int(fi[18])
 *         a4=int(fi[19])             # <<<<<<<<<<<<<<
 *         b4=int(fi[20])
 *         c4=int(fi[21])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 19, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_a4 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2427
 *         c3=int(fi[18])
 *         a4=int(fi[19])
 *         b4=int(fi[20])             # <<<<<<<<<<<<<<
 *         c4=int(fi[21])
 *         a5=int(fi[22])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 20, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_b4 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2428
 *         a4=int(fi[19])
 *         b4=int(fi[20])
 *         c4=int(fi[21])             # <<<<<<<<<<<<<<
 *         a5=int(fi[22])
 *         b5=int(fi[23])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 21, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_c4 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2429
 *         b4=int(fi[20])
 *         c4=int(fi[21])
 *         a5=int(fi[22])             # <<<<<<<<<<<<<<
 *         b5=int(fi[23])
 *         c5=int(fi[24])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 22, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_a5 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2430
 *         c4=int(fi[21])
 *         a5=int(fi[22])
 *         b5=int(fi[23])             # <<<<<<<<<<<<<<
 *         c5=int(fi[24])
 *         a6=int(fi[25])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 23, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2430, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_b5 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2431
 *         a5=int(fi[22])
 *         b5=int(fi[23])
 *         c5=int(fi[24])             # <<<<<<<<<<<<<<
 *         a6=int(fi[25])
 *         b6=int(fi[26])
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 24, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2431, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_c5 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2432
 *         b5=int(fi[23])
 *         c5=int(fi[24])
 *         a6=int(fi[25])             # <<<<<<<<<<<<<<
 *         b6=int(fi[26])
 *         c6=int(fi[27])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 25, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2432, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_a6 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2433
 *         c5=int(fi[24])
 *         a6=int(fi[25])
 *         b6=int(fi[26])             # <<<<<<<<<<<<<<
 *         c6=int(fi[27])
 *         if i==2:
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fi, 26, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_b6 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2434
 *         a6=int(fi[25])
 *         b6=int(fi[26])
 *         c6=int(fi[27])             # <<<<<<<<<<<<<<
 *         if i==2:
 *             tmp1=np.array([a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fi, 27, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_c6 = __pyx_t_8;

    /* "pyqcstrc/icosah/mics.pyx":2435
 *         b6=int(fi[26])
 *         c6=int(fi[27])
 *         if i==2:             # <<<<<<<<<<<<<<
 *             tmp1=np.array([a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])
 *         else:
 */
    __pyx_t_9 = ((__pyx_v_i == 2) != 0);
    if (__pyx_t_9) {

      /* "pyqcstrc/icosah/mics.pyx":2436
 *         c6=int(fi[27])
 *         if i==2:
 *             tmp1=np.array([a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])             # <<<<<<<<<<<<<<
 *         else:
 *             tmp1=np.append(tmp1,[a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2436, __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, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_a1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_b1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_c1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_a2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_b2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_c2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_a3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_b3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_c3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_a4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_v_b4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_20 = __Pyx_PyInt_From_int(__pyx_v_c4); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_21 = __Pyx_PyInt_From_int(__pyx_v_a5); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_b5); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_c5); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_v_a6); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_25 = __Pyx_PyInt_From_int(__pyx_v_b6); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_v_c6); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __pyx_t_27 = PyList_New(18); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 2436, __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_10);
      PyList_SET_ITEM(__pyx_t_27, 1, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_27, 2, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_12);
      PyList_SET_ITEM(__pyx_t_27, 3, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_13);
      PyList_SET_ITEM(__pyx_t_27, 4, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_14);
      PyList_SET_ITEM(__pyx_t_27, 5, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_27, 6, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_16);
      PyList_SET_ITEM(__pyx_t_27, 7, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_17);
      PyList_SET_ITEM(__pyx_t_27, 8, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_18);
      PyList_SET_ITEM(__pyx_t_27, 9, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_19);
      PyList_SET_ITEM(__pyx_t_27, 10, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_27, 11, __pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_21);
      PyList_SET_ITEM(__pyx_t_27, 12, __pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_22);
      PyList_SET_ITEM(__pyx_t_27, 13, __pyx_t_22);
      __Pyx_GIVEREF(__pyx_t_23);
      PyList_SET_ITEM(__pyx_t_27, 14, __pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_24);
      PyList_SET_ITEM(__pyx_t_27, 15, __pyx_t_24);
      __Pyx_GIVEREF(__pyx_t_25);
      PyList_SET_ITEM(__pyx_t_27, 16, __pyx_t_25);
      __Pyx_GIVEREF(__pyx_t_26);
      PyList_SET_ITEM(__pyx_t_27, 17, __pyx_t_26);
      __pyx_t_2 = 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_26 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_26)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_26);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_4 = (__pyx_t_26) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_26, __pyx_t_27) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_27);
      __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
      __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2436, __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, 2436, __pyx_L1_error)
      __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
        __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_8 < 0)) {
          PyErr_Fetch(&__pyx_t_29, &__pyx_t_30, &__pyx_t_31);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_29); Py_XDECREF(__pyx_t_30); Py_XDECREF(__pyx_t_31);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_29, __pyx_t_30, __pyx_t_31);
          }
          __pyx_t_29 = __pyx_t_30 = __pyx_t_31 = 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_8 < 0)) __PYX_ERR(0, 2436, __pyx_L1_error)
      }
      __pyx_t_28 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2435
 *         b6=int(fi[26])
 *         c6=int(fi[27])
 *         if i==2:             # <<<<<<<<<<<<<<
 *             tmp1=np.array([a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])
 *         else:
 */
      goto __pyx_L5;
    }

    /* "pyqcstrc/icosah/mics.pyx":2438
 *             tmp1=np.array([a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])
 *         else:
 *             tmp1=np.append(tmp1,[a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])             # <<<<<<<<<<<<<<
 *     return tmp1.reshape(int(len(tmp1)/72),4,6,3)
 * 
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_27);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_a1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_v_b1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_26);
      __pyx_t_25 = __Pyx_PyInt_From_int(__pyx_v_c1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_25);
      __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_v_a2); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_b2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_23);
      __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_c2); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_21 = __Pyx_PyInt_From_int(__pyx_v_a3); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_20 = __Pyx_PyInt_From_int(__pyx_v_b3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_v_c3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_a4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_b4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_16 = __Pyx_PyInt_From_int(__pyx_v_c4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_a5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_b5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_c5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_a6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_b6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_c6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_2 = PyList_New(18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_26);
      PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_26);
      __Pyx_GIVEREF(__pyx_t_25);
      PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_25);
      __Pyx_GIVEREF(__pyx_t_24);
      PyList_SET_ITEM(__pyx_t_2, 3, __pyx_t_24);
      __Pyx_GIVEREF(__pyx_t_23);
      PyList_SET_ITEM(__pyx_t_2, 4, __pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_22);
      PyList_SET_ITEM(__pyx_t_2, 5, __pyx_t_22);
      __Pyx_GIVEREF(__pyx_t_21);
      PyList_SET_ITEM(__pyx_t_2, 6, __pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_20);
      PyList_SET_ITEM(__pyx_t_2, 7, __pyx_t_20);
      __Pyx_GIVEREF(__pyx_t_19);
      PyList_SET_ITEM(__pyx_t_2, 8, __pyx_t_19);
      __Pyx_GIVEREF(__pyx_t_18);
      PyList_SET_ITEM(__pyx_t_2, 9, __pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_17);
      PyList_SET_ITEM(__pyx_t_2, 10, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_16);
      PyList_SET_ITEM(__pyx_t_2, 11, __pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_2, 12, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_14);
      PyList_SET_ITEM(__pyx_t_2, 13, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_13);
      PyList_SET_ITEM(__pyx_t_2, 14, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_12);
      PyList_SET_ITEM(__pyx_t_2, 15, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_2, 16, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_10);
      PyList_SET_ITEM(__pyx_t_2, 17, __pyx_t_10);
      __pyx_t_1 = 0;
      __pyx_t_26 = 0;
      __pyx_t_25 = 0;
      __pyx_t_24 = 0;
      __pyx_t_23 = 0;
      __pyx_t_22 = 0;
      __pyx_t_21 = 0;
      __pyx_t_20 = 0;
      __pyx_t_19 = 0;
      __pyx_t_18 = 0;
      __pyx_t_17 = 0;
      __pyx_t_16 = 0;
      __pyx_t_15 = 0;
      __pyx_t_14 = 0;
      __pyx_t_13 = 0;
      __pyx_t_12 = 0;
      __pyx_t_11 = 0;
      __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_8 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_27))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_27);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_27, function);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_27)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_tmp1), __pyx_t_2};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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_27)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_tmp1), __pyx_t_2};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1));
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, ((PyObject *)__pyx_v_tmp1));
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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, 2438, __pyx_L1_error)
      __pyx_t_28 = ((PyArrayObject *)__pyx_t_4);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
        __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_t_28, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_8 < 0)) {
          PyErr_Fetch(&__pyx_t_31, &__pyx_t_30, &__pyx_t_29);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_31); Py_XDECREF(__pyx_t_30); Py_XDECREF(__pyx_t_29);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_31, __pyx_t_30, __pyx_t_29);
          }
          __pyx_t_31 = __pyx_t_30 = __pyx_t_29 = 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_8 < 0)) __PYX_ERR(0, 2438, __pyx_L1_error)
      }
      __pyx_t_28 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;
    }
    __pyx_L5:;
  }

  /* "pyqcstrc/icosah/mics.pyx":2439
 *         else:
 *             tmp1=np.append(tmp1,[a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6])
 *     return tmp1.reshape(int(len(tmp1)/72),4,6,3)             # <<<<<<<<<<<<<<
 * 
 * cdef list read_file(char file):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1), __pyx_n_s_reshape); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __pyx_t_32 = PyObject_Length(((PyObject *)__pyx_v_tmp1)); if (unlikely(__pyx_t_32 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2439, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyInt_FromDouble((((double)__pyx_t_32) / 72.0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_27))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_27);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_27);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_27, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_27)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_11, __pyx_int_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_27)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_11, __pyx_int_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_27, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2439, __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_11);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_t_11);
    __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_11 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_27, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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, 2439, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":2405
 *     return 0
 * 
 * cdef np.ndarray read_tmp_pod(int number):             # <<<<<<<<<<<<<<
 *     cdef int a1,b1,c1,a2,b2,c2,a3,b3,c3,a4,b4,c4,a5,b5,c5,a6,b6,c6
 *     cdef int i,num
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_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);
  { 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_tmp1.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.read_tmp_pod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1);
  __Pyx_XDECREF(__pyx_v_file_name);
  __Pyx_XDECREF(__pyx_v_f1);
  __Pyx_XDECREF(__pyx_v_f0);
  __Pyx_XDECREF(__pyx_v_fi);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2441
 *     return tmp1.reshape(int(len(tmp1)/72),4,6,3)
 * 
 * cdef list read_file(char file):             # <<<<<<<<<<<<<<
 *     cdef list line
 *     try:
 */

static PyObject *__pyx_f_8pyqcstrc_6icosah_4mics_read_file(char __pyx_v_file) {
  PyObject *__pyx_v_line = 0;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_file", 0);

  /* "pyqcstrc/icosah/mics.pyx":2443
 * cdef list read_file(char file):
 *     cdef list line
 *     try:             # <<<<<<<<<<<<<<
 *         f=open(file,'r')
 *     except IOError, e:
 */
  {
    __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:*/ {

      /* "pyqcstrc/icosah/mics.pyx":2444
 *     cdef list line
 *     try:
 *         f=open(file,'r')             # <<<<<<<<<<<<<<
 *     except IOError, e:
 *         print(e)
 */
      __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2444, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2444, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
      __Pyx_INCREF(__pyx_n_u_r);
      __Pyx_GIVEREF(__pyx_n_u_r);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_r);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2444, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_f = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2443
 * cdef list read_file(char file):
 *     cdef list line
 *     try:             # <<<<<<<<<<<<<<
 *         f=open(file,'r')
 *     except IOError, e:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2445
 *     try:
 *         f=open(file,'r')
 *     except IOError, e:             # <<<<<<<<<<<<<<
 *         print(e)
 *         sys.exit(0)
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IOError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pyqcstrc.icosah.mics.read_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 2445, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "pyqcstrc/icosah/mics.pyx":2446
 *         f=open(file,'r')
 *     except IOError, e:
 *         print(e)             # <<<<<<<<<<<<<<
 *         sys.exit(0)
 *     line=[]
 */
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2446, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2447
 *     except IOError, e:
 *         print(e)
 *         sys.exit(0)             # <<<<<<<<<<<<<<
 *     line=[]
 *     while 1:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2447, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2447, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_int_0);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2447, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyqcstrc/icosah/mics.pyx":2443
 * cdef list read_file(char file):
 *     cdef list line
 *     try:             # <<<<<<<<<<<<<<
 *         f=open(file,'r')
 *     except IOError, e:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "pyqcstrc/icosah/mics.pyx":2448
 *         print(e)
 *         sys.exit(0)
 *     line=[]             # <<<<<<<<<<<<<<
 *     while 1:
 *         a=f.readline()
 */
  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_line = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2449
 *         sys.exit(0)
 *     line=[]
 *     while 1:             # <<<<<<<<<<<<<<
 *         a=f.readline()
 *         if not a:
 */
  while (1) {

    /* "pyqcstrc/icosah/mics.pyx":2450
 *     line=[]
 *     while 1:
 *         a=f.readline()             # <<<<<<<<<<<<<<
 *         if not a:
 *             break
 */
    if (unlikely(!__pyx_v_f)) { __Pyx_RaiseUnboundLocalError("f"); __PYX_ERR(0, 2450, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_readline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2450, __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_7 = (__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_7)) __PYX_ERR(0, 2450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2451
 *     while 1:
 *         a=f.readline()
 *         if not a:             # <<<<<<<<<<<<<<
 *             break
 *         line.append(a[:-1])
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_a); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2451, __pyx_L1_error)
    __pyx_t_12 = ((!__pyx_t_11) != 0);
    if (__pyx_t_12) {

      /* "pyqcstrc/icosah/mics.pyx":2452
 *         a=f.readline()
 *         if not a:
 *             break             # <<<<<<<<<<<<<<
 *         line.append(a[:-1])
 *     return line
 */
      goto __pyx_L12_break;

      /* "pyqcstrc/icosah/mics.pyx":2451
 *     while 1:
 *         a=f.readline()
 *         if not a:             # <<<<<<<<<<<<<<
 *             break
 *         line.append(a[:-1])
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":2453
 *         if not a:
 *             break
 *         line.append(a[:-1])             # <<<<<<<<<<<<<<
 *     return line
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_a, 0, -1L, NULL, NULL, &__pyx_slice__82, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_line, __pyx_t_7); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2453, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_L12_break:;

  /* "pyqcstrc/icosah/mics.pyx":2454
 *             break
 *         line.append(a[:-1])
 *     return line             # <<<<<<<<<<<<<<
 * 
 *     ######################################################################################################
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_line);
  __pyx_r = __pyx_v_line;
  goto __pyx_L0;

  /* "pyqcstrc/icosah/mics.pyx":2441
 *     return tmp1.reshape(int(len(tmp1)/72),4,6,3)
 * 
 * cdef list read_file(char file):             # <<<<<<<<<<<<<<
 *     cdef list line
 *     try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.read_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2465
 * 
 * 
 * cpdef np.ndarray object_subtraction_2(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_13object_subtraction_2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i5;
  int __pyx_v_flag1;
  int __pyx_v_counter2;
  long __pyx_v_v01;
  long __pyx_v_v02;
  long __pyx_v_v03;
  float __pyx_v_vol;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp2c = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_obj2_surface = 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_obj2_surface;
  __Pyx_Buffer __pyx_pybuffer_obj2_surface;
  __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_tmp2c;
  __Pyx_Buffer __pyx_pybuffer_tmp2c;
  __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;
  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;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyArrayObject *__pyx_t_22 = NULL;
  long __pyx_t_23;
  long __pyx_t_24;
  long __pyx_t_25;
  __pyx_t_5numpy_float64_t __pyx_t_26;
  Py_UCS4 __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction_2", 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_tmp2c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2c.refcount = 0;
  __pyx_pybuffernd_tmp2c.data = NULL;
  __pyx_pybuffernd_tmp2c.rcbuffer = &__pyx_pybuffer_tmp2c;
  __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_obj2_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_surface.refcount = 0;
  __pyx_pybuffernd_obj2_surface.data = NULL;
  __pyx_pybuffernd_obj2_surface.rcbuffer = &__pyx_pybuffer_obj2_surface;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2465, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2465, __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/mics.pyx":2481
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] obj2_surface
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('    object_subtraction_2()')
 *     #if verbose==1:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2482
 * 
 *     if verbose>0:
 *         print('    object_subtraction_2()')             # <<<<<<<<<<<<<<
 *     #if verbose==1:
 *     #    print '  get A not B = A not (A and B)'
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2481
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] obj2_surface
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('    object_subtraction_2()')
 *     #if verbose==1:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2491
 * 
 *     #
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     if obj2.tolist()!=[[[[0]]]]:
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2491, __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, 2491, __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, 2491, __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, 2491, __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, 2491, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 2491, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2492
 *     #
 *     tmp1a=np.array([0])
 *     if obj2.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 * 
 *         # get surfaces of onj2
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj2), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2492, __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, 2492, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2496
 *         # get surfaces of onj2
 *         #obj2_surface=generator_surface(obj2,verbose-1)
 *         obj2_surface=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 *         #
 *         tmp3a=obj2_surface.reshape(len(obj2_surface)*3,6,3)
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2_surface.diminfo[0].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_surface.diminfo[0].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_surface.diminfo[1].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_surface.diminfo[1].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_surface.diminfo[2].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_surface.diminfo[2].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_surface.diminfo[3].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_surface.diminfo[3].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[3];
      if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2496, __pyx_L1_error)
    }
    __pyx_v_obj2_surface = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2498
 *         obj2_surface=generator_surface_1(obj2,verbose-1)
 *         #
 *         tmp3a=obj2_surface.reshape(len(obj2_surface)*3,6,3)             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj2_surface), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj2_surface)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2498, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_11 * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2498, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2498, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_7, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2498, __pyx_L1_error)
    __pyx_t_13 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 2498, __pyx_L1_error)
    }
    __pyx_t_13 = 0;
    __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2499
 *         #
 *         tmp3a=obj2_surface.reshape(len(obj2_surface)*3,6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 * 
 *         for i1 in range(len(obj1)):
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 2499, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2501
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 *         for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *             tmp1b=np.array([0])
 *             for i2 in range(len(tmp3a)):
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2501, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_14; __pyx_t_7+=1) {
      __pyx_v_i1 = __pyx_t_7;

      /* "pyqcstrc/icosah/mics.pyx":2502
 * 
 *         for i1 in range(len(obj1)):
 *             tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *             for i2 in range(len(tmp3a)):
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2502, __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 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __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_4)) __PYX_ERR(0, 2502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2502, __pyx_L1_error)
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
        __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 2502, __pyx_L1_error)
      }
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2503
 *         for i1 in range(len(obj1)):
 *             tmp1b=np.array([0])
 *             for i2 in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                 if flag1==0: # inside
 */
      __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2503, __pyx_L1_error)
      __pyx_t_17 = __pyx_t_16;
      for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_17; __pyx_t_15+=1) {
        __pyx_v_i2 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":2504
 *             tmp1b=np.array([0])
 *             for i2 in range(len(tmp3a)):
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])             # <<<<<<<<<<<<<<
 *                 if flag1==0: # inside
 *                     if len(tmp1b)==1:
 */
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2504, __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, 2504, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2504, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2504, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_12, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2504, __pyx_L1_error)
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_12, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2504, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2504, __pyx_L1_error)
        __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_18), 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2505
 *             for i2 in range(len(tmp3a)):
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                 if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                     if len(tmp1b)==1:
 *                         tmp1b=tmp3a[i2].reshape(18)
 */
        __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2506
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                 if flag1==0: # inside
 *                     if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                         tmp1b=tmp3a[i2].reshape(18)
 *                     else:
 */
          __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2506, __pyx_L1_error)
          __pyx_t_1 = ((__pyx_t_19 == 1) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":2507
 *                 if flag1==0: # inside
 *                     if len(tmp1b)==1:
 *                         tmp1b=tmp3a[i2].reshape(18)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp3a[i2])
 */
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2507, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2507, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __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_18 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_18);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2507, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2507, __pyx_L1_error)
            __pyx_t_6 = ((PyArrayObject *)__pyx_t_18);
            {
              __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_20 < 0)) {
                PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 2507, __pyx_L1_error)
            }
            __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_18));
            __pyx_t_18 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2506
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                 if flag1==0: # inside
 *                     if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                         tmp1b=tmp3a[i2].reshape(18)
 *                     else:
 */
            goto __pyx_L10;
          }

          /* "pyqcstrc/icosah/mics.pyx":2509
 *                         tmp1b=tmp3a[i2].reshape(18)
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp3a[i2])             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2509, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2509, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2509, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = NULL;
            __pyx_t_20 = 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_20 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), __pyx_t_2};
              __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2509, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_GOTREF(__pyx_t_18);
              __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[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), __pyx_t_2};
              __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2509, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            } else
            #endif
            {
              __pyx_t_4 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2509, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (__pyx_t_3) {
                __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 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_4, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1b));
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_20, __pyx_t_2);
              __pyx_t_2 = 0;
              __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2509, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2509, __pyx_L1_error)
            __pyx_t_6 = ((PyArrayObject *)__pyx_t_18);
            {
              __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_20 < 0)) {
                PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 2509, __pyx_L1_error)
            }
            __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_18));
            __pyx_t_18 = 0;
          }
          __pyx_L10:;

          /* "pyqcstrc/icosah/mics.pyx":2505
 *             for i2 in range(len(tmp3a)):
 *                 flag1=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                 if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                     if len(tmp1b)==1:
 *                         tmp1b=tmp3a[i2].reshape(18)
 */
          goto __pyx_L9;
        }

        /* "pyqcstrc/icosah/mics.pyx":2511
 *                         tmp1b=np.append(tmp1b,tmp3a[i2])
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if len(tmp1b)!=1:
 *                 # Tetrahedralization
 */
        /*else*/ {
        }
        __pyx_L9:;
      }

      /* "pyqcstrc/icosah/mics.pyx":2512
 *                 else:
 *                     pass
 *             if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *                 # Tetrahedralization
 *                 tmp4a=tetrahedralization(obj1[i1],tmp1b.reshape(int(len(tmp1b)/18),6,3),verbose-1)
 */
      __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2512, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_16 != 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2514
 *             if len(tmp1b)!=1:
 *                 # Tetrahedralization
 *                 tmp4a=tetrahedralization(obj1[i1],tmp1b.reshape(int(len(tmp1b)/18),6,3),verbose-1)             # <<<<<<<<<<<<<<
 *                 for i3 in range(len(tmp4a)):
 *                     #"""
 */
        __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2514, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2514, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_16) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_15 = 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_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2514, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
          PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_int_6, __pyx_int_3};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2514, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_3) {
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_15, __pyx_t_2);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_15, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_15, __pyx_int_3);
          __pyx_t_2 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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, 2514, __pyx_L1_error)
        __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization(((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_5), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 2514, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2515
 *                 # Tetrahedralization
 *                 tmp4a=tetrahedralization(obj1[i1],tmp1b.reshape(int(len(tmp1b)/18),6,3),verbose-1)
 *                 for i3 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                     #"""
 *                     ### Algorithm 1 ###
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2515, __pyx_L1_error)
        __pyx_t_17 = __pyx_t_16;
        for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_17; __pyx_t_15+=1) {
          __pyx_v_i3 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":2519
 *                     ### Algorithm 1 ###
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2c=centroid(tmp4a[i3])             # <<<<<<<<<<<<<<
 *                     counter2=0
 *                     for i5 in range(len(obj2)):
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2519, __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, 2519, __pyx_L1_error)
          __pyx_t_5 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_4), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2519, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer);
            __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_5), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
            if (unlikely(__pyx_t_20 < 0)) {
              PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp2c.diminfo[0].strides = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2c.diminfo[0].shape = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2c.diminfo[1].strides = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2c.diminfo[1].shape = __pyx_pybuffernd_tmp2c.rcbuffer->pybuffer.shape[1];
            if (unlikely(__pyx_t_20 < 0)) __PYX_ERR(0, 2519, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp2c, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2520
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2c=centroid(tmp4a[i3])
 *                     counter2=0             # <<<<<<<<<<<<<<
 *                     for i5 in range(len(obj2)):
 *                         # check tmp2c is out of obj2 or not
 */
          __pyx_v_counter2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2521
 *                     tmp2c=centroid(tmp4a[i3])
 *                     counter2=0
 *                     for i5 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                         # check tmp2c is out of obj2 or not
 *                         flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 */
          __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2521, __pyx_L1_error)
          __pyx_t_21 = __pyx_t_19;
          for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_21; __pyx_t_20+=1) {
            __pyx_v_i5 = __pyx_t_20;

            /* "pyqcstrc/icosah/mics.pyx":2523
 *                     for i5 in range(len(obj2)):
 *                         # check tmp2c is out of obj2 or not
 *                         flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])             # <<<<<<<<<<<<<<
 *                         if flag1==0: # inside
 *                             counter2+=1
 */
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2523, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2523, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2523, __pyx_L1_error)
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2523, __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, 2523, __pyx_L1_error)
            __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2c), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_2), 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2524
 *                         # check tmp2c is out of obj2 or not
 *                         flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                         if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                             counter2+=1
 *                             break
 */
            __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":2525
 *                         flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                         if flag1==0: # inside
 *                             counter2+=1             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_v_counter2 = (__pyx_v_counter2 + 1);

              /* "pyqcstrc/icosah/mics.pyx":2526
 *                         if flag1==0: # inside
 *                             counter2+=1
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L15_break;

              /* "pyqcstrc/icosah/mics.pyx":2524
 *                         # check tmp2c is out of obj2 or not
 *                         flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                         if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                             counter2+=1
 *                             break
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":2528
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter2==0:
 *                         if len(tmp1a)==1:
 */
            /*else*/ {
            }
          }
          __pyx_L15_break:;

          /* "pyqcstrc/icosah/mics.pyx":2529
 *                         else:
 *                             pass
 *                     if counter2==0:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4a[i3].reshape(72)
 */
          __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":2530
 *                             pass
 *                     if counter2==0:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a[i3].reshape(72)
 *                         else:
 */
            __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2530, __pyx_L1_error)
            __pyx_t_1 = ((__pyx_t_19 == 1) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":2531
 *                     if counter2==0:
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4a[i3].reshape(72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i3])
 */
              __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2531, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_reshape); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2531, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_18);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_18, function);
                }
              }
              __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_18, __pyx_t_12, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2531, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2531, __pyx_L1_error)
              __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_20 < 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_4mics_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_20 < 0)) __PYX_ERR(0, 2531, __pyx_L1_error)
              }
              __pyx_t_6 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2530
 *                             pass
 *                     if counter2==0:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a[i3].reshape(72)
 *                         else:
 */
              goto __pyx_L18;
            }

            /* "pyqcstrc/icosah/mics.pyx":2533
 *                             tmp1a=tmp4a[i3].reshape(72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i3])             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2533, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2533, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2533, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __pyx_t_4 = NULL;
              __pyx_t_20 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_20 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_18};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_tmp1a), __pyx_t_18};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 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_5, 0+__pyx_t_20, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_18);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_20, __pyx_t_18);
                __pyx_t_18 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2533, __pyx_L1_error)
              __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_20 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_20 < 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_4mics_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_20 < 0)) __PYX_ERR(0, 2533, __pyx_L1_error)
              }
              __pyx_t_6 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L18:;

            /* "pyqcstrc/icosah/mics.pyx":2529
 *                         else:
 *                             pass
 *                     if counter2==0:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4a[i3].reshape(72)
 */
            goto __pyx_L17;
          }

          /* "pyqcstrc/icosah/mics.pyx":2535
 *                             tmp1a=np.append(tmp1a,tmp4a[i3])
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                     #"""
 *                     """
 */
          /*else*/ {
          }
          __pyx_L17:;
        }

        /* "pyqcstrc/icosah/mics.pyx":2512
 *                 else:
 *                     pass
 *             if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *                 # Tetrahedralization
 *                 tmp4a=tetrahedralization(obj1[i1],tmp1b.reshape(int(len(tmp1b)/18),6,3),verbose-1)
 */
        goto __pyx_L11;
      }

      /* "pyqcstrc/icosah/mics.pyx":2574
 *                     """
 *             else:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1].reshape(72)
 *                 else:
 */
      /*else*/ {
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2574, __pyx_L1_error)
        __pyx_t_1 = ((__pyx_t_16 == 1) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2575
 *             else:
 *                 if len(tmp1a)==1:
 *                     tmp1a=obj1[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])
 */
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_12, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2575, __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, 2575, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2575, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2574
 *                     """
 *             else:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1].reshape(72)
 *                 else:
 */
          goto __pyx_L19;
        }

        /* "pyqcstrc/icosah/mics.pyx":2577
 *                     tmp1a=obj1[i1].reshape(72)
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])             # <<<<<<<<<<<<<<
 *         if len(tmp1a)!=1:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2577, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2577, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2577, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_18 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_18)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_18);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[3] = {__pyx_t_18, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2577, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 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_12)) {
            PyObject *__pyx_temp[3] = {__pyx_t_18, ((PyObject *)__pyx_v_tmp1a), __pyx_t_5};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2577, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_18) {
              __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_18); __pyx_t_18 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_15, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2577, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2577, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2577, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L19:;
      }
      __pyx_L11:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2578
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             if verbose>0:
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2578, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_11 != 1) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2579
 *                     tmp1a=np.append(tmp1a,obj1[i1])
 *         if len(tmp1a)!=1:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 v01,v02,v03=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, 2579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2579, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2579, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_12)) {
        PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2579, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_18 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_7, __pyx_t_4);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_7, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_7, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_18, 3+__pyx_t_7, __pyx_int_3);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2579, __pyx_L1_error)
      __pyx_t_22 = ((PyArrayObject *)__pyx_t_2);
      {
        __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_22, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 2579, __pyx_L1_error)
      }
      __pyx_t_22 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2580
 *         if len(tmp1a)!=1:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 v01,v02,v03=obj_volume_6d(tmp4a)
 *                 vol=(v01+v02*TAU)/v03
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2581
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             if verbose>0:
 *                 v01,v02,v03=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *                 vol=(v01+v02*TAU)/v03
 *                 print('      obj1 NOT obj2, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 */
        __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2581, __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, 2581, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_18 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2581, __pyx_L1_error)
        }
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_12); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2581, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_18); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2581, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_4); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2581, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_v01 = __pyx_t_23;
        __pyx_v_v02 = __pyx_t_24;
        __pyx_v_v03 = __pyx_t_25;

        /* "pyqcstrc/icosah/mics.pyx":2582
 *             if verbose>0:
 *                 v01,v02,v03=obj_volume_6d(tmp4a)
 *                 vol=(v01+v02*TAU)/v03             # <<<<<<<<<<<<<<
 *                 print('      obj1 NOT obj2, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 *             else:
 */
        __pyx_t_26 = (__pyx_v_v01 + (__pyx_v_v02 * __pyx_v_8pyqcstrc_6icosah_4mics_TAU));
        if (unlikely(__pyx_v_v03 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 2582, __pyx_L1_error)
        }
        __pyx_v_vol = (__pyx_t_26 / ((__pyx_t_5numpy_float64_t)__pyx_v_v03));

        /* "pyqcstrc/icosah/mics.pyx":2583
 *                 v01,v02,v03=obj_volume_6d(tmp4a)
 *                 vol=(v01+v02*TAU)/v03
 *                 print('      obj1 NOT obj2, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = 0;
        __pyx_t_27 = 127;
        __Pyx_INCREF(__pyx_kp_u_obj1_NOT_obj2_volume);
        __pyx_t_11 += 30;
        __Pyx_GIVEREF(__pyx_kp_u_obj1_NOT_obj2_volume);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_obj1_NOT_obj2_volume);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v01, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 += __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__17);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v02, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 += __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__17);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_v03, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 += __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__18);
        __pyx_t_11 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
        __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_18 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_kp_u_10_6f); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_27 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_27) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_27;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_18);
        __pyx_t_18 = 0;
        __Pyx_INCREF(__pyx_kp_u__19);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_11, __pyx_t_27); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2580
 *         if len(tmp1a)!=1:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 v01,v02,v03=obj_volume_6d(tmp4a)
 *                 vol=(v01+v02*TAU)/v03
 */
        goto __pyx_L21;
      }

      /* "pyqcstrc/icosah/mics.pyx":2585
 *                 print('      obj1 NOT obj2, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
      /*else*/ {
      }
      __pyx_L21:;

      /* "pyqcstrc/icosah/mics.pyx":2586
 *             else:
 *                 pass
 *             return tmp4a             # <<<<<<<<<<<<<<
 *         else:
 *             #return tmp1a.reshape(1,1,1,1)
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp4a));
      __pyx_r = ((PyArrayObject *)__pyx_v_tmp4a);
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":2578
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             if verbose>0:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":2589
 *         else:
 *             #return tmp1a.reshape(1,1,1,1)
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return obj1
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_18, 0, __pyx_int_0);
      __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_18);
      PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_18);
      __pyx_t_18 = 0;
      __pyx_t_18 = PyList_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_12);
      PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_18);
      PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_18);
      __pyx_t_18 = 0;
      __pyx_t_18 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_2 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_18, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2589, __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, 2589, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":2492
 *     #
 *     tmp1a=np.array([0])
 *     if obj2.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 * 
 *         # get surfaces of onj2
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2591
 *             return np.array([[[[0]]]])
 *     else:
 *         return obj1             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray object_subtraction(np.ndarray[DTYPE_int_t, ndim=4] obj1,
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj1));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj1);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2465
 * 
 * 
 * cpdef np.ndarray object_subtraction_2(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_12);
  __Pyx_XDECREF(__pyx_t_18);
  { 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_obj2_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2c.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.mics.object_subtraction_2", __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_obj2_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2c.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_tmp2c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj2_surface);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_13object_subtraction_2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_13object_subtraction_2(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("object_subtraction_2 (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("object_subtraction_2", 1, 3, 3, 1); __PYX_ERR(0, 2465, __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("object_subtraction_2", 1, 3, 3, 2); __PYX_ERR(0, 2465, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction_2") < 0)) __PYX_ERR(0, 2465, __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, 2467, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction_2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2465, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_2", __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, 2465, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 2466, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_12object_subtraction_2(__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_4mics_12object_subtraction_2(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("object_subtraction_2", 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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2465, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2465, __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_4mics_object_subtraction_2(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __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.mics.object_subtraction_2", __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/mics.pyx":2593
 *         return obj1
 * 
 * cpdef np.ndarray object_subtraction(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                     int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_15object_subtraction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_num;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  int __pyx_v_counter4;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_tmp1d = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  CYTHON_UNUSED PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_tmp4c = 0;
  PyArrayObject *__pyx_v_tmp4d = 0;
  PyObject *__pyx_v_indx1 = 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_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_tmp1d;
  __Pyx_Buffer __pyx_pybuffer_tmp1d;
  __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_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4c;
  __Pyx_Buffer __pyx_pybuffer_tmp4c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4d;
  __Pyx_Buffer __pyx_pybuffer_tmp4d;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  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;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *(*__pyx_t_17)(PyObject *);
  PyArrayObject *__pyx_t_18 = NULL;
  PyArrayObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction", 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_tmp1d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1d.refcount = 0;
  __pyx_pybuffernd_tmp1d.data = NULL;
  __pyx_pybuffernd_tmp1d.rcbuffer = &__pyx_pybuffer_tmp1d;
  __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_tmp4b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4b.refcount = 0;
  __pyx_pybuffernd_tmp4b.data = NULL;
  __pyx_pybuffernd_tmp4b.rcbuffer = &__pyx_pybuffer_tmp4b;
  __pyx_pybuffer_tmp4c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4c.refcount = 0;
  __pyx_pybuffernd_tmp4c.data = NULL;
  __pyx_pybuffernd_tmp4c.rcbuffer = &__pyx_pybuffer_tmp4c;
  __pyx_pybuffer_tmp4d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4d.refcount = 0;
  __pyx_pybuffernd_tmp4d.data = NULL;
  __pyx_pybuffernd_tmp4d.rcbuffer = &__pyx_pybuffer_tmp4d;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2593, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2593, __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/mics.pyx":2603
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a,tmp4b,tmp4c,tmp4d
 *     cdef list indx1
 *     counter2=0             # <<<<<<<<<<<<<<
 *     counter3=0
 *     counter4=0
 */
  __pyx_v_counter2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2604
 *     cdef list indx1
 *     counter2=0
 *     counter3=0             # <<<<<<<<<<<<<<
 *     counter4=0
 * 
 */
  __pyx_v_counter3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2605
 *     counter2=0
 *     counter3=0
 *     counter4=0             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  __pyx_v_counter4 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2607
 *     counter4=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       Object_subtraction()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

    /* "pyqcstrc/icosah/mics.pyx":2607
 *     counter4=0
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       Object_subtraction()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":2610
 *         print('       Object_subtraction()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1)):
 *         counter1=0
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":2611
 *     else:
 *         pass
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *         counter1=0
 *         indx1=[]
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2611, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i1 = __pyx_t_5;

    /* "pyqcstrc/icosah/mics.pyx":2612
 *         pass
 *     for i1 in range(len(obj1)):
 *         counter1=0             # <<<<<<<<<<<<<<
 *         indx1=[]
 *         tmp3a=obj1[i1]
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2613
 *     for i1 in range(len(obj1)):
 *         counter1=0
 *         indx1=[]             # <<<<<<<<<<<<<<
 *         tmp3a=obj1[i1]
 *         #####
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_indx1, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2614
 *         counter1=0
 *         indx1=[]
 *         tmp3a=obj1[i1]             # <<<<<<<<<<<<<<
 *         #####
 *         for i2 in range(len(obj2)):
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2614, __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, 2614, __pyx_L1_error)
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 2614, __pyx_L1_error)
    }
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2616
 *         tmp3a=obj1[i1]
 *         #####
 *         for i2 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *             tmp3b=obj2[i2]
 *             #print 'hallo1'
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2616, __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_i2 = __pyx_t_7;

      /* "pyqcstrc/icosah/mics.pyx":2617
 *         #####
 *         for i2 in range(len(obj2)):
 *             tmp3b=obj2[i2]             # <<<<<<<<<<<<<<
 *             #print 'hallo1'
 *             tmp4a,tmp4b=intersection_two_tetrahedron_4(tmp3a,tmp3b,verbose-1) # two objects after tetrahedralization
 */
      __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, 2617, __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, 2617, __pyx_L1_error)
      __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_13 < 0)) __PYX_ERR(0, 2617, __pyx_L1_error)
      }
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2619
 *             tmp3b=obj2[i2]
 *             #print 'hallo1'
 *             tmp4a,tmp4b=intersection_two_tetrahedron_4(tmp3a,tmp3b,verbose-1) # two objects after tetrahedralization             # <<<<<<<<<<<<<<
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter3==0:
 */
      __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_v_tmp3a), ((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2619, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_15);
        #else
        __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_16 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_17 = Py_TYPE(__pyx_t_16)->tp_iternext;
        index = 0; __pyx_t_14 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_14)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_14);
        index = 1; __pyx_t_15 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_15);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 2) < 0) __PYX_ERR(0, 2619, __pyx_L1_error)
        __pyx_t_17 = NULL;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_17 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2619, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2619, __pyx_L1_error)
      if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2619, __pyx_L1_error)
      __pyx_t_18 = ((PyArrayObject *)__pyx_t_14);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2619, __pyx_L1_error)
      }
      __pyx_t_18 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_14));
      __pyx_t_14 = 0;
      __pyx_t_18 = ((PyArrayObject *)__pyx_t_15);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
        __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_13 < 0)) __PYX_ERR(0, 2619, __pyx_L1_error)
      }
      __pyx_t_18 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_15));
      __pyx_t_15 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2620
 *             #print 'hallo1'
 *             tmp4a,tmp4b=intersection_two_tetrahedron_4(tmp3a,tmp3b,verbose-1) # two objects after tetrahedralization
 *             if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 if counter3==0:
 *                     tmp1a=tmp3a.reshape(72) # 4*6*3=72
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_14 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
        }
      }
      __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2620, __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_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_14);
      PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
      __pyx_t_14 = 0;
      __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyObject_RichCompare(__pyx_t_2, __pyx_t_14, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2620, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2621
 *             tmp4a,tmp4b=intersection_two_tetrahedron_4(tmp3a,tmp3b,verbose-1) # two objects after tetrahedralization
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter3==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3a.reshape(72) # 4*6*3=72
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2622
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter3==0:
 *                     tmp1a=tmp3a.reshape(72) # 4*6*3=72             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a)
 */
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2622, __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_15 = (__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_15)) __PYX_ERR(0, 2622, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2622, __pyx_L1_error)
          __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
          {
            __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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2622, __pyx_L1_error)
          }
          __pyx_t_19 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_15));
          __pyx_t_15 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2621
 *             tmp4a,tmp4b=intersection_two_tetrahedron_4(tmp3a,tmp3b,verbose-1) # two objects after tetrahedralization
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 if counter3==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3a.reshape(72) # 4*6*3=72
 *                 else:
 */
          goto __pyx_L11;
        }

        /* "pyqcstrc/icosah/mics.pyx":2624
 *                     tmp1a=tmp3a.reshape(72) # 4*6*3=72
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a)             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 indx1.append(i2)
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2624, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = NULL;
          __pyx_t_13 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
            __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2624, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_15);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
            __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2624, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_15);
          } else
          #endif
          {
            __pyx_t_16 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2624, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            if (__pyx_t_14) {
              __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
            PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp3a));
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2624, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2624, __pyx_L1_error)
          __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
          {
            __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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2624, __pyx_L1_error)
          }
          __pyx_t_19 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_15));
          __pyx_t_15 = 0;
        }
        __pyx_L11:;

        /* "pyqcstrc/icosah/mics.pyx":2625
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a)
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *                 indx1.append(i2)
 *             else:
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":2626
 *                     tmp1a=np.append(tmp1a,tmp3a)
 *                 counter1+=1
 *                 indx1.append(i2)             # <<<<<<<<<<<<<<
 *             else:
 *                 counter1+=0
 */
        __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_i2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_indx1, __pyx_t_15); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2626, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2620
 *             #print 'hallo1'
 *             tmp4a,tmp4b=intersection_two_tetrahedron_4(tmp3a,tmp3b,verbose-1) # two objects after tetrahedralization
 *             if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 if counter3==0:
 *                     tmp1a=tmp3a.reshape(72) # 4*6*3=72
 */
        goto __pyx_L10;
      }

      /* "pyqcstrc/icosah/mics.pyx":2628
 *                 indx1.append(i2)
 *             else:
 *                 counter1+=0             # <<<<<<<<<<<<<<
 *         ######
 *         # tmp1c: set of tetrahedra in obj1 that are outseide of obj2
 */
      /*else*/ {
        __pyx_v_counter1 = (__pyx_v_counter1 + 0);
      }
      __pyx_L10:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2632
 *         # tmp1c: set of tetrahedra in obj1 that are outseide of obj2
 *         #print 'hallo2'
 *         if counter1==0: # i1-th tetrahedron of obj1 is outside of obj2             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1c=tmp3a.reshape(72) # 72=4*6*3
 */
    __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2633
 *         #print 'hallo2'
 *         if counter1==0: # i1-th tetrahedron of obj1 is outside of obj2
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1c=tmp3a.reshape(72) # 72=4*6*3
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2634
 *         if counter1==0: # i1-th tetrahedron of obj1 is outside of obj2
 *             if counter2==0:
 *                 tmp1c=tmp3a.reshape(72) # 72=4*6*3             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1c=np.append(tmp1c,tmp3a)
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2634, __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_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_16, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_72);
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2634, __pyx_L1_error)
        __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
        {
          __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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2634, __pyx_L1_error)
        }
        __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_15));
        __pyx_t_15 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2633
 *         #print 'hallo2'
 *         if counter1==0: # i1-th tetrahedron of obj1 is outside of obj2
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1c=tmp3a.reshape(72) # 72=4*6*3
 *             else:
 */
        goto __pyx_L13;
      }

      /* "pyqcstrc/icosah/mics.pyx":2636
 *                 tmp1c=tmp3a.reshape(72) # 72=4*6*3
 *             else:
 *                 tmp1c=np.append(tmp1c,tmp3a)             # <<<<<<<<<<<<<<
 *             counter2+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2636, __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, 2636, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_7 = 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_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp3a)};
          __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2636, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp3a)};
          __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2636, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2636, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1c));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_7, ((PyObject *)__pyx_v_tmp3a));
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2636, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2636, __pyx_L1_error)
        __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
        {
          __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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_7 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 2636, __pyx_L1_error)
        }
        __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_15));
        __pyx_t_15 = 0;
      }
      __pyx_L13:;

      /* "pyqcstrc/icosah/mics.pyx":2637
 *             else:
 *                 tmp1c=np.append(tmp1c,tmp3a)
 *             counter2+=1             # <<<<<<<<<<<<<<
 *         else:
 *             counter4+=1
 */
      __pyx_v_counter2 = (__pyx_v_counter2 + 1);

      /* "pyqcstrc/icosah/mics.pyx":2632
 *         # tmp1c: set of tetrahedra in obj1 that are outseide of obj2
 *         #print 'hallo2'
 *         if counter1==0: # i1-th tetrahedron of obj1 is outside of obj2             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1c=tmp3a.reshape(72) # 72=4*6*3
 */
      goto __pyx_L12;
    }

    /* "pyqcstrc/icosah/mics.pyx":2639
 *             counter2+=1
 *         else:
 *             counter4+=1             # <<<<<<<<<<<<<<
 *         #####
 *         # if i1-th tetrahedron in obj1 (tmp3a) intersects with obj2
 */
    /*else*/ {
      __pyx_v_counter4 = (__pyx_v_counter4 + 1);
    }
    __pyx_L12:;

    /* "pyqcstrc/icosah/mics.pyx":2643
 *         # if i1-th tetrahedron in obj1 (tmp3a) intersects with obj2
 *         #print 'hallo3'
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             #####
 *             # generate set of tetrahedra in obj2 that intersect with tmp4b
 */
    __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2648
 *             # -->> tmp4d:
 *             #print 'hallo4'
 *             for i3 in range(len(indx1)):             # <<<<<<<<<<<<<<
 *                 if i3==0:
 *                     num=indx1[0]
 */
      __pyx_t_11 = PyList_GET_SIZE(__pyx_v_indx1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2648, __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_i3 = __pyx_t_7;

        /* "pyqcstrc/icosah/mics.pyx":2649
 *             #print 'hallo4'
 *             for i3 in range(len(indx1)):
 *                 if i3==0:             # <<<<<<<<<<<<<<
 *                     num=indx1[0]
 *                     tmp1d=obj2[num]
 */
        __pyx_t_1 = ((__pyx_v_i3 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2650
 *             for i3 in range(len(indx1)):
 *                 if i3==0:
 *                     num=indx1[0]             # <<<<<<<<<<<<<<
 *                     tmp1d=obj2[num]
 *                 else:
 */
          __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_indx1, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2650, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2650, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_v_num = __pyx_t_13;

          /* "pyqcstrc/icosah/mics.pyx":2651
 *                 if i3==0:
 *                     num=indx1[0]
 *                     tmp1d=obj2[num]             # <<<<<<<<<<<<<<
 *                 else:
 *                     num=indx1[i3]
 */
          __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_num, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2651, __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, 2651, __pyx_L1_error)
          __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.diminfo[0].strides = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1d.diminfo[0].shape = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 2651, __pyx_L1_error)
          }
          __pyx_t_19 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1d, ((PyArrayObject *)__pyx_t_15));
          __pyx_t_15 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2649
 *             #print 'hallo4'
 *             for i3 in range(len(indx1)):
 *                 if i3==0:             # <<<<<<<<<<<<<<
 *                     num=indx1[0]
 *                     tmp1d=obj2[num]
 */
          goto __pyx_L17;
        }

        /* "pyqcstrc/icosah/mics.pyx":2653
 *                     tmp1d=obj2[num]
 *                 else:
 *                     num=indx1[i3]             # <<<<<<<<<<<<<<
 *                     tmp1d=np.append(tmp1d,obj2[num])
 *             tmp4d=tmp1d.reshape(int(len(tmp1d)/72),4,6,3)
 */
        /*else*/ {
          __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_indx1, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2653, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2653, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_v_num = __pyx_t_13;

          /* "pyqcstrc/icosah/mics.pyx":2654
 *                 else:
 *                     num=indx1[i3]
 *                     tmp1d=np.append(tmp1d,obj2[num])             # <<<<<<<<<<<<<<
 *             tmp4d=tmp1d.reshape(int(len(tmp1d)/72),4,6,3)
 *             #
 */
          __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2654, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_append); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2654, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_num, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2654, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_2 = NULL;
          __pyx_t_13 = 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_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_14)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1d), __pyx_t_16};
            __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2654, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1d), __pyx_t_16};
            __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2654, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          } else
          #endif
          {
            __pyx_t_21 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2654, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_21);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_2); __pyx_t_2 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1d));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1d));
            PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1d));
            __Pyx_GIVEREF(__pyx_t_16);
            PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_13, __pyx_t_16);
            __pyx_t_16 = 0;
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2654, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
          }
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2654, __pyx_L1_error)
          __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
            __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.diminfo[0].strides = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1d.diminfo[0].shape = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.shape[0];
            if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 2654, __pyx_L1_error)
          }
          __pyx_t_19 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1d, ((PyArrayObject *)__pyx_t_15));
          __pyx_t_15 = 0;
        }
        __pyx_L17:;
      }

      /* "pyqcstrc/icosah/mics.pyx":2655
 *                     num=indx1[i3]
 *                     tmp1d=np.append(tmp1d,obj2[num])
 *             tmp4d=tmp1d.reshape(int(len(tmp1d)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             #
 *             #
 */
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1d), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1d)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2655, __pyx_L1_error)
      __pyx_t_21 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_16 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_14);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_14, function);
          __pyx_t_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_14)) {
        PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_t_21, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2655, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
        PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_t_21, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2655, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_16) {
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_16); __pyx_t_16 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_21);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_21);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_7, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_7, __pyx_int_3);
        __pyx_t_21 = 0;
        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2655, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2655, __pyx_L1_error)
      __pyx_t_18 = ((PyArrayObject *)__pyx_t_15);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4d.diminfo[0].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4d.diminfo[0].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4d.diminfo[1].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4d.diminfo[1].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4d.diminfo[2].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4d.diminfo[2].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4d.diminfo[3].strides = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4d.diminfo[3].shape = __pyx_pybuffernd_tmp4d.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2655, __pyx_L1_error)
      }
      __pyx_t_18 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4d, ((PyArrayObject *)__pyx_t_15));
      __pyx_t_15 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2665
 *             #
 *             #print 'hallo5'
 *             tmp4c=intersection_tetrahedron_obj_4(tmp3a,tmp4d,0,verbose-1)             # <<<<<<<<<<<<<<
 *             if counter3==0:
 *                 tmp1b=tmp4c.reshape(int(len(tmp4c)/72),4,6,3)
 */
      __pyx_t_15 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_tetrahedron_obj_4(((PyArrayObject *)__pyx_v_tmp3a), ((PyArrayObject *)__pyx_v_tmp4d), 0, (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
        __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_15), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
        if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2665, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_15));
      __pyx_t_15 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2666
 *             #print 'hallo5'
 *             tmp4c=intersection_tetrahedron_obj_4(tmp3a,tmp4d,0,verbose-1)
 *             if counter3==0:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp4c.reshape(int(len(tmp4c)/72),4,6,3)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2667
 *             tmp4c=intersection_tetrahedron_obj_4(tmp3a,tmp4d,0,verbose-1)
 *             if counter3==0:
 *                 tmp1b=tmp4c.reshape(int(len(tmp4c)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp4c)
 */
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2667, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_21 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_21)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_21);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[5] = {__pyx_t_21, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2667, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[5] = {__pyx_t_21, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2667, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_16 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          if (__pyx_t_21) {
            __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_21); __pyx_t_21 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, __pyx_t_2);
          __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_2 = 0;
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2667, __pyx_L1_error)
        __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_7 < 0)) __PYX_ERR(0, 2667, __pyx_L1_error)
        }
        __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_15));
        __pyx_t_15 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2666
 *             #print 'hallo5'
 *             tmp4c=intersection_tetrahedron_obj_4(tmp3a,tmp4d,0,verbose-1)
 *             if counter3==0:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp4c.reshape(int(len(tmp4c)/72),4,6,3)
 *             else:
 */
        goto __pyx_L18;
      }

      /* "pyqcstrc/icosah/mics.pyx":2669
 *                 tmp1b=tmp4c.reshape(int(len(tmp4c)/72),4,6,3)
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp4c)             # <<<<<<<<<<<<<<
 *             counter3+=1
 *             # merge two sets (tmp1c,tmp1b) of tetrahedra that are outseide of obj2
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_append); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_16, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4c)};
          __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2669, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp4c)};
          __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2669, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1b));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp4c));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4c));
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, ((PyObject *)__pyx_v_tmp4c));
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2669, __pyx_L1_error)
        __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_7 < 0)) {
            PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_7 < 0)) __PYX_ERR(0, 2669, __pyx_L1_error)
        }
        __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_15));
        __pyx_t_15 = 0;
      }
      __pyx_L18:;

      /* "pyqcstrc/icosah/mics.pyx":2670
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp4c)
 *             counter3+=1             # <<<<<<<<<<<<<<
 *             # merge two sets (tmp1c,tmp1b) of tetrahedra that are outseide of obj2
 *             tmp1c=np.append(tmp1c,tmp1b)
 */
      __pyx_v_counter3 = (__pyx_v_counter3 + 1);

      /* "pyqcstrc/icosah/mics.pyx":2672
 *             counter3+=1
 *             # merge two sets (tmp1c,tmp1b) of tetrahedra that are outseide of obj2
 *             tmp1c=np.append(tmp1c,tmp1b)             # <<<<<<<<<<<<<<
 *         else: #if i1 tetrahedron in obj1 (tmp3a) does NOT intersect with obj2
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2672, __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, 2672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp1b)};
        __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2672, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_tmp1c), ((PyObject *)__pyx_v_tmp1b)};
        __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2672, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_GOTREF(__pyx_t_15);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_16) {
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16); __pyx_t_16 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1c));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_7, ((PyObject *)__pyx_v_tmp1c));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_7, ((PyObject *)__pyx_v_tmp1b));
        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2672, __pyx_L1_error)
      __pyx_t_19 = ((PyArrayObject *)__pyx_t_15);
      {
        __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_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2672, __pyx_L1_error)
      }
      __pyx_t_19 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_15));
      __pyx_t_15 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2643
 *         # if i1-th tetrahedron in obj1 (tmp3a) intersects with obj2
 *         #print 'hallo3'
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             #####
 *             # generate set of tetrahedra in obj2 that intersect with tmp4b
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/mics.pyx":2674
 *             tmp1c=np.append(tmp1c,tmp1b)
 *         else: #if i1 tetrahedron in obj1 (tmp3a) does NOT intersect with obj2
 *             pass             # <<<<<<<<<<<<<<
 *     #print 'hallo6'
 *     if counter4+counter3!=0:
 */
    /*else*/ {
    }
    __pyx_L14:;
  }

  /* "pyqcstrc/icosah/mics.pyx":2676
 *             pass
 *     #print 'hallo6'
 *     if counter4+counter3!=0:             # <<<<<<<<<<<<<<
 *         return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *     else: # if (obj1 and not obj2) is empty
 */
  __pyx_t_1 = (((__pyx_v_counter4 + __pyx_v_counter3) != 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2677
 *     #print 'hallo6'
 *     if counter4+counter3!=0:
 *         return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)             # <<<<<<<<<<<<<<
 *     else: # if (obj1 and not obj2) is empty
 *         return np.array([[[[0]]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2677, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyInt_FromDouble((((double)__pyx_t_3) / 72.0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16 = NULL;
    __pyx_t_5 = 0;
    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_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_t_14, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2677, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_t_14, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2677, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    {
      __pyx_t_21 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      if (__pyx_t_16) {
        __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_16); __pyx_t_16 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_5, __pyx_t_14);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_5, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_5, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_5, __pyx_int_3);
      __pyx_t_14 = 0;
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2677, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":2676
 *             pass
 *     #print 'hallo6'
 *     if counter4+counter3!=0:             # <<<<<<<<<<<<<<
 *         return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *     else: # if (obj1 and not obj2) is empty
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2679
 *         return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *     else: # if (obj1 and not obj2) is empty
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * # NEW
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2679, __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_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_14);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_14);
    __pyx_t_14 = 0;
    __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_21))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_21, function);
      }
    }
    __pyx_t_15 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_21, __pyx_t_2, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_t_14);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2679, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2593
 *         return obj1
 * 
 * cpdef np.ndarray object_subtraction(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_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_21);
  { 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_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.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_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction", __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_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.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_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4d.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_tmp1d);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4d);
  __Pyx_XDECREF(__pyx_v_indx1);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_15object_subtraction(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_15object_subtraction(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("object_subtraction (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("object_subtraction", 1, 3, 3, 1); __PYX_ERR(0, 2593, __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("object_subtraction", 1, 3, 3, 2); __PYX_ERR(0, 2593, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction") < 0)) __PYX_ERR(0, 2593, __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, 2595, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2593, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction", __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, 2593, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 2594, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_14object_subtraction(__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_4mics_14object_subtraction(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("object_subtraction", 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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2593, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2593, __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_4mics_object_subtraction(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2593, __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.mics.object_subtraction", __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/mics.pyx":2682
 * 
 * # NEW
 * cpdef np.ndarray object_subtraction_new(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_17object_subtraction_new(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_new(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter0;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_flag;
  long __pyx_v_w1;
  long __pyx_v_w2;
  long __pyx_v_w3;
  float __pyx_v_vol;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp2b = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp3c = 0;
  PyArrayObject *__pyx_v_tetrahedron = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_obj2_surface = 0;
  PyArrayObject *__pyx_v_obj3_surface = 0;
  PyObject *__pyx_v_counter3 = NULL;
  Py_ssize_t __pyx_v_i3;
  __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_obj2_surface;
  __Pyx_Buffer __pyx_pybuffer_obj2_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3_surface;
  __Pyx_Buffer __pyx_pybuffer_obj3_surface;
  __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_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2b;
  __Pyx_Buffer __pyx_pybuffer_tmp2b;
  __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_tmp3c;
  __Pyx_Buffer __pyx_pybuffer_tmp3c;
  __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;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyArrayObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  PyArrayObject *__pyx_t_19 = NULL;
  Py_ssize_t __pyx_t_20;
  PyArrayObject *__pyx_t_21 = NULL;
  long __pyx_t_22;
  long __pyx_t_23;
  long __pyx_t_24;
  __pyx_t_5numpy_float64_t __pyx_t_25;
  Py_UCS4 __pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction_new", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __pyx_pybuffer_tmp2b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2b.refcount = 0;
  __pyx_pybuffernd_tmp2b.data = NULL;
  __pyx_pybuffernd_tmp2b.rcbuffer = &__pyx_pybuffer_tmp2b;
  __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_tmp3c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3c.refcount = 0;
  __pyx_pybuffernd_tmp3c.data = NULL;
  __pyx_pybuffernd_tmp3c.rcbuffer = &__pyx_pybuffer_tmp3c;
  __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_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __pyx_pybuffer_obj2_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_surface.refcount = 0;
  __pyx_pybuffernd_obj2_surface.data = NULL;
  __pyx_pybuffernd_obj2_surface.rcbuffer = &__pyx_pybuffer_obj2_surface;
  __pyx_pybuffer_obj3_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3_surface.refcount = 0;
  __pyx_pybuffernd_obj3_surface.data = NULL;
  __pyx_pybuffernd_obj3_surface.rcbuffer = &__pyx_pybuffer_obj3_surface;
  __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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2682, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2682, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2682, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":2698
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a,obj2_surface,obj3_surface
 * 
 *     counter0=0             # <<<<<<<<<<<<<<
 *     counter1=0
 *     if verbose>0:
 */
  __pyx_v_counter0 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2699
 * 
 *     counter0=0
 *     counter1=0             # <<<<<<<<<<<<<<
 *     if verbose>0:
 *         print('       object_subtraction_new()')
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2700
 *     counter0=0
 *     counter1=0
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       object_subtraction_new()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2701
 *     counter1=0
 *     if verbose>0:
 *         print('       object_subtraction_new()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2700
 *     counter0=0
 *     counter1=0
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       object_subtraction_new()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":2703
 *         print('       object_subtraction_new()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     #if verbose==1:
 *     #    print ' Subtraction by object_subtraction_new(obj1, obj2, obj3)'
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":2713
 *     #    pass
 *     #
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          (1) A and B')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2714
 *     #
 *     if verbose>0:
 *         print('          (1) A and B')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2713
 *     #    pass
 *     #
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          (1) A and B')
 *     else:
 */
    goto __pyx_L4;
  }

  /* "pyqcstrc/icosah/mics.pyx":2716
 *         print('          (1) A and B')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     #obj2_surface=generator_surface(obj2verbose-1)
 *     obj2_surface=generator_surface_1(obj2,verbose-1)
 */
  /*else*/ {
  }
  __pyx_L4:;

  /* "pyqcstrc/icosah/mics.pyx":2718
 *         pass
 *     #obj2_surface=generator_surface(obj2verbose-1)
 *     obj2_surface=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  __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, 2718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2_surface.diminfo[0].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_surface.diminfo[0].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_surface.diminfo[1].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_surface.diminfo[1].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_surface.diminfo[2].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_surface.diminfo[2].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_surface.diminfo[3].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_surface.diminfo[3].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2718, __pyx_L1_error)
  }
  __pyx_v_obj2_surface = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2720
 *     obj2_surface=generator_surface_1(obj2,verbose-1)
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          (2) B')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2721
 * 
 *     if verbose>0:
 *         print('          (2) B')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2720
 *     obj2_surface=generator_surface_1(obj2,verbose-1)
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('          (2) B')
 *     else:
 */
    goto __pyx_L5;
  }

  /* "pyqcstrc/icosah/mics.pyx":2723
 *         print('          (2) B')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     #obj3_surface=generator_surface(obj3)
 *     #obj3_surface=generator_surface(obj3,verbose-1)
 */
  /*else*/ {
  }
  __pyx_L5:;

  /* "pyqcstrc/icosah/mics.pyx":2726
 *     #obj3_surface=generator_surface(obj3)
 *     #obj3_surface=generator_surface(obj3,verbose-1)
 *     obj3_surface=generator_surface_1(obj3,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     """
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj3), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj3_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj3_surface.diminfo[0].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3_surface.diminfo[0].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3_surface.diminfo[1].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3_surface.diminfo[1].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3_surface.diminfo[2].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3_surface.diminfo[2].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3_surface.diminfo[3].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3_surface.diminfo[3].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2726, __pyx_L1_error)
  }
  __pyx_v_obj3_surface = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2735
 *         print 'Zz %8.6f %8.6f %8.6f'%((v4[0]+TAU*v4[1])/float(v4[2]),(v5[0]+TAU*v5[1])/float(v5[2]),(v6[0]+TAU*v6[1])/float(v6[2]))
 *     """
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('   (3) A not B')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2736
 *     """
 *     if verbose>0:
 *         print('   (3) A not B')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2735
 *         print 'Zz %8.6f %8.6f %8.6f'%((v4[0]+TAU*v4[1])/float(v4[2]),(v5[0]+TAU*v5[1])/float(v5[2]),(v6[0]+TAU*v6[1])/float(v6[2]))
 *     """
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('   (3) A not B')
 *     else:
 */
    goto __pyx_L6;
  }

  /* "pyqcstrc/icosah/mics.pyx":2738
 *         print('   (3) A not B')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     if obj2.tolist()!=[[[[0]]]]:
 *         ##########
 */
  /*else*/ {
  }
  __pyx_L6:;

  /* "pyqcstrc/icosah/mics.pyx":2739
 *     else:
 *         pass
 *     if obj2.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *         ##########
 *         # get vertices of obj2_surface which are on obj3_surface (points B)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj2), __pyx_n_s_tolist); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2739, __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 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":2743
 *         # get vertices of obj2_surface which are on obj3_surface (points B)
 *         #    see subtraction_tetrahedron_object()
 *         tmp3b=obj2_surface.reshape(len(obj2_surface)*3,6,3)             # <<<<<<<<<<<<<<
 *         #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *         counter0=0
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj2_surface), __pyx_n_s_reshape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_obj2_surface)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2743, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_9 * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2743, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2743, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_3, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_3, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_3, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2743, __pyx_L1_error)
    __pyx_t_12 = ((PyArrayObject *)__pyx_t_7);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2743, __pyx_L1_error)
    }
    __pyx_t_12 = 0;
    __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2745
 *         tmp3b=obj2_surface.reshape(len(obj2_surface)*3,6,3)
 *         #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *         counter0=0             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp3b)):
 *             tmp2b=tmp3b[i1]
 */
    __pyx_v_counter0 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2746
 *         #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *         counter0=0
 *         for i1 in range(len(tmp3b)):             # <<<<<<<<<<<<<<
 *             tmp2b=tmp3b[i1]
 *             for i2 in range(len(obj3_surface)):
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2746, __pyx_L1_error)
    __pyx_t_13 = __pyx_t_9;
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_13; __pyx_t_3+=1) {
      __pyx_v_i1 = __pyx_t_3;

      /* "pyqcstrc/icosah/mics.pyx":2747
 *         counter0=0
 *         for i1 in range(len(tmp3b)):
 *             tmp2b=tmp3b[i1]             # <<<<<<<<<<<<<<
 *             for i2 in range(len(obj3_surface)):
 *                 tmp3c=obj3_surface[i2]
 */
      __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2747, __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, 2747, __pyx_L1_error)
      __pyx_t_14 = ((PyArrayObject *)__pyx_t_7);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
        __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp2b.diminfo[0].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2b.diminfo[0].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2b.diminfo[1].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2b.diminfo[1].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2747, __pyx_L1_error)
      }
      __pyx_t_14 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp2b, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2748
 *         for i1 in range(len(tmp3b)):
 *             tmp2b=tmp3b[i1]
 *             for i2 in range(len(obj3_surface)):             # <<<<<<<<<<<<<<
 *                 tmp3c=obj3_surface[i2]
 *                 flag=on_out_surface(tmp2b,tmp3c)
 */
      __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj3_surface)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2748, __pyx_L1_error)
      __pyx_t_17 = __pyx_t_16;
      for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_17; __pyx_t_15+=1) {
        __pyx_v_i2 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":2749
 *             tmp2b=tmp3b[i1]
 *             for i2 in range(len(obj3_surface)):
 *                 tmp3c=obj3_surface[i2]             # <<<<<<<<<<<<<<
 *                 flag=on_out_surface(tmp2b,tmp3c)
 *                 if flag==0: # on surface
 */
        __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3_surface), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2749, __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, 2749, __pyx_L1_error)
        __pyx_t_12 = ((PyArrayObject *)__pyx_t_7);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
          __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
          if (unlikely(__pyx_t_18 < 0)) {
            PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
          if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 2749, __pyx_L1_error)
        }
        __pyx_t_12 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp3c, ((PyArrayObject *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2750
 *             for i2 in range(len(obj3_surface)):
 *                 tmp3c=obj3_surface[i2]
 *                 flag=on_out_surface(tmp2b,tmp3c)             # <<<<<<<<<<<<<<
 *                 if flag==0: # on surface
 *                     if counter0==0:
 */
        __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_on_out_surface(((PyArrayObject *)__pyx_v_tmp2b), ((PyArrayObject *)__pyx_v_tmp3c));

        /* "pyqcstrc/icosah/mics.pyx":2751
 *                 tmp3c=obj3_surface[i2]
 *                 flag=on_out_surface(tmp2b,tmp3c)
 *                 if flag==0: # on surface             # <<<<<<<<<<<<<<
 *                     if counter0==0:
 *                         tmp1b=tmp2b.reshape(18)
 */
        __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2752
 *                 flag=on_out_surface(tmp2b,tmp3c)
 *                 if flag==0: # on surface
 *                     if counter0==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=tmp2b.reshape(18)
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_counter0 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":2753
 *                 if flag==0: # on surface
 *                     if counter0==0:
 *                         tmp1b=tmp2b.reshape(18)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp2b)
 */
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp2b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_11 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_8, function);
              }
            }
            __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_11, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_int_18);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2753, __pyx_L1_error)
            __pyx_t_19 = ((PyArrayObject *)__pyx_t_7);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_18 < 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_4mics_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_18 < 0)) __PYX_ERR(0, 2753, __pyx_L1_error)
            }
            __pyx_t_19 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_7));
            __pyx_t_7 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2752
 *                 flag=on_out_surface(tmp2b,tmp3c)
 *                 if flag==0: # on surface
 *                     if counter0==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=tmp2b.reshape(18)
 *                     else:
 */
            goto __pyx_L13;
          }

          /* "pyqcstrc/icosah/mics.pyx":2755
 *                         tmp1b=tmp2b.reshape(18)
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp2b)             # <<<<<<<<<<<<<<
 *                     counter0+=1
 *                 else: # out
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2755, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2755, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_8 = NULL;
            __pyx_t_18 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_8)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_8);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_18 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_11)) {
              PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp2b)};
              __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2755, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_GOTREF(__pyx_t_7);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
              PyObject *__pyx_temp[3] = {__pyx_t_8, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp2b)};
              __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2755, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_GOTREF(__pyx_t_7);
            } else
            #endif
            {
              __pyx_t_2 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2755, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              if (__pyx_t_8) {
                __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
              }
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
              PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_18, ((PyObject *)__pyx_v_tmp1b));
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp2b));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2b));
              PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_18, ((PyObject *)__pyx_v_tmp2b));
              __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2755, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2755, __pyx_L1_error)
            __pyx_t_19 = ((PyArrayObject *)__pyx_t_7);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_18 < 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_4mics_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_18 < 0)) __PYX_ERR(0, 2755, __pyx_L1_error)
            }
            __pyx_t_19 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_7));
            __pyx_t_7 = 0;
          }
          __pyx_L13:;

          /* "pyqcstrc/icosah/mics.pyx":2756
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp2b)
 *                     counter0+=1             # <<<<<<<<<<<<<<
 *                 else: # out
 *                     pass
 */
          __pyx_v_counter0 = (__pyx_v_counter0 + 1);

          /* "pyqcstrc/icosah/mics.pyx":2751
 *                 tmp3c=obj3_surface[i2]
 *                 flag=on_out_surface(tmp2b,tmp3c)
 *                 if flag==0: # on surface             # <<<<<<<<<<<<<<
 *                     if counter0==0:
 *                         tmp1b=tmp2b.reshape(18)
 */
          goto __pyx_L12;
        }

        /* "pyqcstrc/icosah/mics.pyx":2758
 *                     counter0+=1
 *                 else: # out
 *                     pass             # <<<<<<<<<<<<<<
 *         if counter0!=0:
 *             tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
        /*else*/ {
        }
        __pyx_L12:;
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":2759
 *                 else: # out
 *                     pass
 *         if counter0!=0:             # <<<<<<<<<<<<<<
 *             tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_counter0 != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2760
 *                     pass
 *         if counter0!=0:
 *             tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2760, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = NULL;
      __pyx_t_3 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_2, __pyx_int_6, __pyx_int_3};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2760, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_2, __pyx_int_6, __pyx_int_3};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2760, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, __pyx_t_2);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_3, __pyx_int_3);
        __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2760, __pyx_L1_error)
      __pyx_t_12 = ((PyArrayObject *)__pyx_t_7);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2760, __pyx_L1_error)
      }
      __pyx_t_12 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2759
 *                 else: # out
 *                     pass
 *         if counter0!=0:             # <<<<<<<<<<<<<<
 *             tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         else:
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/mics.pyx":2762
 *             tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         ###########
 *         #   TEMP  #
 */
    /*else*/ {
    }
    __pyx_L14:;

    /* "pyqcstrc/icosah/mics.pyx":2766
 *         #   TEMP  #
 *         ###########
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)             # <<<<<<<<<<<<<<
 *         #print '       number of points B = %d'%(len(tmp3b))
 *         #for i1 in range(len(tmp3b)):
 */
    __pyx_t_7 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3b), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_7), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2766, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2774
 *         #         #
 *         ###########
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj1)):
 *             #print '       %d-th tetrahedron in A'%(i1)
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2775
 *         ###########
 *         counter1=0
 *         for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *             #print '       %d-th tetrahedron in A'%(i1)
 *             tetrahedron=obj1[i1]
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2775, __pyx_L1_error)
    __pyx_t_13 = __pyx_t_9;
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_13; __pyx_t_3+=1) {
      __pyx_v_i1 = __pyx_t_3;

      /* "pyqcstrc/icosah/mics.pyx":2777
 *         for i1 in range(len(obj1)):
 *             #print '       %d-th tetrahedron in A'%(i1)
 *             tetrahedron=obj1[i1]             # <<<<<<<<<<<<<<
 *             ############
 *             #  subtraction_tetrahedron_object()
 */
      __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2777, __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, 2777, __pyx_L1_error)
      __pyx_t_12 = ((PyArrayObject *)__pyx_t_7);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
        __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer, (PyObject*)__pyx_v_tetrahedron, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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];
        if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2777, __pyx_L1_error)
      }
      __pyx_t_12 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tetrahedron, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2782
 *             #  This returns vertecies which correspond to "A and not B = A and not (A and B)".
 *             ############
 *             tmp3a=subtraction_tetrahedron_object(tetrahedron,obj2,tmp3b,obj2_surface,obj3_surface,verbose-1)             # <<<<<<<<<<<<<<
 *             if tmp3a.tolist()!=[[[0]]]:
 *                 if counter1==0:
 */
      __pyx_t_7 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_subtraction_tetrahedron_object(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_tmp3b), ((PyArrayObject *)__pyx_v_obj2_surface), ((PyArrayObject *)__pyx_v_obj3_surface), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
        __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_7), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 0)) {
          PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 2782, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2783
 *             ############
 *             tmp3a=subtraction_tetrahedron_object(tetrahedron,obj2,tmp3b,obj2_surface,obj3_surface,verbose-1)
 *             if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=tmp3a.reshape(len(tmp3a)*18) # 18=6*3
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2783, __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_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_10);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2784
 *             tmp3a=subtraction_tetrahedron_object(tetrahedron,obj2,tmp3b,obj2_surface,obj3_surface,verbose-1)
 *             if tmp3a.tolist()!=[[[0]]]:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3a.reshape(len(tmp3a)*18) # 18=6*3
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2785
 *             if tmp3a.tolist()!=[[[0]]]:
 *                 if counter1==0:
 *                     tmp1a=tmp3a.reshape(len(tmp3a)*18) # 18=6*3             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a)
 */
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2785, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2785, __pyx_L1_error)
          __pyx_t_7 = PyInt_FromSsize_t((__pyx_t_16 * 18)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2785, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_2 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
            }
          }
          __pyx_t_10 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __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_10)) __PYX_ERR(0, 2785, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2785, __pyx_L1_error)
          __pyx_t_19 = ((PyArrayObject *)__pyx_t_10);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2785, __pyx_L1_error)
          }
          __pyx_t_19 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_10));
          __pyx_t_10 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2784
 *             tmp3a=subtraction_tetrahedron_object(tetrahedron,obj2,tmp3b,obj2_surface,obj3_surface,verbose-1)
 *             if tmp3a.tolist()!=[[[0]]]:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3a.reshape(len(tmp3a)*18) # 18=6*3
 *                 else:
 */
          goto __pyx_L18;
        }

        /* "pyqcstrc/icosah/mics.pyx":2787
 *                     tmp1a=tmp3a.reshape(len(tmp3a)*18) # 18=6*3
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a)             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_append); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
            __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2787, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
            __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2787, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2787, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_11) {
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __pyx_t_11 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_15, ((PyObject *)__pyx_v_tmp3a));
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2787, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2787, __pyx_L1_error)
          __pyx_t_19 = ((PyArrayObject *)__pyx_t_10);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2787, __pyx_L1_error)
          }
          __pyx_t_19 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_10));
          __pyx_t_10 = 0;
        }
        __pyx_L18:;

        /* "pyqcstrc/icosah/mics.pyx":2788
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a)
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":2783
 *             ############
 *             tmp3a=subtraction_tetrahedron_object(tetrahedron,obj2,tmp3b,obj2_surface,obj3_surface,verbose-1)
 *             if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=tmp3a.reshape(len(tmp3a)*18) # 18=6*3
 */
        goto __pyx_L17;
      }

      /* "pyqcstrc/icosah/mics.pyx":2790
 *                 counter1+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *             ############
 *             """
 */
      /*else*/ {
      }
      __pyx_L17:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2809
 *             ############
 *             """
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             #return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
    __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":2811
 *         if counter1!=0:
 *             #return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *             #for i1 in range(len(tmp3a)):
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2811, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = NULL;
      __pyx_t_3 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_2, __pyx_int_6, __pyx_int_3};
        __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2811, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_t_2, __pyx_int_6, __pyx_int_3};
        __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2811, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_3, __pyx_t_2);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_3, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_3, __pyx_int_3);
        __pyx_t_2 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2811, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2811, __pyx_L1_error)
      __pyx_t_12 = ((PyArrayObject *)__pyx_t_10);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2811, __pyx_L1_error)
      }
      __pyx_t_12 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_10));
      __pyx_t_10 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2812
 *             #return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *             tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 *             #for i1 in range(len(tmp3a)):
 *             #    v1,v2,v3,v4,v5,v6=projection(tmp3a[i1][0],tmp3a[i1][1],tmp3a[i1][2],tmp3a[i1][3],tmp3a[i1][4],tmp3a[i1][5])
 */
      __pyx_t_10 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_10), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2812, __pyx_L1_error)
      }
      __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_10));
      __pyx_t_10 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2822
 *             #                    #
 *             ######################
 *             counter3=0             # <<<<<<<<<<<<<<
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if tmp4a.tolist()!=[[[[0]]]]:
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_v_counter3 = __pyx_int_0;

      /* "pyqcstrc/icosah/mics.pyx":2823
 *             ######################
 *             counter3=0
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 for i1 in range(len(tmp4a)):
 */
      __pyx_t_10 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2823, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_10), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2823, __pyx_L1_error)
      }
      __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_10);
      __pyx_t_10 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2824
 *             counter3=0
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 for i1 in range(len(tmp4a)):
 *                     tmp3a=tmp4a[i1]
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_10 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2824, __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 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_10, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2824, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":2825
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 for i1 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                     tmp3a=tmp4a[i1]
 *                     counter2=0
 */
        __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2825, __pyx_L1_error)
        __pyx_t_13 = __pyx_t_9;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_13; __pyx_t_3+=1) {
          __pyx_v_i1 = __pyx_t_3;

          /* "pyqcstrc/icosah/mics.pyx":2826
 *             if tmp4a.tolist()!=[[[[0]]]]:
 *                 for i1 in range(len(tmp4a)):
 *                     tmp3a=tmp4a[i1]             # <<<<<<<<<<<<<<
 *                     counter2=0
 *                     #print 'tmp3a = ',tmp3a
 */
          __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2826, __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, 2826, __pyx_L1_error)
          __pyx_t_12 = ((PyArrayObject *)__pyx_t_7);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 2826, __pyx_L1_error)
          }
          __pyx_t_12 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_7));
          __pyx_t_7 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2827
 *                 for i1 in range(len(tmp4a)):
 *                     tmp3a=tmp4a[i1]
 *                     counter2=0             # <<<<<<<<<<<<<<
 *                     #print 'tmp3a = ',tmp3a
 *                     for i2 in range(4):
 */
          __pyx_v_counter2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2829
 *                     counter2=0
 *                     #print 'tmp3a = ',tmp3a
 *                     for i2 in range(4):             # <<<<<<<<<<<<<<
 *                         tmp2a=tmp3a[i2]
 *                         counter1=0
 */
          for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) {
            __pyx_v_i2 = __pyx_t_15;

            /* "pyqcstrc/icosah/mics.pyx":2830
 *                     #print 'tmp3a = ',tmp3a
 *                     for i2 in range(4):
 *                         tmp2a=tmp3a[i2]             # <<<<<<<<<<<<<<
 *                         counter1=0
 *                         for i3 in range(len(obj2)):
 */
            __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2830, __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, 2830, __pyx_L1_error)
            __pyx_t_14 = ((PyArrayObject *)__pyx_t_7);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
              __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
              if (unlikely(__pyx_t_18 < 0)) {
                PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_18 < 0)) __PYX_ERR(0, 2830, __pyx_L1_error)
            }
            __pyx_t_14 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_7));
            __pyx_t_7 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2831
 *                     for i2 in range(4):
 *                         tmp2a=tmp3a[i2]
 *                         counter1=0             # <<<<<<<<<<<<<<
 *                         for i3 in range(len(obj2)):
 *                             tmp3b=obj2[i3]
 */
            __pyx_v_counter1 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2832
 *                         tmp2a=tmp3a[i2]
 *                         counter1=0
 *                         for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                             tmp3b=obj2[i3]
 *                             flag=inside_outside_tetrahedron(tmp2a,tmp3b[0],tmp3b[1],tmp3b[2],tmp3b[3])
 */
            __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2832, __pyx_L1_error)
            __pyx_t_17 = __pyx_t_16;
            for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_17; __pyx_t_20+=1) {
              __pyx_v_i3 = __pyx_t_20;

              /* "pyqcstrc/icosah/mics.pyx":2833
 *                         counter1=0
 *                         for i3 in range(len(obj2)):
 *                             tmp3b=obj2[i3]             # <<<<<<<<<<<<<<
 *                             flag=inside_outside_tetrahedron(tmp2a,tmp3b[0],tmp3b[1],tmp3b[2],tmp3b[3])
 *                             if flag==0: # inside
 */
              __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2833, __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, 2833, __pyx_L1_error)
              __pyx_t_12 = ((PyArrayObject *)__pyx_t_7);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
                __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
                if (unlikely(__pyx_t_18 < 0)) {
                  PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_18 < 0)) __PYX_ERR(0, 2833, __pyx_L1_error)
              }
              __pyx_t_12 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_7));
              __pyx_t_7 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2834
 *                         for i3 in range(len(obj2)):
 *                             tmp3b=obj2[i3]
 *                             flag=inside_outside_tetrahedron(tmp2a,tmp3b[0],tmp3b[1],tmp3b[2],tmp3b[3])             # <<<<<<<<<<<<<<
 *                             if flag==0: # inside
 *                                 counter1+=1
 */
              __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2834, __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, 2834, __pyx_L1_error)
              __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2834, __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, 2834, __pyx_L1_error)
              __pyx_t_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2834, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2834, __pyx_L1_error)
              __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2834, __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, 2834, __pyx_L1_error)
              __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_7), ((PyArrayObject *)__pyx_t_8), ((PyArrayObject *)__pyx_t_10), ((PyArrayObject *)__pyx_t_2), 0);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2835
 *                             tmp3b=obj2[i3]
 *                             flag=inside_outside_tetrahedron(tmp2a,tmp3b[0],tmp3b[1],tmp3b[2],tmp3b[3])
 *                             if flag==0: # inside             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 break
 */
              __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
              if (__pyx_t_1) {

                /* "pyqcstrc/icosah/mics.pyx":2836
 *                             flag=inside_outside_tetrahedron(tmp2a,tmp3b[0],tmp3b[1],tmp3b[2],tmp3b[3])
 *                             if flag==0: # inside
 *                                 counter1+=1             # <<<<<<<<<<<<<<
 *                                 break
 *                             else: # outside
 */
                __pyx_v_counter1 = (__pyx_v_counter1 + 1);

                /* "pyqcstrc/icosah/mics.pyx":2837
 *                             if flag==0: # inside
 *                                 counter1+=1
 *                                 break             # <<<<<<<<<<<<<<
 *                             else: # outside
 *                                 pass
 */
                goto __pyx_L26_break;

                /* "pyqcstrc/icosah/mics.pyx":2835
 *                             tmp3b=obj2[i3]
 *                             flag=inside_outside_tetrahedron(tmp2a,tmp3b[0],tmp3b[1],tmp3b[2],tmp3b[3])
 *                             if flag==0: # inside             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 break
 */
              }

              /* "pyqcstrc/icosah/mics.pyx":2839
 *                                 break
 *                             else: # outside
 *                                 pass             # <<<<<<<<<<<<<<
 *                         if counter1==0:
 *                             counter2+=1
 */
              /*else*/ {
              }
            }
            __pyx_L26_break:;

            /* "pyqcstrc/icosah/mics.pyx":2840
 *                             else: # outside
 *                                 pass
 *                         if counter1==0:             # <<<<<<<<<<<<<<
 *                             counter2+=1
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":2841
 *                                 pass
 *                         if counter1==0:
 *                             counter2+=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_v_counter2 = (__pyx_v_counter2 + 1);

              /* "pyqcstrc/icosah/mics.pyx":2840
 *                             else: # outside
 *                                 pass
 *                         if counter1==0:             # <<<<<<<<<<<<<<
 *                             counter2+=1
 *                         else:
 */
              goto __pyx_L28;
            }

            /* "pyqcstrc/icosah/mics.pyx":2843
 *                             counter2+=1
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter2<4: # outside
 *                         if counter3==0:
 */
            /*else*/ {
            }
            __pyx_L28:;
          }

          /* "pyqcstrc/icosah/mics.pyx":2844
 *                         else:
 *                             pass
 *                     if counter2<4: # outside             # <<<<<<<<<<<<<<
 *                         if counter3==0:
 *                             tmp1a=tmp3a.reshape(72) # 72=4*6*3
 */
          __pyx_t_1 = ((__pyx_v_counter2 < 4) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":2845
 *                             pass
 *                     if counter2<4: # outside
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp3a.reshape(72) # 72=4*6*3
 *                         else:
 */
            __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_counter3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2845, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":2846
 *                     if counter2<4: # outside
 *                         if counter3==0:
 *                             tmp1a=tmp3a.reshape(72) # 72=4*6*3             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp3a)
 */
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2846, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_8 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                }
              }
              __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_8, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2846, __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, 2846, __pyx_L1_error)
              __pyx_t_19 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2846, __pyx_L1_error)
              }
              __pyx_t_19 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":2845
 *                             pass
 *                     if counter2<4: # outside
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp3a.reshape(72) # 72=4*6*3
 *                         else:
 */
              goto __pyx_L30;
            }

            /* "pyqcstrc/icosah/mics.pyx":2848
 *                             tmp1a=tmp3a.reshape(72) # 72=4*6*3
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp3a)             # <<<<<<<<<<<<<<
 *                         counter3+=1
 *                     else:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2848, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_append); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2848, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_15 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                  __pyx_t_15 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_8)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2848, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp3a)};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2848, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              {
                __pyx_t_7 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2848, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_7);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
                PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_15, ((PyObject *)__pyx_v_tmp3a));
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2848, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              }
              __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, 2848, __pyx_L1_error)
              __pyx_t_19 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_19, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2848, __pyx_L1_error)
              }
              __pyx_t_19 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L30:;

            /* "pyqcstrc/icosah/mics.pyx":2849
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp3a)
 *                         counter3+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_counter3, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2849, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF_SET(__pyx_v_counter3, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2844
 *                         else:
 *                             pass
 *                     if counter2<4: # outside             # <<<<<<<<<<<<<<
 *                         if counter3==0:
 *                             tmp1a=tmp3a.reshape(72) # 72=4*6*3
 */
            goto __pyx_L29;
          }

          /* "pyqcstrc/icosah/mics.pyx":2851
 *                         counter3+=1
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 */
          /*else*/ {
          }
          __pyx_L29:;
        }

        /* "pyqcstrc/icosah/mics.pyx":2852
 *                     else:
 *                         pass
 *                 tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 vol=(w1+w2*TAU)/w3
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2852, __pyx_L1_error)
        __pyx_t_7 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 72.0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2852, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = NULL;
        __pyx_t_3 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_3 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_t_7, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 4+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2852, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_t_7, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 4+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2852, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(4+__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2852, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_10) {
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_3, __pyx_t_7);
          __Pyx_INCREF(__pyx_int_4);
          __Pyx_GIVEREF(__pyx_int_4);
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_3, __pyx_int_4);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_3, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_3, __pyx_int_3);
          __pyx_t_7 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2852, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __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, 2852, __pyx_L1_error)
        __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
          __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 2852, __pyx_L1_error)
        }
        __pyx_t_21 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2853
 *                         pass
 *                 tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 w1,w2,w3=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *                 vol=(w1+w2*TAU)/w3
 *                 if verbose>0:
 */
        __pyx_t_2 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2853, __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, 2853, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_7);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2853, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2853, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2853, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2853, __pyx_L1_error)
        }
        __pyx_t_22 = __Pyx_PyInt_As_long(__pyx_t_8); if (unlikely((__pyx_t_22 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2853, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_23 = __Pyx_PyInt_As_long(__pyx_t_11); if (unlikely((__pyx_t_23 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2853, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_7); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 2853, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_w1 = __pyx_t_22;
        __pyx_v_w2 = __pyx_t_23;
        __pyx_v_w3 = __pyx_t_24;

        /* "pyqcstrc/icosah/mics.pyx":2854
 *                 tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 vol=(w1+w2*TAU)/w3             # <<<<<<<<<<<<<<
 *                 if verbose>0:
 *                     print('          A not B obj, volume = %d %d %d (%10.6f)'%(w1,w2,w3,vol))
 */
        __pyx_t_25 = (__pyx_v_w1 + (__pyx_v_w2 * __pyx_v_8pyqcstrc_6icosah_4mics_TAU));
        if (unlikely(__pyx_v_w3 == 0)) {
          PyErr_SetString(PyExc_ZeroDivisionError, "float division");
          __PYX_ERR(0, 2854, __pyx_L1_error)
        }
        __pyx_v_vol = (__pyx_t_25 / ((__pyx_t_5numpy_float64_t)__pyx_v_w3));

        /* "pyqcstrc/icosah/mics.pyx":2855
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 vol=(w1+w2*TAU)/w3
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('          A not B obj, volume = %d %d %d (%10.6f)'%(w1,w2,w3,vol))
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":2856
 *                 vol=(w1+w2*TAU)/w3
 *                 if verbose>0:
 *                     print('          A not B obj, volume = %d %d %d (%10.6f)'%(w1,w2,w3,vol))             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_9 = 0;
          __pyx_t_26 = 127;
          __Pyx_INCREF(__pyx_kp_u_A_not_B_obj_volume);
          __pyx_t_9 += 32;
          __Pyx_GIVEREF(__pyx_kp_u_A_not_B_obj_volume);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_A_not_B_obj_volume);
          __pyx_t_7 = __Pyx_PyUnicode_From_long(__pyx_v_w1, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_INCREF(__pyx_kp_u__17);
          __pyx_t_9 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__17);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__17);
          __pyx_t_7 = __Pyx_PyUnicode_From_long(__pyx_v_w2, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_INCREF(__pyx_kp_u__17);
          __pyx_t_9 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__17);
          PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__17);
          __pyx_t_7 = __Pyx_PyUnicode_From_long(__pyx_v_w3, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_INCREF(__pyx_kp_u__18);
          __pyx_t_9 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__18);
          PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__18);
          __pyx_t_7 = PyFloat_FromDouble(__pyx_v_vol); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_11 = __Pyx_PyObject_Format(__pyx_t_7, __pyx_kp_u_10_6f); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_26 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_26) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_26;
          __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_11);
          __pyx_t_11 = 0;
          __Pyx_INCREF(__pyx_kp_u__19);
          __pyx_t_9 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__19);
          PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_kp_u__19);
          __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_2, 9, __pyx_t_9, __pyx_t_26); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2855
 *                 w1,w2,w3=obj_volume_6d(tmp4a)
 *                 vol=(w1+w2*TAU)/w3
 *                 if verbose>0:             # <<<<<<<<<<<<<<
 *                     print('          A not B obj, volume = %d %d %d (%10.6f)'%(w1,w2,w3,vol))
 *                 else:
 */
          goto __pyx_L31;
        }

        /* "pyqcstrc/icosah/mics.pyx":2858
 *                     print('          A not B obj, volume = %d %d %d (%10.6f)'%(w1,w2,w3,vol))
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *                 """
 *                 #
 */
        /*else*/ {
        }
        __pyx_L31:;

        /* "pyqcstrc/icosah/mics.pyx":2882
 *                 print '   A not B obj, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol)
 *                 """
 *                 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/mics.pyx":2824
 *             counter3=0
 *             tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *             if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                 for i1 in range(len(tmp4a)):
 *                     tmp3a=tmp4a[i1]
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":2884
 *                 return tmp4a
 *             else:
 *                 return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *         else:
 *             #return np.array([0],dtype=np.int).reshape(1,1,1,1)
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2884, __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_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_8);
        PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_11, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2884, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }

      /* "pyqcstrc/icosah/mics.pyx":2809
 *             ############
 *             """
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             #return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":2887
 *         else:
 *             #return np.array([0],dtype=np.int).reshape(1,1,1,1)
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return obj1
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2887, __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_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_7);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_7);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
      __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_11) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2887, __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, 2887, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":2739
 *     else:
 *         pass
 *     if obj2.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *         ##########
 *         # get vertices of obj2_surface which are on obj3_surface (points B)
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":2889
 *             return np.array([[[[0]]]])
 *     else:
 *         return obj1             # <<<<<<<<<<<<<<
 * 
 * # working
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj1));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj1);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2682
 * 
 * # NEW
 * cpdef np.ndarray object_subtraction_new(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_new", __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_obj2_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.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_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tetrahedron);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj2_surface);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj3_surface);
  __Pyx_XDECREF(__pyx_v_counter3);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_17object_subtraction_new(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_17object_subtraction_new(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  PyArrayObject *__pyx_v_obj3 = 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("object_subtraction_new (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_obj3,&__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_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("object_subtraction_new", 1, 4, 4, 1); __PYX_ERR(0, 2682, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("object_subtraction_new", 1, 4, 4, 2); __PYX_ERR(0, 2682, __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("object_subtraction_new", 1, 4, 4, 3); __PYX_ERR(0, 2682, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction_new") < 0)) __PYX_ERR(0, 2682, __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_obj3 = ((PyArrayObject *)values[2]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2685, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction_new", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2682, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_new", __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, 2682, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 2683, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj3), __pyx_ptype_5numpy_ndarray, 1, "obj3", 0))) __PYX_ERR(0, 2684, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_16object_subtraction_new(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_obj3, __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_4mics_16object_subtraction_new(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, 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;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  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("object_subtraction_new", 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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2682, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2682, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2682, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_new(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_obj3), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2682, __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_new", __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":2892
 * 
 * # working
 * cpdef np.ndarray object_subtraction_dev1(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_19object_subtraction_dev1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev1(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_flag;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_vertx_obj2 = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_surface_obj3 = 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_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_surface_obj3;
  __Pyx_Buffer __pyx_pybuffer_surface_obj3;
  __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_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __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_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertx_obj2;
  __Pyx_Buffer __pyx_pybuffer_vertx_obj2;
  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;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction_dev1", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __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_vertx_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_vertx_obj2.refcount = 0;
  __pyx_pybuffernd_vertx_obj2.data = NULL;
  __pyx_pybuffernd_vertx_obj2.rcbuffer = &__pyx_pybuffer_vertx_obj2;
  __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_surface_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_surface_obj3.refcount = 0;
  __pyx_pybuffernd_surface_obj3.data = NULL;
  __pyx_pybuffernd_surface_obj3.rcbuffer = &__pyx_pybuffer_surface_obj3;
  __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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2892, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2892, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2892, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":2908
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] surface_obj3
 * 
 *     print(' object_subtraction_dev1()')             # <<<<<<<<<<<<<<
 * 
 *     #if verbose==1:
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2918
 *     #    pass
 * 
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     #tmp4b=generator_surface(obj2,verbose-1)
 *     #tmp4b=generator_surface(obj2,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2918, __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, 2918, __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, 2918, __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, 2918, __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, 2918, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 2918, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2921
 *     #tmp4b=generator_surface(obj2,verbose-1)
 *     #tmp4b=generator_surface(obj2,verbose-1)
 *     tmp4b=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 2921, __pyx_L1_error)
  }
  __pyx_v_tmp4b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2923
 *     tmp4b=generator_surface_1(obj2,verbose-1)
 * 
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2             # <<<<<<<<<<<<<<
 *     #surface_obj3=generator_surface(obj3,verbose-1) # surface of obj3
 *     #surface_obj3=generator_surface(obj3,verbose-1)# surface of obj3
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2923, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_10 * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2923, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2923, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2923, __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_2);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_int_3);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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, 2923, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_vertx_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertx_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_vertx_obj2.diminfo[0].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertx_obj2.diminfo[0].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertx_obj2.diminfo[1].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertx_obj2.diminfo[1].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vertx_obj2.diminfo[2].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vertx_obj2.diminfo[2].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2923, __pyx_L1_error)
  }
  __pyx_v_vertx_obj2 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2926
 *     #surface_obj3=generator_surface(obj3,verbose-1) # surface of obj3
 *     #surface_obj3=generator_surface(obj3,verbose-1)# surface of obj3
 *     surface_obj3=generator_surface_1(obj3,verbose-1)# surface of obj3             # <<<<<<<<<<<<<<
 * 
 *     # get vertices of obj2 which on the surface of obj3
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj3), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_surface_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_surface_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_surface_obj3.diminfo[0].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surface_obj3.diminfo[0].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_surface_obj3.diminfo[1].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_surface_obj3.diminfo[1].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_surface_obj3.diminfo[2].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_surface_obj3.diminfo[2].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_surface_obj3.diminfo[3].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_surface_obj3.diminfo[3].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2926, __pyx_L1_error)
  }
  __pyx_v_surface_obj3 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2929
 * 
 *     # get vertices of obj2 which on the surface of obj3
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     counter2=0
 *     for i2 in range(len(vertx_obj2)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2929, __pyx_L1_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_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2929, __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_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 2929, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2930
 *     # get vertices of obj2 which on the surface of obj3
 *     tmp1a=np.array([0])
 *     counter2=0             # <<<<<<<<<<<<<<
 *     for i2 in range(len(vertx_obj2)):
 *         counter1=0
 */
  __pyx_v_counter2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2931
 *     tmp1a=np.array([0])
 *     counter2=0
 *     for i2 in range(len(vertx_obj2)):             # <<<<<<<<<<<<<<
 *         counter1=0
 *         for i3 in range(len(surface_obj3)):
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_vertx_obj2)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2931, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_10;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i2 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":2932
 *     counter2=0
 *     for i2 in range(len(vertx_obj2)):
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2933
 *     for i2 in range(len(vertx_obj2)):
 *         counter1=0
 *         for i3 in range(len(surface_obj3)):             # <<<<<<<<<<<<<<
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_surface_obj3)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2933, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i3 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":2934
 *         counter1=0
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])             # <<<<<<<<<<<<<<
 *             if flag==0: # on
 *                 counter1+=1
 */
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2934, __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, 2934, __pyx_L1_error)
      __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2934, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_on_out_surface(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_11));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2935
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 break
 */
      __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":2936
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":2937
 *             if flag==0: # on
 *                 counter1+=1
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L6_break;

        /* "pyqcstrc/icosah/mics.pyx":2935
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 break
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":2939
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if counter1!=0:
 *             if counter2==0:
 */
      /*else*/ {
      }
    }
    __pyx_L6_break:;

    /* "pyqcstrc/icosah/mics.pyx":2940
 *             else:
 *                 pass
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 */
    __pyx_t_16 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_16) {

      /* "pyqcstrc/icosah/mics.pyx":2941
 *                 pass
 *         if counter1!=0:
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 *             else:
 */
      __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":2942
 *         if counter1!=0:
 *             if counter2==0:
 *                 tmp1a=vertx_obj2[i2].reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,vertx_obj2[i2])
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_11 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2942, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_11);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2942, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_11));
        __pyx_t_11 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2941
 *                 pass
 *         if counter1!=0:
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 *             else:
 */
        goto __pyx_L9;
      }

      /* "pyqcstrc/icosah/mics.pyx":2944
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 *             else:
 *                 tmp1a=np.append(tmp1a,vertx_obj2[i2])             # <<<<<<<<<<<<<<
 *             counter2+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        __pyx_t_15 = 0;
        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_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_1};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2944, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_1};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2944, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2944, __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_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_15, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2944, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2944, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_11);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2944, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_11));
        __pyx_t_11 = 0;
      }
      __pyx_L9:;

      /* "pyqcstrc/icosah/mics.pyx":2945
 *             else:
 *                 tmp1a=np.append(tmp1a,vertx_obj2[i2])
 *             counter2+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter2 = (__pyx_v_counter2 + 1);

      /* "pyqcstrc/icosah/mics.pyx":2940
 *             else:
 *                 pass
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/mics.pyx":2947
 *             counter2+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3)) # vertices of obj2
 */
    /*else*/ {
    }
    __pyx_L8:;
  }

  /* "pyqcstrc/icosah/mics.pyx":2949
 *             pass
 * 
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3)) # vertices of obj2             # <<<<<<<<<<<<<<
 *     #print 'len(vertx_obj2)=',len(vertx_obj2)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2949, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 18.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2949, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __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[4] = {__pyx_t_1, __pyx_t_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2949, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_int_3);
    __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2949, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_11), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_vertx_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertx_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_vertx_obj2.diminfo[0].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertx_obj2.diminfo[0].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertx_obj2.diminfo[1].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertx_obj2.diminfo[1].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vertx_obj2.diminfo[2].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vertx_obj2.diminfo[2].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2949, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_vertx_obj2, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2952
 *     #print 'len(vertx_obj2)=',len(vertx_obj2)
 * 
 *     counter3=0             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1)):
 * 
 */
  __pyx_v_counter3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":2953
 * 
 *     counter3=0
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 * 
 *         counter2=0
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2953, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_10;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":2955
 *     for i1 in range(len(obj1)):
 * 
 *         counter2=0             # <<<<<<<<<<<<<<
 * 
 *         # get vertices of i1-th tetrahedron of obj1 which are NOT inside obj3
 */
    __pyx_v_counter2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":2958
 * 
 *         # get vertices of i1-th tetrahedron of obj1 which are NOT inside obj3
 *         for i2 in range(4):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i3 in range(len(obj3)):
 */
    for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":2959
 *         # get vertices of i1-th tetrahedron of obj1 which are NOT inside obj3
 *         for i2 in range(4):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2960
 *         for i2 in range(4):
 *             counter1=0
 *             for i3 in range(len(obj3)):             # <<<<<<<<<<<<<<
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj3)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2960, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_13;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_14; __pyx_t_17+=1) {
        __pyx_v_i3 = __pyx_t_17;

        /* "pyqcstrc/icosah/mics.pyx":2961
 *             counter1=0
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])             # <<<<<<<<<<<<<<
 *                 if flag==0: # insede
 *                     counter1+=1
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2961, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2961, __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, 2961, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2961, __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, 2961, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __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, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2961, __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, 2961, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2961, __pyx_L1_error)
        __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_18), 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

        /* "pyqcstrc/icosah/mics.pyx":2962
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":2963
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":2964
 *                 if flag==0: # insede
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L15_break;

          /* "pyqcstrc/icosah/mics.pyx":2962
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":2966
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if counter2==0:
 */
        /*else*/ {
        }
      }
      __pyx_L15_break:;

      /* "pyqcstrc/icosah/mics.pyx":2967
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=obj1[i1][i2].reshape(18)
 */
      __pyx_t_16 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":2968
 *                     pass
 *             if counter1==0:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 */
        __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":2969
 *             if counter1==0:
 *                 if counter2==0:
 *                     tmp1a=obj1[i1][i2].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])
 */
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2969, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          __pyx_t_18 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2969, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2969, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 2969, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2968
 *                     pass
 *             if counter1==0:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 */
          goto __pyx_L18;
        }

        /* "pyqcstrc/icosah/mics.pyx":2971
 *                     tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2971, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2971, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2971, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = NULL;
          __pyx_t_17 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_17 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2971, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2971, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2971, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__pyx_t_1) {
              __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_17, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2971, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2971, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 2971, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;
        }
        __pyx_L18:;

        /* "pyqcstrc/icosah/mics.pyx":2972
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);

        /* "pyqcstrc/icosah/mics.pyx":2967
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=obj1[i1][i2].reshape(18)
 */
        goto __pyx_L17;
      }

      /* "pyqcstrc/icosah/mics.pyx":2974
 *                 counter2+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 * 
 *         # get vertx_obj2 (vertices of obj2 on the surface of obj3) which are inside i1-th tetrahedron in obj1
 */
      /*else*/ {
      }
      __pyx_L17:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2977
 * 
 *         # get vertx_obj2 (vertices of obj2 on the surface of obj3) which are inside i1-th tetrahedron in obj1
 *         for i2 in range(len(vertx_obj2)):             # <<<<<<<<<<<<<<
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_vertx_obj2)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2977, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":2978
 *         # get vertx_obj2 (vertices of obj2 on the surface of obj3) which are inside i1-th tetrahedron in obj1
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])             # <<<<<<<<<<<<<<
 *             if flag==0: # insede
 *                 if counter2==0:
 */
      __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2978, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2978, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __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, 2978, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2978, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2978, __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, 2978, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_3), 0);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2979
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 */
      __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":2980
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 *                 else:
 */
        __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":2981
 *             if flag==0: # insede
 *                 if counter2==0:
 *                     tmp1a=vertx_obj2[i2].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,vertx_obj2[i2])
 */
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2981, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2981, __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, 2981, __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_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 2981, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2980
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 *                 else:
 */
          goto __pyx_L22;
        }

        /* "pyqcstrc/icosah/mics.pyx":2983
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,vertx_obj2[i2])             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = NULL;
          __pyx_t_17 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_17 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_18 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2983, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            if (__pyx_t_11) {
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_11); __pyx_t_11 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_17, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          __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, 2983, __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_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 2983, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;
        }
        __pyx_L22:;

        /* "pyqcstrc/icosah/mics.pyx":2984
 *                 else:
 *                     tmp1a=np.append(tmp1a,vertx_obj2[i2])
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);

        /* "pyqcstrc/icosah/mics.pyx":2979
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 */
        goto __pyx_L21;
      }

      /* "pyqcstrc/icosah/mics.pyx":2986
 *                 counter2+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 * 
 *         if counter2!=0:
 */
      /*else*/ {
      }
      __pyx_L21:;
    }

    /* "pyqcstrc/icosah/mics.pyx":2988
 *                 pass
 * 
 *         if counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 */
    __pyx_t_16 = ((__pyx_v_counter2 != 0) != 0);
    if (__pyx_t_16) {

      /* "pyqcstrc/icosah/mics.pyx":2989
 * 
 *         if counter2!=0:
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))             # <<<<<<<<<<<<<<
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2989, __pyx_L1_error)
      __pyx_t_18 = __Pyx_PyInt_FromDouble((((double)__pyx_t_13) / 18.0)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_2 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_18, __pyx_int_6, __pyx_int_3};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_18, __pyx_int_6, __pyx_int_3};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_18);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_15, __pyx_t_18);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_15, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_15, __pyx_int_3);
        __pyx_t_18 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2989, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __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, 2989, __pyx_L1_error)
      __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
        __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 0)) {
          PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_15 < 0)) __PYX_ERR(0, 2989, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2990
 *         if counter2!=0:
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *             if len(tmp3b)>=4:
 *                 if coplanar_check(tmp3b)==0:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __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_18 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_1 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_18, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2990, __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_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 2990, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":2991
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *                 if coplanar_check(tmp3b)==0:
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2991, __pyx_L1_error)
      __pyx_t_16 = ((__pyx_t_13 >= 4) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":2992
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:
 *                 if coplanar_check(tmp3b)==0:             # <<<<<<<<<<<<<<
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                     counter2=0
 */
        __pyx_t_16 = ((__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check(((PyArrayObject *)__pyx_v_tmp3b), 0) == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":2993
 *             if len(tmp3b)>=4:
 *                 if coplanar_check(tmp3b)==0:
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)             # <<<<<<<<<<<<<<
 *                     counter2=0
 *                     for i2 in range(len(tmp4a)):
 */
          __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2993, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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_15 < 0)) __PYX_ERR(0, 2993, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2994
 *                 if coplanar_check(tmp3b)==0:
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                     counter2=0             # <<<<<<<<<<<<<<
 *                     for i2 in range(len(tmp4a)):
 *                         # geometric center, centroid of the tetrahedron, tmp2c
 */
          __pyx_v_counter2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":2995
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                     counter2=0
 *                     for i2 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                         # geometric center, centroid of the tetrahedron, tmp2c
 *                         tmp2a=centroid(tmp4a[i2])
 */
          __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2995, __pyx_L1_error)
          __pyx_t_14 = __pyx_t_13;
          for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
            __pyx_v_i2 = __pyx_t_15;

            /* "pyqcstrc/icosah/mics.pyx":2997
 *                     for i2 in range(len(tmp4a)):
 *                         # geometric center, centroid of the tetrahedron, tmp2c
 *                         tmp2a=centroid(tmp4a[i2])             # <<<<<<<<<<<<<<
 *                         counter1=0
 *                         for i3 in range(len(obj2)):
 */
            __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2997, __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, 2997, __pyx_L1_error)
            __pyx_t_11 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2997, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
              __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_11), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
              if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 2997, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_11));
            __pyx_t_11 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2998
 *                         # geometric center, centroid of the tetrahedron, tmp2c
 *                         tmp2a=centroid(tmp4a[i2])
 *                         counter1=0             # <<<<<<<<<<<<<<
 *                         for i3 in range(len(obj2)):
 *                             # check tmp2c is out of obj2 or not
 */
            __pyx_v_counter1 = 0;

            /* "pyqcstrc/icosah/mics.pyx":2999
 *                         tmp2a=centroid(tmp4a[i2])
 *                         counter1=0
 *                         for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                             # check tmp2c is out of obj2 or not
 *                             flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 */
            __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2999, __pyx_L1_error)
            __pyx_t_20 = __pyx_t_19;
            for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_20; __pyx_t_17+=1) {
              __pyx_v_i3 = __pyx_t_17;

              /* "pyqcstrc/icosah/mics.pyx":3001
 *                         for i3 in range(len(obj2)):
 *                             # check tmp2c is out of obj2 or not
 *                             flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])             # <<<<<<<<<<<<<<
 *                             if flag==0: # inside
 *                                 counter1+=1
 */
              __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3001, __pyx_L1_error)
              __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3001, __pyx_L1_error)
              __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_11, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3001, __pyx_L1_error)
              __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3001, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_11, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3001, __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, 3001, __pyx_L1_error)
              __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_2), 0);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3002
 *                             # check tmp2c is out of obj2 or not
 *                             flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                             if flag==0: # inside             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 break
 */
              __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
              if (__pyx_t_16) {

                /* "pyqcstrc/icosah/mics.pyx":3003
 *                             flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                             if flag==0: # inside
 *                                 counter1+=1             # <<<<<<<<<<<<<<
 *                                 break
 *                             else:
 */
                __pyx_v_counter1 = (__pyx_v_counter1 + 1);

                /* "pyqcstrc/icosah/mics.pyx":3004
 *                             if flag==0: # inside
 *                                 counter1+=1
 *                                 break             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                goto __pyx_L29_break;

                /* "pyqcstrc/icosah/mics.pyx":3002
 *                             # check tmp2c is out of obj2 or not
 *                             flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                             if flag==0: # inside             # <<<<<<<<<<<<<<
 *                                 counter1+=1
 *                                 break
 */
              }

              /* "pyqcstrc/icosah/mics.pyx":3006
 *                                 break
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                         if counter1==0:
 *                             if counter2==0:
 */
              /*else*/ {
              }
            }
            __pyx_L29_break:;

            /* "pyqcstrc/icosah/mics.pyx":3007
 *                             else:
 *                                 pass
 *                         if counter1==0:             # <<<<<<<<<<<<<<
 *                             if counter2==0:
 *                                 tmp1a=tmp4a[i2].reshape(72)
 */
            __pyx_t_16 = ((__pyx_v_counter1 == 0) != 0);
            if (__pyx_t_16) {

              /* "pyqcstrc/icosah/mics.pyx":3008
 *                                 pass
 *                         if counter1==0:
 *                             if counter2==0:             # <<<<<<<<<<<<<<
 *                                 tmp1a=tmp4a[i2].reshape(72)
 *                             else:
 */
              __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
              if (__pyx_t_16) {

                /* "pyqcstrc/icosah/mics.pyx":3009
 *                         if counter1==0:
 *                             if counter2==0:
 *                                 tmp1a=tmp4a[i2].reshape(72)             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp4a[i2])
 */
                __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3009, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_18);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3009, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                __pyx_t_18 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_18)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_18);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                  }
                }
                __pyx_t_2 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_18, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __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, 3009, __pyx_L1_error)
                __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                  __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 3009, __pyx_L1_error)
                }
                __pyx_t_5 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
                __pyx_t_2 = 0;

                /* "pyqcstrc/icosah/mics.pyx":3008
 *                                 pass
 *                         if counter1==0:
 *                             if counter2==0:             # <<<<<<<<<<<<<<
 *                                 tmp1a=tmp4a[i2].reshape(72)
 *                             else:
 */
                goto __pyx_L32;
              }

              /* "pyqcstrc/icosah/mics.pyx":3011
 *                                 tmp1a=tmp4a[i2].reshape(72)
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp4a[i2])             # <<<<<<<<<<<<<<
 *                             counter2+=1
 *                         else:
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3011, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3011, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_18);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3011, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_1 = NULL;
                __pyx_t_17 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
                  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_18);
                  if (likely(__pyx_t_1)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                    __Pyx_INCREF(__pyx_t_1);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_18, function);
                    __pyx_t_17 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_18)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3011, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_18)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3011, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                } else
                #endif
                {
                  __pyx_t_11 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3011, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  if (__pyx_t_1) {
                    __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
                  }
                  __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1a));
                  __Pyx_GIVEREF(__pyx_t_3);
                  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_17, __pyx_t_3);
                  __pyx_t_3 = 0;
                  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3011, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                }
                __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3011, __pyx_L1_error)
                __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                  __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 3011, __pyx_L1_error)
                }
                __pyx_t_5 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
                __pyx_t_2 = 0;
              }
              __pyx_L32:;

              /* "pyqcstrc/icosah/mics.pyx":3012
 *                             else:
 *                                 tmp1a=np.append(tmp1a,tmp4a[i2])
 *                             counter2+=1             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              __pyx_v_counter2 = (__pyx_v_counter2 + 1);

              /* "pyqcstrc/icosah/mics.pyx":3007
 *                             else:
 *                                 pass
 *                         if counter1==0:             # <<<<<<<<<<<<<<
 *                             if counter2==0:
 *                                 tmp1a=tmp4a[i2].reshape(72)
 */
              goto __pyx_L31;
            }

            /* "pyqcstrc/icosah/mics.pyx":3014
 *                             counter2+=1
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter2!=0:
 *                         if counter3==0:
 */
            /*else*/ {
            }
            __pyx_L31:;
          }

          /* "pyqcstrc/icosah/mics.pyx":3015
 *                         else:
 *                             pass
 *                     if counter2!=0:             # <<<<<<<<<<<<<<
 *                         if counter3==0:
 *                             tmp1b=tmp1a
 */
          __pyx_t_16 = ((__pyx_v_counter2 != 0) != 0);
          if (__pyx_t_16) {

            /* "pyqcstrc/icosah/mics.pyx":3016
 *                             pass
 *                     if counter2!=0:
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             tmp1b=tmp1a
 *                         else:
 */
            __pyx_t_16 = ((__pyx_v_counter3 == 0) != 0);
            if (__pyx_t_16) {

              /* "pyqcstrc/icosah/mics.pyx":3017
 *                     if counter2!=0:
 *                         if counter3==0:
 *                             tmp1b=tmp1a             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1b=np.append(tmp1b,tmp1a)
 */
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_15 < 0)) {
                  PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3017, __pyx_L1_error)
              }
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
              __Pyx_DECREF_SET(__pyx_v_tmp1b, __pyx_v_tmp1a);

              /* "pyqcstrc/icosah/mics.pyx":3016
 *                             pass
 *                     if counter2!=0:
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             tmp1b=tmp1a
 *                         else:
 */
              goto __pyx_L34;
            }

            /* "pyqcstrc/icosah/mics.pyx":3019
 *                             tmp1b=tmp1a
 *                         else:
 *                             tmp1b=np.append(tmp1b,tmp1a)             # <<<<<<<<<<<<<<
 *                         counter3+=1
 *                     else:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3019, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3019, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __pyx_t_18 = NULL;
              __pyx_t_15 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
                __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
                if (likely(__pyx_t_18)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                  __Pyx_INCREF(__pyx_t_18);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_11, function);
                  __pyx_t_15 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_11)) {
                PyObject *__pyx_temp[3] = {__pyx_t_18, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
                PyObject *__pyx_temp[3] = {__pyx_t_18, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3019, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_18) {
                  __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_18); __pyx_t_18 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1b));
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __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, 3019, __pyx_L1_error)
              __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_15 < 0)) {
                  PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3019, __pyx_L1_error)
              }
              __pyx_t_5 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L34:;

            /* "pyqcstrc/icosah/mics.pyx":3020
 *                         else:
 *                             tmp1b=np.append(tmp1b,tmp1a)
 *                         counter3+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_v_counter3 = (__pyx_v_counter3 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3015
 *                         else:
 *                             pass
 *                     if counter2!=0:             # <<<<<<<<<<<<<<
 *                         if counter3==0:
 *                             tmp1b=tmp1a
 */
            goto __pyx_L33;
          }

          /* "pyqcstrc/icosah/mics.pyx":3022
 *                         counter3+=1
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          /*else*/ {
          }
          __pyx_L33:;

          /* "pyqcstrc/icosah/mics.pyx":2992
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:
 *                 if coplanar_check(tmp3b)==0:             # <<<<<<<<<<<<<<
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                     counter2=0
 */
          goto __pyx_L25;
        }

        /* "pyqcstrc/icosah/mics.pyx":3024
 *                         pass
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
        }
        __pyx_L25:;

        /* "pyqcstrc/icosah/mics.pyx":2991
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *                 if coplanar_check(tmp3b)==0:
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 */
        goto __pyx_L24;
      }

      /* "pyqcstrc/icosah/mics.pyx":3026
 *                     pass
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L24:;

      /* "pyqcstrc/icosah/mics.pyx":2988
 *                 pass
 * 
 *         if counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 */
      goto __pyx_L23;
    }

    /* "pyqcstrc/icosah/mics.pyx":3028
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if counter3!=0:
 *         return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 */
    /*else*/ {
    }
    __pyx_L23:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3029
 *         else:
 *             pass
 *     if counter3!=0:             # <<<<<<<<<<<<<<
 *         return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *     else:
 */
  __pyx_t_16 = ((__pyx_v_counter3 != 0) != 0);
  if (__pyx_t_16) {

    /* "pyqcstrc/icosah/mics.pyx":3030
 *             pass
 *     if counter3!=0:
 *         return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[[0]]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3030, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_18 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_18)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_18);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_11)) {
      PyObject *__pyx_temp[5] = {__pyx_t_18, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3030, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 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_11)) {
      PyObject *__pyx_temp[5] = {__pyx_t_18, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3030, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_18) {
        __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_18); __pyx_t_18 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_3);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_6, __pyx_int_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __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, 3030, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":3029
 *         else:
 *             pass
 *     if counter3!=0:             # <<<<<<<<<<<<<<
 *         return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *     else:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3032
 *         return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * # working
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3032, __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_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_11);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_11);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3032, __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, 3032, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":2892
 * 
 * # working
 * cpdef np.ndarray object_subtraction_dev1(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

  /* 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_11);
  __Pyx_XDECREF(__pyx_t_18);
  { 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_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev1", __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_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_vertx_obj2);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_surface_obj3);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_19object_subtraction_dev1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_19object_subtraction_dev1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  PyArrayObject *__pyx_v_obj3 = 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("object_subtraction_dev1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_obj3,&__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_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("object_subtraction_dev1", 1, 4, 4, 1); __PYX_ERR(0, 2892, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("object_subtraction_dev1", 1, 4, 4, 2); __PYX_ERR(0, 2892, __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("object_subtraction_dev1", 1, 4, 4, 3); __PYX_ERR(0, 2892, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction_dev1") < 0)) __PYX_ERR(0, 2892, __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_obj3 = ((PyArrayObject *)values[2]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction_dev1", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2892, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev1", __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, 2892, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 2893, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj3), __pyx_ptype_5numpy_ndarray, 1, "obj3", 0))) __PYX_ERR(0, 2894, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_18object_subtraction_dev1(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_obj3, __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_4mics_18object_subtraction_dev1(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, 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;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  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("object_subtraction_dev1", 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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2892, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2892, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2892, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev1(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_obj3), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2892, __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev1", __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":3035
 * 
 * # working
 * cpdef np.ndarray object_subtraction_dev(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_21object_subtraction_dev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_flag;
  int __pyx_v_flag1;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_tmp4c = 0;
  PyObject *__pyx_v_tmp1c = NULL;
  Py_ssize_t __pyx_v_i4;
  Py_ssize_t __pyx_v_i5;
  __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_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  __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_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __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_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp4c;
  __Pyx_Buffer __pyx_pybuffer_tmp4c;
  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;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  PyArrayObject *__pyx_t_21 = NULL;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction_dev", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __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_tmp4b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4b.refcount = 0;
  __pyx_pybuffernd_tmp4b.data = NULL;
  __pyx_pybuffernd_tmp4b.rcbuffer = &__pyx_pybuffer_tmp4b;
  __pyx_pybuffer_tmp4c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4c.refcount = 0;
  __pyx_pybuffernd_tmp4c.data = NULL;
  __pyx_pybuffernd_tmp4c.rcbuffer = &__pyx_pybuffer_tmp4c;
  __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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3035, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3035, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3035, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":3049
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a,tmp4b,tmp4c
 * 
 *     print(' object_subtraction_dev()')             # <<<<<<<<<<<<<<
 * 
 *     #if verbose==1:
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3057
 *     #else:
 *     #    pass
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp1b=np.array([0])
 *     #tmp4b=generator_surface(obj2,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __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, 3057, __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, 3057, __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, 3057, __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, 3057, __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_4mics_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_4mics_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, 3057, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3058
 *     #    pass
 *     tmp1a=np.array([0])
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     #tmp4b=generator_surface(obj2,verbose-1)
 *     tmp4b=generator_surface_1(obj2,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3058, __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, 3058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3058, __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_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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 3058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3058, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3058, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3060
 *     tmp1b=np.array([0])
 *     #tmp4b=generator_surface(obj2,verbose-1)
 *     tmp4b=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2
 *     for i1 in range(len(obj1)):
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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_6 < 0)) __PYX_ERR(0, 3060, __pyx_L1_error)
  }
  __pyx_v_tmp4b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3061
 *     #tmp4b=generator_surface(obj2,verbose-1)
 *     tmp4b=generator_surface_1(obj2,verbose-1)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1)):
 *         # get vertices of obj2 which are inside i1-th tetrahedron of obj1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3061, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_10 * 3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __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[4] = {__pyx_t_4, __pyx_t_3, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3061, __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_3);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_3);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_int_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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, 3061, __pyx_L1_error)
  __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3061, __pyx_L1_error)
  }
  __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3062
 *     tmp4b=generator_surface_1(obj2,verbose-1)
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *         # get vertices of obj2 which are inside i1-th tetrahedron of obj1
 *         for i2 in range(len(tmp3a)):
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3062, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_10;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":3064
 *     for i1 in range(len(obj1)):
 *         # get vertices of obj2 which are inside i1-th tetrahedron of obj1
 *         for i2 in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *             flag=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3064, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":3065
 *         # get vertices of obj2 which are inside i1-th tetrahedron of obj1
 *         for i2 in range(len(tmp3a)):
 *             flag=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])             # <<<<<<<<<<<<<<
 *             if flag==0: # insede
 *                 if len(tmp1a)==1:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __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, 3065, __pyx_L1_error)
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3065, __pyx_L1_error)
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __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, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __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, 3065, __pyx_L1_error)
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3065, __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, 3065, __pyx_L1_error)
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3065, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_16), 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3066
 *         for i2 in range(len(tmp3a)):
 *             flag=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp3a[i2].reshape(18)
 */
      __pyx_t_17 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_17) {

        /* "pyqcstrc/icosah/mics.pyx":3067
 *             flag=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3a[i2].reshape(18)
 *                 else:
 */
        __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3067, __pyx_L1_error)
        __pyx_t_17 = ((__pyx_t_18 == 1) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3068
 *             if flag==0: # insede
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp3a[i2].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a[i2])
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3068, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3068, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_16 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3068, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3068, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_16);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3068, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3067
 *             flag=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp3a[i2].reshape(18)
 *                 else:
 */
          goto __pyx_L8;
        }

        /* "pyqcstrc/icosah/mics.pyx":3070
 *                     tmp1a=tmp3a[i2].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp3a[i2])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __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, 3070, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_11 = NULL;
          __pyx_t_19 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_19 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
            __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3070, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_16);
            __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[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
            __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3070, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3070, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_11) {
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __pyx_t_11 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_19, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_19, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3070, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3070, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_16);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3070, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;
        }
        __pyx_L8:;

        /* "pyqcstrc/icosah/mics.pyx":3066
 *         for i2 in range(len(tmp3a)):
 *             flag=inside_outside_tetrahedron(tmp3a[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp3a[i2].reshape(18)
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/mics.pyx":3072
 *                     tmp1a=np.append(tmp1a,tmp3a[i2])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         # get vertices of i1-th tetrahedron of obj1 which are NOT inside obj2
 *         for i2 in range(4):
 */
      /*else*/ {
      }
      __pyx_L7:;
    }

    /* "pyqcstrc/icosah/mics.pyx":3074
 *                 pass
 *         # get vertices of i1-th tetrahedron of obj1 which are NOT inside obj2
 *         for i2 in range(4):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i3 in range(len(obj2)):
 */
    for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":3075
 *         # get vertices of i1-th tetrahedron of obj1 which are NOT inside obj2
 *         for i2 in range(4):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i3 in range(len(obj2)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj2[i2][0],obj2[i2][1],obj2[i2][2],obj2[i2][3])
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3076
 *         for i2 in range(4):
 *             counter1=0
 *             for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj2[i2][0],obj2[i2][1],obj2[i2][2],obj2[i2][3])
 *                 if flag==0: # insede
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3076, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_13;
      for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_14; __pyx_t_19+=1) {
        __pyx_v_i3 = __pyx_t_19;

        /* "pyqcstrc/icosah/mics.pyx":3077
 *             counter1=0
 *             for i3 in range(len(obj2)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj2[i2][0],obj2[i2][1],obj2[i2][2],obj2[i2][3])             # <<<<<<<<<<<<<<
 *                 if flag==0: # insede
 *                     counter1+=1
 */
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_16, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3077, __pyx_L1_error)
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_16, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3077, __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, 3077, __pyx_L1_error)
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_16, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3077, __pyx_L1_error)
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_16, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3077, __pyx_L1_error)
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_16, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3077, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3077, __pyx_L1_error)
        __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_1), 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3078
 *             for i3 in range(len(obj2)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj2[i2][0],obj2[i2][1],obj2[i2][2],obj2[i2][3])
 *                 if flag==0: # insede             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_17 = ((__pyx_v_flag == 0) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3079
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj2[i2][0],obj2[i2][1],obj2[i2][2],obj2[i2][3])
 *                 if flag==0: # insede
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3080
 *                 if flag==0: # insede
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L12_break;

          /* "pyqcstrc/icosah/mics.pyx":3078
 *             for i3 in range(len(obj2)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj2[i2][0],obj2[i2][1],obj2[i2][2],obj2[i2][3])
 *                 if flag==0: # insede             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":3082
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if len(tmp1a)==1:
 */
        /*else*/ {
        }
      }
      __pyx_L12_break:;

      /* "pyqcstrc/icosah/mics.pyx":3083
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                         tmp1a=obj1[i1][i2].reshape(18)
 */
      __pyx_t_17 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_17) {

        /* "pyqcstrc/icosah/mics.pyx":3084
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                         tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 */
        __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3084, __pyx_L1_error)
        __pyx_t_17 = ((__pyx_t_13 == 1) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3085
 *             if counter1==0:
 *                 if len(tmp1a)==1:
 *                         tmp1a=obj1[i1][i2].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])
 */
          __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3085, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3085, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3085, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
            }
          }
          __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_3, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3085, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3085, __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_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3085, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3084
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                         tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "pyqcstrc/icosah/mics.pyx":3087
 *                         tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_11, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3087, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = NULL;
          __pyx_t_19 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_19 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3087, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3087, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3087, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_11) {
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_19, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_19, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3087, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 3087, __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_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3087, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;
        }
        __pyx_L15:;

        /* "pyqcstrc/icosah/mics.pyx":3083
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                         tmp1a=obj1[i1][i2].reshape(18)
 */
        goto __pyx_L14;
      }

      /* "pyqcstrc/icosah/mics.pyx":3089
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if tmp1a.tolist()!=[0]:
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 */
      /*else*/ {
      }
      __pyx_L14:;
    }

    /* "pyqcstrc/icosah/mics.pyx":3090
 *             else:
 *                 pass
 *         if tmp1a.tolist()!=[0]:             # <<<<<<<<<<<<<<
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3090, __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 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 3090, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_17) {

      /* "pyqcstrc/icosah/mics.pyx":3091
 *                 pass
 *         if tmp1a.tolist()!=[0]:
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))             # <<<<<<<<<<<<<<
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3091, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyInt_FromDouble((((double)__pyx_t_13) / 18.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      __pyx_t_15 = 0;
      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_15 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_1, __pyx_int_6, __pyx_int_3};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3091, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_1, __pyx_int_6, __pyx_int_3};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3091, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_15, __pyx_t_1);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_15, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_15, __pyx_int_3);
        __pyx_t_1 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3091, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_4), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3091, __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_tmp3b.rcbuffer->pybuffer);
        __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 0)) {
          PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_15 < 0)) __PYX_ERR(0, 3091, __pyx_L1_error)
      }
      __Pyx_XDECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3092
 *         if tmp1a.tolist()!=[0]:
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *             if len(tmp3b)>=4:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __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_1 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3092, __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_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3092, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3093
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 for i2 in range(len(tmp4a)):
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3093, __pyx_L1_error)
      __pyx_t_17 = ((__pyx_t_13 >= 4) != 0);
      if (__pyx_t_17) {

        /* "pyqcstrc/icosah/mics.pyx":3094
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)             # <<<<<<<<<<<<<<
 *                 for i2 in range(len(tmp4a)):
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 */
        __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 0)) {
            PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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_15 < 0)) __PYX_ERR(0, 3094, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3095
 *             if len(tmp3b)>=4:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 for i2 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2a=centroid(tmp4a[i2])
 */
        __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3095, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_13;
        for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
          __pyx_v_i2 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":3097
 *                 for i2 in range(len(tmp4a)):
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2a=centroid(tmp4a[i2])             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     for i3 in range(len(obj2)):
 */
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3097, __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, 3097, __pyx_L1_error)
          __pyx_t_11 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3097, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
            __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_11), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
            if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3097, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_11));
          __pyx_t_11 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3098
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2a=centroid(tmp4a[i2])
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     for i3 in range(len(obj2)):
 *                         # check tmp2c is out of obj2 or not
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3099
 *                     tmp2a=centroid(tmp4a[i2])
 *                     counter1=0
 *                     for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 */
          __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3099, __pyx_L1_error)
          __pyx_t_20 = __pyx_t_18;
          for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_20; __pyx_t_19+=1) {
            __pyx_v_i3 = __pyx_t_19;

            /* "pyqcstrc/icosah/mics.pyx":3101
 *                     for i3 in range(len(obj2)):
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])             # <<<<<<<<<<<<<<
 *                         if flag==0: # inside
 *                             counter1+=1
 */
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3101, __pyx_L1_error)
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3101, __pyx_L1_error)
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3101, __pyx_L1_error)
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3101, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_11, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3101, __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, 3101, __pyx_L1_error)
            __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__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_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3102
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                         if flag==0: # inside             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            __pyx_t_17 = ((__pyx_v_flag == 0) != 0);
            if (__pyx_t_17) {

              /* "pyqcstrc/icosah/mics.pyx":3103
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                         if flag==0: # inside
 *                             counter1+=1             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_v_counter1 = (__pyx_v_counter1 + 1);

              /* "pyqcstrc/icosah/mics.pyx":3104
 *                         if flag==0: # inside
 *                             counter1+=1
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L21_break;

              /* "pyqcstrc/icosah/mics.pyx":3102
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                         if flag==0: # inside             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":3106
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         if len(tmp1a)==1:
 */
            /*else*/ {
            }
          }
          __pyx_L21_break:;

          /* "pyqcstrc/icosah/mics.pyx":3107
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4a[i2].reshape(72)
 */
          __pyx_t_17 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_17) {

            /* "pyqcstrc/icosah/mics.pyx":3108
 *                             pass
 *                     if counter1==0:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a[i2].reshape(72)
 *                         else:
 */
            __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3108, __pyx_L1_error)
            __pyx_t_17 = ((__pyx_t_18 == 1) != 0);
            if (__pyx_t_17) {

              /* "pyqcstrc/icosah/mics.pyx":3109
 *                     if counter1==0:
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4a[i2].reshape(72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i2])
 */
              __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3109, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3109, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_4, function);
                }
              }
              __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3109, __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, 3109, __pyx_L1_error)
              __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3109, __pyx_L1_error)
              }
              __pyx_t_5 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3108
 *                             pass
 *                     if counter1==0:
 *                         if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a[i2].reshape(72)
 *                         else:
 */
              goto __pyx_L24;
            }

            /* "pyqcstrc/icosah/mics.pyx":3111
 *                             tmp1a=tmp4a[i2].reshape(72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i2])             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3111, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3111, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3111, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_3 = NULL;
              __pyx_t_19 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_19 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_1)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3111, __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_1)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3111, __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_11 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3111, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_19, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_4);
                PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_19, __pyx_t_4);
                __pyx_t_4 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3111, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
              __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, 3111, __pyx_L1_error)
              __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_19 < 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_4mics_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_19 < 0)) __PYX_ERR(0, 3111, __pyx_L1_error)
              }
              __pyx_t_5 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L24:;

            /* "pyqcstrc/icosah/mics.pyx":3107
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if len(tmp1a)==1:
 *                             tmp1a=tmp4a[i2].reshape(72)
 */
            goto __pyx_L23;
          }

          /* "pyqcstrc/icosah/mics.pyx":3113
 *                             tmp1a=np.append(tmp1a,tmp4a[i2])
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if len(tmp1b)==1:
 *                     tmp1b=tmp1a
 */
          /*else*/ {
          }
          __pyx_L23:;
        }

        /* "pyqcstrc/icosah/mics.pyx":3114
 *                     else:
 *                         pass
 *                 if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                     tmp1b=tmp1a
 *                 else:
 */
        __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3114, __pyx_L1_error)
        __pyx_t_17 = ((__pyx_t_13 == 1) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3115
 *                         pass
 *                 if len(tmp1b)==1:
 *                     tmp1b=tmp1a             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1b=np.append(tmp1b,tmp1a)
 */
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3115, __pyx_L1_error)
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_DECREF_SET(__pyx_v_tmp1b, __pyx_v_tmp1a);

          /* "pyqcstrc/icosah/mics.pyx":3114
 *                     else:
 *                         pass
 *                 if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                     tmp1b=tmp1a
 *                 else:
 */
          goto __pyx_L25;
        }

        /* "pyqcstrc/icosah/mics.pyx":3117
 *                     tmp1b=tmp1a
 *                 else:
 *                     tmp1b=np.append(tmp1b,tmp1a)             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3117, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3117, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3117, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3117, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_2);
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3117, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (__pyx_t_1) {
              __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
            PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1b));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3117, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __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, 3117, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3117, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;
        }
        __pyx_L25:;

        /* "pyqcstrc/icosah/mics.pyx":3093
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 *             if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 for i2 in range(len(tmp4a)):
 */
        goto __pyx_L17;
      }

      /* "pyqcstrc/icosah/mics.pyx":3119
 *                     tmp1b=np.append(tmp1b,tmp1a)
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
      }
      __pyx_L17:;

      /* "pyqcstrc/icosah/mics.pyx":3090
 *             else:
 *                 pass
 *         if tmp1a.tolist()!=[0]:             # <<<<<<<<<<<<<<
 *             tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *             tmp1a=np.array([0])
 */
      goto __pyx_L16;
    }

    /* "pyqcstrc/icosah/mics.pyx":3121
 *                 pass
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if len(tmp1b)!=1:
 *         tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 */
    /*else*/ {
    }
    __pyx_L16:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3122
 *         else:
 *             pass
 *     if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *         tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         # obj2obj2
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3122, __pyx_L1_error)
  __pyx_t_17 = ((__pyx_t_10 != 1) != 0);
  if (__pyx_t_17) {

    /* "pyqcstrc/icosah/mics.pyx":3123
 *             pass
 *     if len(tmp1b)!=1:
 *         tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         # obj2obj2
 *         # obj2
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3123, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_11)) {
      PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_11)) {
      PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_t_4, __pyx_int_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_4);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_6, __pyx_int_3);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __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, 3123, __pyx_L1_error)
    __pyx_t_21 = ((PyArrayObject *)__pyx_t_2);
    {
      __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_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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, 3123, __pyx_L1_error)
    }
    __pyx_t_21 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3126
 *         # obj2obj2
 *         # obj2
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj1)):
 *             for i2 in range(len(tmp4a)):
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3127
 *         # obj2
 *         counter1=0
 *         for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *             for i2 in range(len(tmp4a)):
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)
 */
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3127, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_10;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
      __pyx_v_i1 = __pyx_t_6;

      /* "pyqcstrc/icosah/mics.pyx":3128
 *         counter1=0
 *         for i1 in range(len(obj1)):
 *             for i2 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3128, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_13;
      for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
        __pyx_v_i2 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":3129
 *         for i1 in range(len(obj1)):
 *             for i2 in range(len(tmp4a)):
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)             # <<<<<<<<<<<<<<
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     if counter1==0:
 */
        __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3129, __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, 3129, __pyx_L1_error)
        __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3129, __pyx_L1_error)
        __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_11), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3129, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
          __pyx_t_19 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
          if (unlikely(__pyx_t_19 < 0)) {
            PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
          if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 3129, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3130
 *             for i2 in range(len(tmp4a)):
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         tmp1c=tmp4c.reshape(len(tmp4c)*72)
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3130, __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_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_2);
        PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 3130, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3131
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         tmp1c=tmp4c.reshape(len(tmp4c)*72)
 *                     else:
 */
          __pyx_t_17 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_17) {

            /* "pyqcstrc/icosah/mics.pyx":3132
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     if counter1==0:
 *                         tmp1c=tmp4c.reshape(len(tmp4c)*72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1c=np.append(tmp1c,tmp4c)
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3132, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3132, __pyx_L1_error)
            __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_18 * 72)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = NULL;
            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_11 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_11)) __PYX_ERR(0, 3132, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1c, __pyx_t_11);
            __pyx_t_11 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3131
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         tmp1c=tmp4c.reshape(len(tmp4c)*72)
 *                     else:
 */
            goto __pyx_L32;
          }

          /* "pyqcstrc/icosah/mics.pyx":3134
 *                         tmp1c=tmp4c.reshape(len(tmp4c)*72)
 *                     else:
 *                         tmp1c=np.append(tmp1c,tmp4c)             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                 else:
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3134, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_v_tmp1c)) { __Pyx_RaiseUnboundLocalError("tmp1c"); __PYX_ERR(0, 3134, __pyx_L1_error) }
            __pyx_t_2 = NULL;
            __pyx_t_19 = 0;
            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_19 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_3)) {
              PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_tmp1c, ((PyObject *)__pyx_v_tmp4c)};
              __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3134, __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_3)) {
              PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_tmp1c, ((PyObject *)__pyx_v_tmp4c)};
              __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3134, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_GOTREF(__pyx_t_11);
            } else
            #endif
            {
              __pyx_t_4 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3134, __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(__pyx_v_tmp1c);
              __Pyx_GIVEREF(__pyx_v_tmp1c);
              PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_19, __pyx_v_tmp1c);
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp4c));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4c));
              PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_19, ((PyObject *)__pyx_v_tmp4c));
              __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3134, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1c, __pyx_t_11);
            __pyx_t_11 = 0;
          }
          __pyx_L32:;

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

          /* "pyqcstrc/icosah/mics.pyx":3130
 *             for i2 in range(len(tmp4a)):
 *                 tmp4c=intersection_two_tetrahedron_4(obj1[i1],tmp4a[i2],verbose-1)
 *                 if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         tmp1c=tmp4c.reshape(len(tmp4c)*72)
 */
          goto __pyx_L31;
        }

        /* "pyqcstrc/icosah/mics.pyx":3137
 *                     counter1+=1
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *         tmp1c=np.append(tmp4a,tmp1c)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 */
        /*else*/ {
        }
        __pyx_L31:;
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":3138
 *                 else:
 *                     pass
 *         tmp1c=np.append(tmp4a,tmp1c)             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3138, __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, 3138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_v_tmp1c)) { __Pyx_RaiseUnboundLocalError("tmp1c"); __PYX_ERR(0, 3138, __pyx_L1_error) }
    __pyx_t_3 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp4a), __pyx_v_tmp1c};
      __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3138, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_11);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp4a), __pyx_v_tmp1c};
      __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3138, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_11);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3138, __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_tmp4a));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4a));
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, ((PyObject *)__pyx_v_tmp4a));
      __Pyx_INCREF(__pyx_v_tmp1c);
      __Pyx_GIVEREF(__pyx_v_tmp1c);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_tmp1c);
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp1c, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3139
 *                     pass
 *         tmp1c=np.append(tmp4a,tmp1c)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         tmp1a=np.array([0])
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmp1c, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = PyObject_Length(__pyx_v_tmp1c); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3139, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3139, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3139, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3139, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_11), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_6 < 0)) __PYX_ERR(0, 3139, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3140
 *         tmp1c=np.append(tmp4a,tmp1c)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         counter1=0
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 3140, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3141
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         counter1=0
 *         for i2 in range(len(tmp4a)):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3141, __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_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3141, __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, 3141, __pyx_L1_error)
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
    {
      __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_4mics_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_4mics_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, 3141, __pyx_L1_error)
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3142
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         tmp1a=np.array([0])
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i2 in range(len(tmp4a)):
 *             counter2=0
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3143
 *         tmp1a=np.array([0])
 *         counter1=0
 *         for i2 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *             counter2=0
 *             for i3 in range(4) :
 */
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3143, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_10;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
      __pyx_v_i2 = __pyx_t_6;

      /* "pyqcstrc/icosah/mics.pyx":3144
 *         counter1=0
 *         for i2 in range(len(tmp4a)):
 *             counter2=0             # <<<<<<<<<<<<<<
 *             for i3 in range(4) :
 *                 for i4 in range(len(obj2)):
 */
      __pyx_v_counter2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3145
 *         for i2 in range(len(tmp4a)):
 *             counter2=0
 *             for i3 in range(4) :             # <<<<<<<<<<<<<<
 *                 for i4 in range(len(obj2)):
 *                     flag=inside_outside_tetrahedron(tmp4a[i2][i3],obj2[i4][0],obj2[i4][1],obj2[i4][2],obj2[i4][3])
 */
      for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) {
        __pyx_v_i3 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":3146
 *             counter2=0
 *             for i3 in range(4) :
 *                 for i4 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                     flag=inside_outside_tetrahedron(tmp4a[i2][i3],obj2[i4][0],obj2[i4][1],obj2[i4][2],obj2[i4][3])
 *                     if flag==0: # inside
 */
        __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3146, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_13;
        for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_14; __pyx_t_18+=1) {
          __pyx_v_i4 = __pyx_t_18;

          /* "pyqcstrc/icosah/mics.pyx":3147
 *             for i3 in range(4) :
 *                 for i4 in range(len(obj2)):
 *                     flag=inside_outside_tetrahedron(tmp4a[i2][i3],obj2[i4][0],obj2[i4][1],obj2[i4][2],obj2[i4][3])             # <<<<<<<<<<<<<<
 *                     if flag==0: # inside
 *                         counter2+=1
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3147, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3147, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3147, __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, 3147, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3147, __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, 3147, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3147, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3147, __pyx_L1_error)
          __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_16), 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3148
 *                 for i4 in range(len(obj2)):
 *                     flag=inside_outside_tetrahedron(tmp4a[i2][i3],obj2[i4][0],obj2[i4][1],obj2[i4][2],obj2[i4][3])
 *                     if flag==0: # inside             # <<<<<<<<<<<<<<
 *                         counter2+=1
 *                         break
 */
          __pyx_t_17 = ((__pyx_v_flag == 0) != 0);
          if (__pyx_t_17) {

            /* "pyqcstrc/icosah/mics.pyx":3149
 *                     flag=inside_outside_tetrahedron(tmp4a[i2][i3],obj2[i4][0],obj2[i4][1],obj2[i4][2],obj2[i4][3])
 *                     if flag==0: # inside
 *                         counter2+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter2 = (__pyx_v_counter2 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3150
 *                     if flag==0: # inside
 *                         counter2+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L38_break;

            /* "pyqcstrc/icosah/mics.pyx":3148
 *                 for i4 in range(len(obj2)):
 *                     flag=inside_outside_tetrahedron(tmp4a[i2][i3],obj2[i4][0],obj2[i4][1],obj2[i4][2],obj2[i4][3])
 *                     if flag==0: # inside             # <<<<<<<<<<<<<<
 *                         counter2+=1
 *                         break
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":3152
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *             if counter2==4:
 *                 # geometric center, centroid of the tetrahedron, tmp2c
 */
          /*else*/ {
          }
        }
        __pyx_L38_break:;
      }

      /* "pyqcstrc/icosah/mics.pyx":3153
 *                     else:
 *                         pass
 *             if counter2==4:             # <<<<<<<<<<<<<<
 *                 # geometric center, centroid of the tetrahedron, tmp2c
 *                 tmp2a=centroid(tmp4a[i2])
 */
      __pyx_t_17 = ((__pyx_v_counter2 == 4) != 0);
      if (__pyx_t_17) {

        /* "pyqcstrc/icosah/mics.pyx":3155
 *             if counter2==4:
 *                 # geometric center, centroid of the tetrahedron, tmp2c
 *                 tmp2a=centroid(tmp4a[i2])             # <<<<<<<<<<<<<<
 *                 for i5 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 */
        __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3155, __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, 3155, __pyx_L1_error)
        __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_16), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3155, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3156
 *                 # geometric center, centroid of the tetrahedron, tmp2c
 *                 tmp2a=centroid(tmp4a[i2])
 *                 for i5 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                     flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                     if flag1==0: # inside
 */
        __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3156, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_13;
        for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_14; __pyx_t_18+=1) {
          __pyx_v_i5 = __pyx_t_18;

          /* "pyqcstrc/icosah/mics.pyx":3157
 *                 tmp2a=centroid(tmp4a[i2])
 *                 for i5 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])             # <<<<<<<<<<<<<<
 *                     if flag1==0: # inside
 *                         counter3+=1
 */
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3157, __pyx_L1_error)
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3157, __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, 3157, __pyx_L1_error)
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3157, __pyx_L1_error)
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __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, 3157, __pyx_L1_error)
          __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_1), 0);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3158
 *                 for i5 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                     if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                         counter3+=1
 *                         break
 */
          __pyx_t_17 = ((__pyx_v_flag1 == 0) != 0);
          if (__pyx_t_17) {

            /* "pyqcstrc/icosah/mics.pyx":3159
 *                     flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                     if flag1==0: # inside
 *                         counter3+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter3 = (__pyx_v_counter3 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3160
 *                     if flag1==0: # inside
 *                         counter3+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L42_break;

            /* "pyqcstrc/icosah/mics.pyx":3158
 *                 for i5 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                     if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                         counter3+=1
 *                         break
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":3162
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter3==0:
 *                     if counter1==0:
 */
          /*else*/ {
          }
        }
        __pyx_L42_break:;

        /* "pyqcstrc/icosah/mics.pyx":3163
 *                     else:
 *                         pass
 *                 if counter3==0:             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         tmp1a=tmp4a[i2].reshape(72)
 */
        __pyx_t_17 = ((__pyx_v_counter3 == 0) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3164
 *                         pass
 *                 if counter3==0:
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         tmp1a=tmp4a[i2].reshape(72)
 *                     else:
 */
          __pyx_t_17 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_17) {

            /* "pyqcstrc/icosah/mics.pyx":3165
 *                 if counter3==0:
 *                     if counter1==0:
 *                         tmp1a=tmp4a[i2].reshape(72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4a[i2])
 */
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3165, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3165, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
              }
            }
            __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_72);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3165, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3165, __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_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3165, __pyx_L1_error)
            }
            __pyx_t_5 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
            __pyx_t_1 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3164
 *                         pass
 *                 if counter3==0:
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         tmp1a=tmp4a[i2].reshape(72)
 *                     else:
 */
            goto __pyx_L45;
          }

          /* "pyqcstrc/icosah/mics.pyx":3167
 *                         tmp1a=tmp4a[i2].reshape(72)
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4a[i2])             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                 else:
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3167, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_16 = NULL;
            __pyx_t_15 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_16)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_16);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_15 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_11)) {
              PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
              __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3167, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
              PyObject *__pyx_temp[3] = {__pyx_t_16, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
              __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3167, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            } else
            #endif
            {
              __pyx_t_3 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3167, __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_15, ((PyObject *)__pyx_v_tmp1a));
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_15, __pyx_t_2);
              __pyx_t_2 = 0;
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3167, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3167, __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_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3167, __pyx_L1_error)
            }
            __pyx_t_5 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
            __pyx_t_1 = 0;
          }
          __pyx_L45:;

          /* "pyqcstrc/icosah/mics.pyx":3168
 *                     else:
 *                         tmp1a=np.append(tmp1a,tmp4a[i2])
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3163
 *                     else:
 *                         pass
 *                 if counter3==0:             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         tmp1a=tmp4a[i2].reshape(72)
 */
          goto __pyx_L44;
        }

        /* "pyqcstrc/icosah/mics.pyx":3170
 *                     counter1+=1
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             else:
 *                 if counter1==0:
 */
        /*else*/ {
        }
        __pyx_L44:;

        /* "pyqcstrc/icosah/mics.pyx":3153
 *                     else:
 *                         pass
 *             if counter2==4:             # <<<<<<<<<<<<<<
 *                 # geometric center, centroid of the tetrahedron, tmp2c
 *                 tmp2a=centroid(tmp4a[i2])
 */
        goto __pyx_L40;
      }

      /* "pyqcstrc/icosah/mics.pyx":3172
 *                     pass
 *             else:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp4a[i2].reshape(72)
 *                 else:
 */
      /*else*/ {
        __pyx_t_17 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3173
 *             else:
 *                 if counter1==0:
 *                     tmp1a=tmp4a[i2].reshape(72)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a[i2])
 */
          __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_11, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3173, __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, 3173, __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_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3173, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3172
 *                     pass
 *             else:
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp4a[i2].reshape(72)
 *                 else:
 */
          goto __pyx_L46;
        }

        /* "pyqcstrc/icosah/mics.pyx":3175
 *                     tmp1a=tmp4a[i2].reshape(72)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a[i2])             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *         # obj2obj3
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          } else
          #endif
          {
            __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3175, __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_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3175, __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_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3175, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;
        }
        __pyx_L46:;

        /* "pyqcstrc/icosah/mics.pyx":3176
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a[i2])
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *         # obj2obj3
 *         #
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);
      }
      __pyx_L40:;
    }

    /* "pyqcstrc/icosah/mics.pyx":3180
 *         #
 *         # obj1 not obj 2
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             tmp1b=np.array([0])
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
    __pyx_t_17 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_17) {

      /* "pyqcstrc/icosah/mics.pyx":3181
 *         # obj1 not obj 2
 *         if counter1!=0:
 *             tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             for i3 in range(len(tmp4a)):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3181, __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_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_3, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3181, __pyx_L1_error)
      __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
        __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3181, __pyx_L1_error)
      }
      __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3182
 *         if counter1!=0:
 *             tmp1b=np.array([0])
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             for i3 in range(len(tmp4a)):
 *                 tmp1c=np.array([0])
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3182, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      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_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_16)) {
        PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_11, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
        PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_11, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3182, __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_11);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_11);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_6, __pyx_int_3);
        __pyx_t_11 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3182, __pyx_L1_error)
      __pyx_t_21 = ((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_21, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 3182, __pyx_L1_error)
      }
      __pyx_t_21 = 0;
      __Pyx_DECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3183
 *             tmp1b=np.array([0])
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             for i3 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                 tmp1c=np.array([0])
 *                 for i4 in range(len(obj3)):
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3183, __pyx_L1_error)
      __pyx_t_12 = __pyx_t_10;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
        __pyx_v_i3 = __pyx_t_6;

        /* "pyqcstrc/icosah/mics.pyx":3184
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             for i3 in range(len(tmp4a)):
 *                 tmp1c=np.array([0])             # <<<<<<<<<<<<<<
 *                 for i4 in range(len(obj3)):
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_0);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_16);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1c, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3185
 *             for i3 in range(len(tmp4a)):
 *                 tmp1c=np.array([0])
 *                 for i4 in range(len(obj3)):             # <<<<<<<<<<<<<<
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)
 *                     if tmp4c.tolist()!=[[[[0]]]]:
 */
        __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj3)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3185, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_13;
        for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_14; __pyx_t_18+=1) {
          __pyx_v_i4 = __pyx_t_18;

          /* "pyqcstrc/icosah/mics.pyx":3186
 *                 tmp1c=np.array([0])
 *                 for i4 in range(len(obj3)):
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)             # <<<<<<<<<<<<<<
 *                     if tmp4c.tolist()!=[[[[0]]]]:
 *                         if len(tmp1c)==1:
 */
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3186, __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, 3186, __pyx_L1_error)
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3186, __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, 3186, __pyx_L1_error)
          __pyx_t_16 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3186, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4c.diminfo[0].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp4c.diminfo[0].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp4c.diminfo[1].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp4c.diminfo[1].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp4c.diminfo[2].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp4c.diminfo[2].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_tmp4c.diminfo[3].strides = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_tmp4c.diminfo[3].shape = __pyx_pybuffernd_tmp4c.rcbuffer->pybuffer.shape[3];
            if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 3186, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp4c, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3187
 *                 for i4 in range(len(obj3)):
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)
 *                     if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                         if len(tmp1c)==1:
 *                             tmp1c=tmp4c.reshape(len(tmp4c)*72)
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_16 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_1);
          PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2);
          PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_16, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 3187, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_17) {

            /* "pyqcstrc/icosah/mics.pyx":3188
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)
 *                     if tmp4c.tolist()!=[[[[0]]]]:
 *                         if len(tmp1c)==1:             # <<<<<<<<<<<<<<
 *                             tmp1c=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 */
            __pyx_t_20 = PyObject_Length(__pyx_v_tmp1c); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3188, __pyx_L1_error)
            __pyx_t_17 = ((__pyx_t_20 == 1) != 0);
            if (__pyx_t_17) {

              /* "pyqcstrc/icosah/mics.pyx":3189
 *                     if tmp4c.tolist()!=[[[[0]]]]:
 *                         if len(tmp1c)==1:
 *                             tmp1c=tmp4c.reshape(len(tmp4c)*72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1c=np.append(tmp1c,tmp4c)
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3189, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3189, __pyx_L1_error)
              __pyx_t_16 = PyInt_FromSsize_t((__pyx_t_20 * 72)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3189, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_11 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                }
              }
              __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_16);
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3189, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1c, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3188
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)
 *                     if tmp4c.tolist()!=[[[[0]]]]:
 *                         if len(tmp1c)==1:             # <<<<<<<<<<<<<<
 *                             tmp1c=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 */
              goto __pyx_L53;
            }

            /* "pyqcstrc/icosah/mics.pyx":3191
 *                             tmp1c=tmp4c.reshape(len(tmp4c)*72)
 *                         else:
 *                             tmp1c=np.append(tmp1c,tmp4c)             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3191, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3191, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = NULL;
              __pyx_t_15 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_16, function);
                  __pyx_t_15 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_16)) {
                PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_tmp1c, ((PyObject *)__pyx_v_tmp4c)};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3191, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_1, __pyx_v_tmp1c, ((PyObject *)__pyx_v_tmp4c)};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3191, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_GOTREF(__pyx_t_2);
              } else
              #endif
              {
                __pyx_t_11 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3191, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                if (__pyx_t_1) {
                  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
                }
                __Pyx_INCREF(__pyx_v_tmp1c);
                __Pyx_GIVEREF(__pyx_v_tmp1c);
                PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_15, __pyx_v_tmp1c);
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp4c));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp4c));
                PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_15, ((PyObject *)__pyx_v_tmp4c));
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3191, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1c, __pyx_t_2);
              __pyx_t_2 = 0;
            }
            __pyx_L53:;

            /* "pyqcstrc/icosah/mics.pyx":3187
 *                 for i4 in range(len(obj3)):
 *                     tmp4c=intersection_two_tetrahedron_4(tmp4a[i3],obj3[i4],verbose-1)
 *                     if tmp4c.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                         if len(tmp1c)==1:
 *                             tmp1c=tmp4c.reshape(len(tmp4c)*72)
 */
            goto __pyx_L52;
          }

          /* "pyqcstrc/icosah/mics.pyx":3193
 *                             tmp1c=np.append(tmp1c,tmp4c)
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if len(tmp1c)!=1:
 *                     tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 */
          /*else*/ {
          }
          __pyx_L52:;
        }

        /* "pyqcstrc/icosah/mics.pyx":3194
 *                     else:
 *                         pass
 *                 if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *                     tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *                     tmp4b=tetrahedralization(tmp4a[i3],tmp3a,verbose-1)
 */
        __pyx_t_13 = PyObject_Length(__pyx_v_tmp1c); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3194, __pyx_L1_error)
        __pyx_t_17 = ((__pyx_t_13 != 1) != 0);
        if (__pyx_t_17) {

          /* "pyqcstrc/icosah/mics.pyx":3195
 *                         pass
 *                 if len(tmp1c)!=1:
 *                     tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))             # <<<<<<<<<<<<<<
 *                     tmp4b=tetrahedralization(tmp4a[i3],tmp3a,verbose-1)
 *                     for i4 in range(len(tmp4b)):
 */
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmp1c, __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_13 = PyObject_Length(__pyx_v_tmp1c); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3195, __pyx_L1_error)
          __pyx_t_11 = __Pyx_PyInt_FromDouble((((double)__pyx_t_13) / 18.0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_1 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_16, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_16)) {
            PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_11, __pyx_int_6, __pyx_int_3};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
            PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_11, __pyx_int_6, __pyx_int_3};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_1) {
              __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_11);
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_15, __pyx_t_11);
            __Pyx_INCREF(__pyx_int_6);
            __Pyx_GIVEREF(__pyx_int_6);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_15, __pyx_int_6);
            __Pyx_INCREF(__pyx_int_3);
            __Pyx_GIVEREF(__pyx_int_3);
            PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_15, __pyx_int_3);
            __pyx_t_11 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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, 3195, __pyx_L1_error)
          __pyx_t_16 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_2), 0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3195, __pyx_L1_error)
          }
          __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_16));
          __pyx_t_16 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3196
 *                 if len(tmp1c)!=1:
 *                     tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *                     tmp4b=tetrahedralization(tmp4a[i3],tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 *                     for i4 in range(len(tmp4b)):
 *                         tmp2a=centroid(tmp4b[i4])
 */
          __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3196, __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, 3196, __pyx_L1_error)
          __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization(((PyArrayObject *)__pyx_t_16), ((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3196, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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_15 < 0)) __PYX_ERR(0, 3196, __pyx_L1_error)
          }
          __Pyx_DECREF_SET(__pyx_v_tmp4b, ((PyArrayObject *)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3197
 *                     tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *                     tmp4b=tetrahedralization(tmp4a[i3],tmp3a,verbose-1)
 *                     for i4 in range(len(tmp4b)):             # <<<<<<<<<<<<<<
 *                         tmp2a=centroid(tmp4b[i4])
 *                         counter3=0
 */
          __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3197, __pyx_L1_error)
          __pyx_t_14 = __pyx_t_13;
          for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_14; __pyx_t_18+=1) {
            __pyx_v_i4 = __pyx_t_18;

            /* "pyqcstrc/icosah/mics.pyx":3198
 *                     tmp4b=tetrahedralization(tmp4a[i3],tmp3a,verbose-1)
 *                     for i4 in range(len(tmp4b)):
 *                         tmp2a=centroid(tmp4b[i4])             # <<<<<<<<<<<<<<
 *                         counter3=0
 *                         for i5 in range(len(obj2)):
 */
            __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4b), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3198, __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, 3198, __pyx_L1_error)
            __pyx_t_16 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_2), 0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3198, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
              __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_16), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
              if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3198, __pyx_L1_error)
            }
            __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_16));
            __pyx_t_16 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3199
 *                     for i4 in range(len(tmp4b)):
 *                         tmp2a=centroid(tmp4b[i4])
 *                         counter3=0             # <<<<<<<<<<<<<<
 *                         for i5 in range(len(obj2)):
 *                             flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 */
            __pyx_v_counter3 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3200
 *                         tmp2a=centroid(tmp4b[i4])
 *                         counter3=0
 *                         for i5 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                             flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                             if flag1==0: # inside
 */
            __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3200, __pyx_L1_error)
            __pyx_t_22 = __pyx_t_20;
            for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
              __pyx_v_i5 = __pyx_t_23;

              /* "pyqcstrc/icosah/mics.pyx":3201
 *                         counter3=0
 *                         for i5 in range(len(obj2)):
 *                             flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])             # <<<<<<<<<<<<<<
 *                             if flag1==0: # inside
 *                                 counter3+=1
 */
              __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_16, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3201, __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, 3201, __pyx_L1_error)
              __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_16, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3201, __pyx_L1_error)
              __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_16, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3201, __pyx_L1_error)
              __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_16);
              __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_16, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3201, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3201, __pyx_L1_error)
              __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_1), 0);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3202
 *                         for i5 in range(len(obj2)):
 *                             flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                             if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                                 counter3+=1
 *                                 break
 */
              __pyx_t_17 = ((__pyx_v_flag1 == 0) != 0);
              if (__pyx_t_17) {

                /* "pyqcstrc/icosah/mics.pyx":3203
 *                             flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                             if flag1==0: # inside
 *                                 counter3+=1             # <<<<<<<<<<<<<<
 *                                 break
 *                             else:
 */
                __pyx_v_counter3 = (__pyx_v_counter3 + 1);

                /* "pyqcstrc/icosah/mics.pyx":3204
 *                             if flag1==0: # inside
 *                                 counter3+=1
 *                                 break             # <<<<<<<<<<<<<<
 *                             else:
 *                                 pass
 */
                goto __pyx_L58_break;

                /* "pyqcstrc/icosah/mics.pyx":3202
 *                         for i5 in range(len(obj2)):
 *                             flag1=inside_outside_tetrahedron(tmp2a,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                             if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                                 counter3+=1
 *                                 break
 */
              }

              /* "pyqcstrc/icosah/mics.pyx":3206
 *                                 break
 *                             else:
 *                                 pass             # <<<<<<<<<<<<<<
 *                         if counter3==0:
 *                             if len(tmp1b)==1:
 */
              /*else*/ {
              }
            }
            __pyx_L58_break:;

            /* "pyqcstrc/icosah/mics.pyx":3207
 *                             else:
 *                                 pass
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             if len(tmp1b)==1:
 *                                 tmp1b=tmp4b[i4].reshape(72)
 */
            __pyx_t_17 = ((__pyx_v_counter3 == 0) != 0);
            if (__pyx_t_17) {

              /* "pyqcstrc/icosah/mics.pyx":3208
 *                                 pass
 *                         if counter3==0:
 *                             if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                                 tmp1b=tmp4b[i4].reshape(72)
 *                             else:
 */
              __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3208, __pyx_L1_error)
              __pyx_t_17 = ((__pyx_t_20 == 1) != 0);
              if (__pyx_t_17) {

                /* "pyqcstrc/icosah/mics.pyx":3209
 *                         if counter3==0:
 *                             if len(tmp1b)==1:
 *                                 tmp1b=tmp4b[i4].reshape(72)             # <<<<<<<<<<<<<<
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4b[i4])
 */
                __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4b), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3209, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3209, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __pyx_t_11 = NULL;
                if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_11)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_11);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                  }
                }
                __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_11, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3209, __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, 3209, __pyx_L1_error)
                __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                  __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_15 < 0)) {
                    PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3209, __pyx_L1_error)
                }
                __pyx_t_5 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_1));
                __pyx_t_1 = 0;

                /* "pyqcstrc/icosah/mics.pyx":3208
 *                                 pass
 *                         if counter3==0:
 *                             if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                                 tmp1b=tmp4b[i4].reshape(72)
 *                             else:
 */
                goto __pyx_L61;
              }

              /* "pyqcstrc/icosah/mics.pyx":3211
 *                                 tmp1b=tmp4b[i4].reshape(72)
 *                             else:
 *                                 tmp1b=np.append(tmp1b,tmp4b[i4])             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              /*else*/ {
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3211, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4b), __pyx_v_i4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_2 = NULL;
                __pyx_t_15 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_11, function);
                    __pyx_t_15 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_11)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), __pyx_t_3};
                  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1b), __pyx_t_3};
                  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                } else
                #endif
                {
                  __pyx_t_16 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3211, __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_tmp1b));
                  __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
                  PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1b));
                  __Pyx_GIVEREF(__pyx_t_3);
                  PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_15, __pyx_t_3);
                  __pyx_t_3 = 0;
                  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                }
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3211, __pyx_L1_error)
                __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
                {
                  __Pyx_BufFmt_StackElem __pyx_stack[1];
                  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
                  __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                  if (unlikely(__pyx_t_15 < 0)) {
                    PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
                    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3211, __pyx_L1_error)
                }
                __pyx_t_5 = 0;
                __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_1));
                __pyx_t_1 = 0;
              }
              __pyx_L61:;

              /* "pyqcstrc/icosah/mics.pyx":3207
 *                             else:
 *                                 pass
 *                         if counter3==0:             # <<<<<<<<<<<<<<
 *                             if len(tmp1b)==1:
 *                                 tmp1b=tmp4b[i4].reshape(72)
 */
              goto __pyx_L60;
            }

            /* "pyqcstrc/icosah/mics.pyx":3213
 *                                 tmp1b=np.append(tmp1b,tmp4b[i4])
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
            /*else*/ {
            }
            __pyx_L60:;
          }

          /* "pyqcstrc/icosah/mics.pyx":3194
 *                     else:
 *                         pass
 *                 if len(tmp1c)!=1:             # <<<<<<<<<<<<<<
 *                     tmp3a=remove_doubling_dim3_in_perp_space(tmp1c.reshape(int(len(tmp1c)/18),6,3))
 *                     tmp4b=tetrahedralization(tmp4a[i3],tmp3a,verbose-1)
 */
          goto __pyx_L54;
        }

        /* "pyqcstrc/icosah/mics.pyx":3215
 *                             pass
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if len(tmp1b)!=1:
 *                 return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 */
        /*else*/ {
        }
        __pyx_L54:;
      }

      /* "pyqcstrc/icosah/mics.pyx":3216
 *                 else:
 *                     pass
 *             if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *                 return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             else:
 */
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3216, __pyx_L1_error)
      __pyx_t_17 = ((__pyx_t_10 != 1) != 0);
      if (__pyx_t_17) {

        /* "pyqcstrc/icosah/mics.pyx":3217
 *                     pass
 *             if len(tmp1b)!=1:
 *                 return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             else:
 *                 return np.array([[[[0]]]])
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3217, __pyx_L1_error)
        __pyx_t_16 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_3 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_11)) {
          PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_16, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3217, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
          PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_16, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3217, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3217, __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_16);
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_16);
          __Pyx_INCREF(__pyx_int_4);
          __Pyx_GIVEREF(__pyx_int_4);
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_int_4);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_6, __pyx_int_3);
          __pyx_t_16 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3217, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3217, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":3216
 *                 else:
 *                     pass
 *             if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *                 return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             else:
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3219
 *                 return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *             else:
 *                 return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[[0]]]])
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3219, __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_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_16);
        PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_16);
        __pyx_t_16 = 0;
        __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_11);
        PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
          }
        }
        __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_16);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3219, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }

      /* "pyqcstrc/icosah/mics.pyx":3180
 *         #
 *         # obj1 not obj 2
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             tmp1b=np.array([0])
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3221
 *                 return np.array([[[[0]]]])
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[[0]]]])
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __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 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      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_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3221, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":3122
 *         else:
 *             pass
 *     if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *         tmp4a=tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         # obj2obj2
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3223
 *             return np.array([[[[0]]]])
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * # working
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_0);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3223, __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, 3223, __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, 3223, __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 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    __pyx_t_1 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_16, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3223, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":3035
 * 
 * # working
 * cpdef np.ndarray object_subtraction_dev(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

  /* 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_11);
  __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_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.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_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev", __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_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.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_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4c.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XDECREF(__pyx_v_tmp1c);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_21object_subtraction_dev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_21object_subtraction_dev(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  PyArrayObject *__pyx_v_obj3 = 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("object_subtraction_dev (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_obj3,&__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_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("object_subtraction_dev", 1, 4, 4, 1); __PYX_ERR(0, 3035, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("object_subtraction_dev", 1, 4, 4, 2); __PYX_ERR(0, 3035, __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("object_subtraction_dev", 1, 4, 4, 3); __PYX_ERR(0, 3035, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction_dev") < 0)) __PYX_ERR(0, 3035, __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_obj3 = ((PyArrayObject *)values[2]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3038, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction_dev", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3035, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev", __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, 3035, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 3036, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj3), __pyx_ptype_5numpy_ndarray, 1, "obj3", 0))) __PYX_ERR(0, 3037, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_20object_subtraction_dev(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_obj3, __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_4mics_20object_subtraction_dev(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, 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;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  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("object_subtraction_dev", 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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3035, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3035, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3035, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_obj3), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3035, __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev", __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":3226
 * 
 * # working
 * cpdef np.ndarray object_subtraction_dev2(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_23object_subtraction_dev2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev2(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_flag;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_vertx_obj2 = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp4b = 0;
  PyArrayObject *__pyx_v_surface_obj3 = 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_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_surface_obj3;
  __Pyx_Buffer __pyx_pybuffer_surface_obj3;
  __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_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __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_tmp4b;
  __Pyx_Buffer __pyx_pybuffer_tmp4b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertx_obj2;
  __Pyx_Buffer __pyx_pybuffer_vertx_obj2;
  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;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction_dev2", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __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_vertx_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_vertx_obj2.refcount = 0;
  __pyx_pybuffernd_vertx_obj2.data = NULL;
  __pyx_pybuffernd_vertx_obj2.rcbuffer = &__pyx_pybuffer_vertx_obj2;
  __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_surface_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_surface_obj3.refcount = 0;
  __pyx_pybuffernd_surface_obj3.data = NULL;
  __pyx_pybuffernd_surface_obj3.rcbuffer = &__pyx_pybuffer_surface_obj3;
  __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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3226, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3226, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3226, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":3242
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] surface_obj3
 * 
 *     print(' object_subtraction_dev2()')             # <<<<<<<<<<<<<<
 * 
 *     #if verbose==1:
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3252
 *     #    pass
 * 
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 *     #tmp4b=generator_surface(obj2)
 *     tmp4b=generator_surface_1(obj2,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3252, __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, 3252, __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, 3252, __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, 3252, __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, 3252, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3252, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3254
 *     tmp1b=np.array([0])
 *     #tmp4b=generator_surface(obj2)
 *     tmp4b=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2
 *     #surface_obj3=generator_surface(obj3) # surface of obj3
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3254, __pyx_L1_error)
  }
  __pyx_v_tmp4b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3255
 *     #tmp4b=generator_surface(obj2)
 *     tmp4b=generator_surface_1(obj2,verbose-1)
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2             # <<<<<<<<<<<<<<
 *     #surface_obj3=generator_surface(obj3) # surface of obj3
 *     surface_obj3=generator_surface_1(obj3,verbose-1)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3255, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_10 * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3255, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_6, __pyx_int_3};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3255, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3255, __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_2);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_int_3);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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, 3255, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_vertx_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertx_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_vertx_obj2.diminfo[0].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertx_obj2.diminfo[0].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertx_obj2.diminfo[1].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertx_obj2.diminfo[1].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vertx_obj2.diminfo[2].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vertx_obj2.diminfo[2].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3255, __pyx_L1_error)
  }
  __pyx_v_vertx_obj2 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3257
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp4b.reshape(len(tmp4b)*3,6,3)) # vertices of obj2
 *     #surface_obj3=generator_surface(obj3) # surface of obj3
 *     surface_obj3=generator_surface_1(obj3,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *     # get vertices of obj2 which on the surface of obj3
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj3), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_surface_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_surface_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_surface_obj3.diminfo[0].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surface_obj3.diminfo[0].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_surface_obj3.diminfo[1].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_surface_obj3.diminfo[1].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_surface_obj3.diminfo[2].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_surface_obj3.diminfo[2].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_surface_obj3.diminfo[3].strides = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_surface_obj3.diminfo[3].shape = __pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer.shape[3];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3257, __pyx_L1_error)
  }
  __pyx_v_surface_obj3 = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3260
 * 
 *     # get vertices of obj2 which on the surface of obj3
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     counter2=0
 *     for i2 in range(len(vertx_obj2)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_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_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
    }
  }
  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3260, __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_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 3260, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3261
 *     # get vertices of obj2 which on the surface of obj3
 *     tmp1a=np.array([0])
 *     counter2=0             # <<<<<<<<<<<<<<
 *     for i2 in range(len(vertx_obj2)):
 *         counter1=0
 */
  __pyx_v_counter2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3262
 *     tmp1a=np.array([0])
 *     counter2=0
 *     for i2 in range(len(vertx_obj2)):             # <<<<<<<<<<<<<<
 *         counter1=0
 *         for i3 in range(len(surface_obj3)):
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_vertx_obj2)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3262, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_10;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i2 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":3263
 *     counter2=0
 *     for i2 in range(len(vertx_obj2)):
 *         counter1=0             # <<<<<<<<<<<<<<
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 */
    __pyx_v_counter1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3264
 *     for i2 in range(len(vertx_obj2)):
 *         counter1=0
 *         for i3 in range(len(surface_obj3)):             # <<<<<<<<<<<<<<
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_surface_obj3)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3264, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i3 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":3265
 *         counter1=0
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])             # <<<<<<<<<<<<<<
 *             if flag==0: # on
 *                 counter1+=1
 */
      __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __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, 3265, __pyx_L1_error)
      __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_surface_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3265, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_4mics_on_out_surface(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_11));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3266
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 break
 */
      __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":3267
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":3268
 *             if flag==0: # on
 *                 counter1+=1
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L6_break;

        /* "pyqcstrc/icosah/mics.pyx":3266
 *         for i3 in range(len(surface_obj3)):
 *             flag=on_out_surface(vertx_obj2[i2],surface_obj3[i3])
 *             if flag==0: # on             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *                 break
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3270
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if counter1!=0:
 *             if counter2==0:
 */
      /*else*/ {
      }
    }
    __pyx_L6_break:;

    /* "pyqcstrc/icosah/mics.pyx":3271
 *             else:
 *                 pass
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 */
    __pyx_t_16 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_16) {

      /* "pyqcstrc/icosah/mics.pyx":3272
 *                 pass
 *         if counter1!=0:
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 *             else:
 */
      __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":3273
 *         if counter1!=0:
 *             if counter2==0:
 *                 tmp1a=vertx_obj2[i2].reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,vertx_obj2[i2])
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_11 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3273, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_11);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3273, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_11));
        __pyx_t_11 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3272
 *                 pass
 *         if counter1!=0:
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 *             else:
 */
        goto __pyx_L9;
      }

      /* "pyqcstrc/icosah/mics.pyx":3275
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 *             else:
 *                 tmp1a=np.append(tmp1a,vertx_obj2[i2])             # <<<<<<<<<<<<<<
 *             counter2+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        __pyx_t_15 = 0;
        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_15 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_1};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3275, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_1};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3275, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3275, __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_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_15, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3275, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_11);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3275, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_11));
        __pyx_t_11 = 0;
      }
      __pyx_L9:;

      /* "pyqcstrc/icosah/mics.pyx":3276
 *             else:
 *                 tmp1a=np.append(tmp1a,vertx_obj2[i2])
 *             counter2+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter2 = (__pyx_v_counter2 + 1);

      /* "pyqcstrc/icosah/mics.pyx":3271
 *             else:
 *                 pass
 *         if counter1!=0:             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1a=vertx_obj2[i2].reshape(18)
 */
      goto __pyx_L8;
    }

    /* "pyqcstrc/icosah/mics.pyx":3278
 *             counter2+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 * 
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3)) # vertices of obj2
 */
    /*else*/ {
    }
    __pyx_L8:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3280
 *             pass
 * 
 *     vertx_obj2=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3)) # vertices of obj2             # <<<<<<<<<<<<<<
 *     #print 'len(vertx_obj2)=',len(vertx_obj2)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3280, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 18.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __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[4] = {__pyx_t_1, __pyx_t_4, __pyx_int_6, __pyx_int_3};
    __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_4);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_int_3);
    __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3280, __pyx_L1_error)
  __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_11), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_vertx_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertx_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_vertx_obj2.diminfo[0].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertx_obj2.diminfo[0].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertx_obj2.diminfo[1].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertx_obj2.diminfo[1].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vertx_obj2.diminfo[2].strides = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vertx_obj2.diminfo[2].shape = __pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3280, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_vertx_obj2, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3284
 * 
 *     # get vertices of obj1 which are NOT inside obj3
 *     counter2=0             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1)):
 *         for i2 in range(4):
 */
  __pyx_v_counter2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3285
 *     # get vertices of obj1 which are NOT inside obj3
 *     counter2=0
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *         for i2 in range(4):
 *             counter1=0
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3285, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_10;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":3286
 *     counter2=0
 *     for i1 in range(len(obj1)):
 *         for i2 in range(4):             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i3 in range(len(obj3)):
 */
    for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":3287
 *     for i1 in range(len(obj1)):
 *         for i2 in range(4):
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3288
 *         for i2 in range(4):
 *             counter1=0
 *             for i3 in range(len(obj3)):             # <<<<<<<<<<<<<<
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj3)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3288, __pyx_L1_error)
      __pyx_t_14 = __pyx_t_13;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_14; __pyx_t_17+=1) {
        __pyx_v_i3 = __pyx_t_17;

        /* "pyqcstrc/icosah/mics.pyx":3289
 *             counter1=0
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])             # <<<<<<<<<<<<<<
 *                 if flag==0: # insede
 *                     counter1+=1
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3289, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3289, __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, 3289, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3289, __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, 3289, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3289, __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, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3289, __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, 3289, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj3), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3289, __pyx_L1_error)
        __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_18), 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3290
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":3291
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3292
 *                 if flag==0: # insede
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L15_break;

          /* "pyqcstrc/icosah/mics.pyx":3290
 *             for i3 in range(len(obj3)):
 *                 flag=inside_outside_tetrahedron(obj1[i1][i2],obj3[i3][0],obj3[i3][1],obj3[i3][2],obj3[i3][3])
 *                 if flag==0: # insede             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":3294
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if counter2==0:
 */
        /*else*/ {
        }
      }
      __pyx_L15_break:;

      /* "pyqcstrc/icosah/mics.pyx":3295
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=obj1[i1][i2].reshape(18)
 */
      __pyx_t_16 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":3296
 *                     pass
 *             if counter1==0:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 */
        __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":3297
 *             if counter1==0:
 *                 if counter2==0:
 *                     tmp1a=obj1[i1][i2].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])
 */
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          __pyx_t_18 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3297, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3297, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 3297, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3296
 *                     pass
 *             if counter1==0:
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 */
          goto __pyx_L18;
        }

        /* "pyqcstrc/icosah/mics.pyx":3299
 *                     tmp1a=obj1[i1][i2].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3299, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = NULL;
          __pyx_t_17 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_17 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3299, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3299, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_11 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (__pyx_t_1) {
              __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_17, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3299, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3299, __pyx_L1_error)
          __pyx_t_5 = ((PyArrayObject *)__pyx_t_18);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 3299, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_18));
          __pyx_t_18 = 0;
        }
        __pyx_L18:;

        /* "pyqcstrc/icosah/mics.pyx":3300
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1][i2])
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);

        /* "pyqcstrc/icosah/mics.pyx":3295
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=obj1[i1][i2].reshape(18)
 */
        goto __pyx_L17;
      }

      /* "pyqcstrc/icosah/mics.pyx":3302
 *                 counter2+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 * 
 *     # get vertices of obj2 on the surface of obj3 which are inside obj1
 */
      /*else*/ {
      }
      __pyx_L17:;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":3305
 * 
 *     # get vertices of obj2 on the surface of obj3 which are inside obj1
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3305, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_10;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":3306
 *     # get vertices of obj2 on the surface of obj3 which are inside obj1
 *     for i1 in range(len(obj1)):
 *         for i2 in range(len(vertx_obj2)):             # <<<<<<<<<<<<<<
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 */
    __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_vertx_obj2)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3306, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_13;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_i2 = __pyx_t_15;

      /* "pyqcstrc/icosah/mics.pyx":3307
 *     for i1 in range(len(obj1)):
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])             # <<<<<<<<<<<<<<
 *             if flag==0: # insede
 *                 if counter2==0:
 */
      __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3307, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3307, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3307, __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, 3307, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3307, __pyx_L1_error)
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3307, __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, 3307, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_11), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_3), 0);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3308
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 */
      __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":3309
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 *                 else:
 */
        __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":3310
 *             if flag==0: # insede
 *                 if counter2==0:
 *                     tmp1a=vertx_obj2[i2].reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,vertx_obj2[i2])
 */
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3310, __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, 3310, __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_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 3310, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3309
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede
 *                 if counter2==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 *                 else:
 */
          goto __pyx_L24;
        }

        /* "pyqcstrc/icosah/mics.pyx":3312
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,vertx_obj2[i2])             # <<<<<<<<<<<<<<
 *                 counter2+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3312, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3312, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vertx_obj2), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3312, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = NULL;
          __pyx_t_17 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_17 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[3] = {__pyx_t_11, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_17, 2+__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_18 = PyTuple_New(2+__pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3312, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            if (__pyx_t_11) {
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_11); __pyx_t_11 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_17, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_17, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          __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, 3312, __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_17 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_17 < 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_4mics_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_17 < 0)) __PYX_ERR(0, 3312, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
          __pyx_t_3 = 0;
        }
        __pyx_L24:;

        /* "pyqcstrc/icosah/mics.pyx":3313
 *                 else:
 *                     tmp1a=np.append(tmp1a,vertx_obj2[i2])
 *                 counter2+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter2 = (__pyx_v_counter2 + 1);

        /* "pyqcstrc/icosah/mics.pyx":3308
 *         for i2 in range(len(vertx_obj2)):
 *             flag=inside_outside_tetrahedron(vertx_obj2[i2],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *             if flag==0: # insede             # <<<<<<<<<<<<<<
 *                 if counter2==0:
 *                     tmp1a=vertx_obj2[i2].reshape(18)
 */
        goto __pyx_L23;
      }

      /* "pyqcstrc/icosah/mics.pyx":3315
 *                 counter2+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 * 
 *     if len(tmp1a)!=1:
 */
      /*else*/ {
      }
      __pyx_L23:;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":3317
 *                 pass
 * 
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         counter3=0
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3317, __pyx_L1_error)
  __pyx_t_16 = ((__pyx_t_10 != 1) != 0);
  if (__pyx_t_16) {

    /* "pyqcstrc/icosah/mics.pyx":3318
 * 
 *     if len(tmp1a)!=1:
 *         counter3=0             # <<<<<<<<<<<<<<
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *         tmp1a=np.array([0])
 */
    __pyx_v_counter3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3319
 *     if len(tmp1a)!=1:
 *         counter3=0
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))             # <<<<<<<<<<<<<<
 *         tmp1a=np.array([0])
 *         if len(tmp3b)>=4:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3319, __pyx_L1_error)
    __pyx_t_18 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 18.0)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_18, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3319, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_18, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3319, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_18);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_18);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_6, __pyx_int_3);
      __pyx_t_18 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __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, 3319, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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, 3319, __pyx_L1_error)
    }
    __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3320
 *         counter3=0
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *         tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *         if len(tmp3b)>=4:
 *             if coplanar_check(tmp3b)==0:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3320, __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_18 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_18)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_18);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
      }
    }
    __pyx_t_1 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_18, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3320, __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_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_6 < 0)) __PYX_ERR(0, 3320, __pyx_L1_error)
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3321
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *         tmp1a=np.array([0])
 *         if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *             if coplanar_check(tmp3b)==0:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 */
    __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3321, __pyx_L1_error)
    __pyx_t_16 = ((__pyx_t_10 >= 4) != 0);
    if (__pyx_t_16) {

      /* "pyqcstrc/icosah/mics.pyx":3322
 *         tmp1a=np.array([0])
 *         if len(tmp3b)>=4:
 *             if coplanar_check(tmp3b)==0:             # <<<<<<<<<<<<<<
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 counter2=0
 */
      __pyx_t_16 = ((__pyx_f_8pyqcstrc_6icosah_5math1_coplanar_check(((PyArrayObject *)__pyx_v_tmp3b), 0) == 0) != 0);
      if (__pyx_t_16) {

        /* "pyqcstrc/icosah/mics.pyx":3323
 *         if len(tmp3b)>=4:
 *             if coplanar_check(tmp3b)==0:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)             # <<<<<<<<<<<<<<
 *                 counter2=0
 *                 for i2 in range(len(tmp4a)):
 */
        __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3323, __pyx_L1_error)
        __Pyx_GOTREF(__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*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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, 3323, __pyx_L1_error)
        }
        __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3324
 *             if coplanar_check(tmp3b)==0:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 counter2=0             # <<<<<<<<<<<<<<
 *                 for i2 in range(len(tmp4a)):
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 */
        __pyx_v_counter2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3325
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 counter2=0
 *                 for i2 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2a=centroid(tmp4a[i2])
 */
        __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3325, __pyx_L1_error)
        __pyx_t_12 = __pyx_t_10;
        for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
          __pyx_v_i2 = __pyx_t_6;

          /* "pyqcstrc/icosah/mics.pyx":3327
 *                 for i2 in range(len(tmp4a)):
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2a=centroid(tmp4a[i2])             # <<<<<<<<<<<<<<
 *                     counter1=0
 *                     for i3 in range(len(obj2)):
 */
          __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3327, __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, 3327, __pyx_L1_error)
          __pyx_t_11 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3327, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_11), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3327, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_11));
          __pyx_t_11 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3328
 *                     # geometric center, centroid of the tetrahedron, tmp2c
 *                     tmp2a=centroid(tmp4a[i2])
 *                     counter1=0             # <<<<<<<<<<<<<<
 *                     for i3 in range(len(obj2)):
 *                         # check tmp2c is out of obj2 or not
 */
          __pyx_v_counter1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3329
 *                     tmp2a=centroid(tmp4a[i2])
 *                     counter1=0
 *                     for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 */
          __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3329, __pyx_L1_error)
          __pyx_t_14 = __pyx_t_13;
          for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
            __pyx_v_i3 = __pyx_t_15;

            /* "pyqcstrc/icosah/mics.pyx":3331
 *                     for i3 in range(len(obj2)):
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])             # <<<<<<<<<<<<<<
 *                         if flag==0: # inside
 *                             counter1+=1
 */
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3331, __pyx_L1_error)
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3331, __pyx_L1_error)
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_11, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3331, __pyx_L1_error)
            __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3331, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_11, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3331, __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, 3331, __pyx_L1_error)
            __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_1), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_18), ((PyArrayObject *)__pyx_t_2), 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3332
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                         if flag==0: # inside             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            __pyx_t_16 = ((__pyx_v_flag == 0) != 0);
            if (__pyx_t_16) {

              /* "pyqcstrc/icosah/mics.pyx":3333
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                         if flag==0: # inside
 *                             counter1+=1             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_v_counter1 = (__pyx_v_counter1 + 1);

              /* "pyqcstrc/icosah/mics.pyx":3334
 *                         if flag==0: # inside
 *                             counter1+=1
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L31_break;

              /* "pyqcstrc/icosah/mics.pyx":3332
 *                         # check tmp2c is out of obj2 or not
 *                         flag=inside_outside_tetrahedron(tmp2a,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                         if flag==0: # inside             # <<<<<<<<<<<<<<
 *                             counter1+=1
 *                             break
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":3336
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                     if counter1==0:
 *                         if counter2==0:
 */
            /*else*/ {
            }
          }
          __pyx_L31_break:;

          /* "pyqcstrc/icosah/mics.pyx":3337
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if counter2==0:
 *                             tmp1a=tmp4a[i2].reshape(72)
 */
          __pyx_t_16 = ((__pyx_v_counter1 == 0) != 0);
          if (__pyx_t_16) {

            /* "pyqcstrc/icosah/mics.pyx":3338
 *                             pass
 *                     if counter1==0:
 *                         if counter2==0:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a[i2].reshape(72)
 *                         else:
 */
            __pyx_t_16 = ((__pyx_v_counter2 == 0) != 0);
            if (__pyx_t_16) {

              /* "pyqcstrc/icosah/mics.pyx":3339
 *                     if counter1==0:
 *                         if counter2==0:
 *                             tmp1a=tmp4a[i2].reshape(72)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i2])
 */
              __pyx_t_18 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3339, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3339, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __pyx_t_18 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_18)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_18);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                }
              }
              __pyx_t_2 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_18, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3339, __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, 3339, __pyx_L1_error)
              __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3339, __pyx_L1_error)
              }
              __pyx_t_5 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3338
 *                             pass
 *                     if counter1==0:
 *                         if counter2==0:             # <<<<<<<<<<<<<<
 *                             tmp1a=tmp4a[i2].reshape(72)
 *                         else:
 */
              goto __pyx_L34;
            }

            /* "pyqcstrc/icosah/mics.pyx":3341
 *                             tmp1a=tmp4a[i2].reshape(72)
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i2])             # <<<<<<<<<<<<<<
 *                         counter2+=1
 *                     else:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3341, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3341, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3341, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = NULL;
              __pyx_t_15 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_18);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_18, function);
                  __pyx_t_15 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_18)) {
                PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3341, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_18)) {
                PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
                __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3341, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              } else
              #endif
              {
                __pyx_t_11 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3341, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_11);
                if (__pyx_t_1) {
                  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
                PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
                __Pyx_GIVEREF(__pyx_t_3);
                PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_15, __pyx_t_3);
                __pyx_t_3 = 0;
                __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3341, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3341, __pyx_L1_error)
              __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
                __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3341, __pyx_L1_error)
              }
              __pyx_t_5 = 0;
              __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
              __pyx_t_2 = 0;
            }
            __pyx_L34:;

            /* "pyqcstrc/icosah/mics.pyx":3342
 *                         else:
 *                             tmp1a=np.append(tmp1a,tmp4a[i2])
 *                         counter2+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_v_counter2 = (__pyx_v_counter2 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3337
 *                         else:
 *                             pass
 *                     if counter1==0:             # <<<<<<<<<<<<<<
 *                         if counter2==0:
 *                             tmp1a=tmp4a[i2].reshape(72)
 */
            goto __pyx_L33;
          }

          /* "pyqcstrc/icosah/mics.pyx":3344
 *                         counter2+=1
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter2!=0:
 *                     if counter3==0:
 */
          /*else*/ {
          }
          __pyx_L33:;
        }

        /* "pyqcstrc/icosah/mics.pyx":3345
 *                     else:
 *                         pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     if counter3==0:
 *                         tmp1b=tmp1a
 */
        __pyx_t_16 = ((__pyx_v_counter2 != 0) != 0);
        if (__pyx_t_16) {

          /* "pyqcstrc/icosah/mics.pyx":3346
 *                         pass
 *                 if counter2!=0:
 *                     if counter3==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=tmp1a
 *                     else:
 */
          __pyx_t_16 = ((__pyx_v_counter3 == 0) != 0);
          if (__pyx_t_16) {

            /* "pyqcstrc/icosah/mics.pyx":3347
 *                 if counter2!=0:
 *                     if counter3==0:
 *                         tmp1b=tmp1a             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp1a)
 */
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3347, __pyx_L1_error)
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_DECREF_SET(__pyx_v_tmp1b, __pyx_v_tmp1a);

            /* "pyqcstrc/icosah/mics.pyx":3346
 *                         pass
 *                 if counter2!=0:
 *                     if counter3==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=tmp1a
 *                     else:
 */
            goto __pyx_L36;
          }

          /* "pyqcstrc/icosah/mics.pyx":3349
 *                         tmp1b=tmp1a
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp1a)             # <<<<<<<<<<<<<<
 *                     counter3+=1
 *                 else:
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3349, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_append); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3349, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_18 = NULL;
            __pyx_t_6 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_18)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_18);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_6 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_11)) {
              PyObject *__pyx_temp[3] = {__pyx_t_18, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
              __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_GOTREF(__pyx_t_2);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
              PyObject *__pyx_temp[3] = {__pyx_t_18, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1a)};
              __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_GOTREF(__pyx_t_2);
            } else
            #endif
            {
              __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              if (__pyx_t_18) {
                __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_18); __pyx_t_18 = NULL;
              }
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
              PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, ((PyObject *)__pyx_v_tmp1b));
              __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
              PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, ((PyObject *)__pyx_v_tmp1a));
              __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __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, 3349, __pyx_L1_error)
            __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3349, __pyx_L1_error)
            }
            __pyx_t_5 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_2));
            __pyx_t_2 = 0;
          }
          __pyx_L36:;

          /* "pyqcstrc/icosah/mics.pyx":3350
 *                     else:
 *                         tmp1b=np.append(tmp1b,tmp1a)
 *                     counter3+=1             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_v_counter3 = (__pyx_v_counter3 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3345
 *                     else:
 *                         pass
 *                 if counter2!=0:             # <<<<<<<<<<<<<<
 *                     if counter3==0:
 *                         tmp1b=tmp1a
 */
          goto __pyx_L35;
        }

        /* "pyqcstrc/icosah/mics.pyx":3352
 *                     counter3+=1
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
        }
        __pyx_L35:;

        /* "pyqcstrc/icosah/mics.pyx":3322
 *         tmp1a=np.array([0])
 *         if len(tmp3b)>=4:
 *             if coplanar_check(tmp3b)==0:             # <<<<<<<<<<<<<<
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                 counter2=0
 */
        goto __pyx_L27;
      }

      /* "pyqcstrc/icosah/mics.pyx":3354
 *                     pass
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if counter3!=0:
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 */
      /*else*/ {
      }
      __pyx_L27:;

      /* "pyqcstrc/icosah/mics.pyx":3321
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *         tmp1a=np.array([0])
 *         if len(tmp3b)>=4:             # <<<<<<<<<<<<<<
 *             if coplanar_check(tmp3b)==0:
 *                 tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3355
 *             else:
 *                 pass
 *         if counter3!=0:             # <<<<<<<<<<<<<<
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         else:
 */
    __pyx_t_16 = ((__pyx_v_counter3 != 0) != 0);
    if (__pyx_t_16) {

      /* "pyqcstrc/icosah/mics.pyx":3356
 *                 pass
 *         if counter3!=0:
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[[0]]]])
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3356, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_10) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[5] = {__pyx_t_18, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 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_11)) {
        PyObject *__pyx_temp[5] = {__pyx_t_18, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_1 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3356, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__pyx_t_18) {
          __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_18); __pyx_t_18 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_3);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_6, __pyx_int_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __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, 3356, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":3355
 *             else:
 *                 pass
 *         if counter3!=0:             # <<<<<<<<<<<<<<
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         else:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3358
 *             return tmp1b.reshape(int(len(tmp1b)/72),4,6,3)
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[[0]]]])
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3358, __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_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_3);
      PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3358, __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, 3358, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":3317
 *                 pass
 * 
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         counter3=0
 *         tmp3b=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3360
 *             return np.array([[[[0]]]])
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray object_not_object(np.ndarray[DTYPE_int_t, ndim=4] obj1,
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3360, __pyx_L1_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_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_11);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3360, __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, 3360, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":3226
 * 
 * # working
 * cpdef np.ndarray object_subtraction_dev2(np.ndarray[DTYPE_int_t, ndim=4] obj1,\             # <<<<<<<<<<<<<<
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj2,\
 *                                         np.ndarray[DTYPE_int_t, ndim=4] obj3,\
 */

  /* 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_11);
  __Pyx_XDECREF(__pyx_t_18);
  { 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_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev2", __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_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_surface_obj3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertx_obj2.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_vertx_obj2);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4b);
  __Pyx_XDECREF((PyObject *)__pyx_v_surface_obj3);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_23object_subtraction_dev2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_23object_subtraction_dev2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_obj1 = 0;
  PyArrayObject *__pyx_v_obj2 = 0;
  PyArrayObject *__pyx_v_obj3 = 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("object_subtraction_dev2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj1,&__pyx_n_s_obj2,&__pyx_n_s_obj3,&__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_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("object_subtraction_dev2", 1, 4, 4, 1); __PYX_ERR(0, 3226, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("object_subtraction_dev2", 1, 4, 4, 2); __PYX_ERR(0, 3226, __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("object_subtraction_dev2", 1, 4, 4, 3); __PYX_ERR(0, 3226, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction_dev2") < 0)) __PYX_ERR(0, 3226, __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_obj3 = ((PyArrayObject *)values[2]);
    __pyx_v_verbose = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_verbose == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3229, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction_dev2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev2", __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, 3226, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 3227, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj3), __pyx_ptype_5numpy_ndarray, 1, "obj3", 0))) __PYX_ERR(0, 3228, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_22object_subtraction_dev2(__pyx_self, __pyx_v_obj1, __pyx_v_obj2, __pyx_v_obj3, __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_4mics_22object_subtraction_dev2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_obj3, 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;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3;
  __Pyx_Buffer __pyx_pybuffer_obj3;
  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("object_subtraction_dev2", 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_pybuffer_obj3.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3.refcount = 0;
  __pyx_pybuffernd_obj3.data = NULL;
  __pyx_pybuffernd_obj3.rcbuffer = &__pyx_pybuffer_obj3;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3226, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3226, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3226, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3.diminfo[0].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3.diminfo[0].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3.diminfo[1].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3.diminfo[1].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3.diminfo[2].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3.diminfo[2].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3.diminfo[3].strides = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3.diminfo[3].shape = __pyx_pybuffernd_obj3.rcbuffer->pybuffer.shape[3];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev2(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), ((PyArrayObject *)__pyx_v_obj3), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3226, __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_dev2", __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_SafeReleaseBuffer(&__pyx_pybuffernd_obj3.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":3362
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray object_not_object(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                     int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_not_object(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose) {
  int __pyx_v_i1;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp4a = 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_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __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;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_not_object", 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_tmp4a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp4a.refcount = 0;
  __pyx_pybuffernd_tmp4a.data = NULL;
  __pyx_pybuffernd_tmp4a.rcbuffer = &__pyx_pybuffer_tmp4a;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3362, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3362, __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/mics.pyx":3372
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       object_not_object()')
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

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

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

  /* "pyqcstrc/icosah/mics.pyx":3375
 *         print('       object_not_object()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     tmp1a=np.array([0])
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":3377
 *         pass
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     for i1 in range(len(obj1)):
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3377, __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, 3377, __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, 3377, __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, 3377, __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, 3377, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 3377, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3378
 * 
 *     tmp1a=np.array([0])
 *     for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)
 *         if tmp4a.tolist()!=[[[[0]]]]:
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3378, __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/mics.pyx":3379
 *     tmp1a=np.array([0])
 *     for i1 in range(len(obj1)):
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)             # <<<<<<<<<<<<<<
 *         if tmp4a.tolist()!=[[[[0]]]]:
 *             if len(tmp1a)==1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3379, __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, 3379, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_4mics_tetrahedron_not_obj(((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3379, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 3379, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3380
 *     for i1 in range(len(obj1)):
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)
 *         if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 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, 3380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __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, 3380, __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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3380, __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, 3380, __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, 3380, __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 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3380, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3381
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)
 *         if tmp4a.tolist()!=[[[[0]]]]:
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *             else:
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3381, __pyx_L1_error)
      __pyx_t_1 = ((__pyx_t_14 == 1) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3382
 *         if tmp4a.tolist()!=[[[[0]]]]:
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp4a)
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3382, __pyx_L1_error)
        __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_14 * 72)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_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, 3382, __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, 3382, __pyx_L1_error)
        __pyx_t_6 = ((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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 3382, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3381
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)
 *         if tmp4a.tolist()!=[[[[0]]]]:
 *             if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *             else:
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/mics.pyx":3384
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp4a)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3384, __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, 3384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_13 = 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_13 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_3, ((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, 3384, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_3, ((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, 3384, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3384, __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_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_5, 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_5, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp4a));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3384, __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, 3384, __pyx_L1_error)
        __pyx_t_6 = ((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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_4mics_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, 3384, __pyx_L1_error)
        }
        __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;
      }
      __pyx_L7:;

      /* "pyqcstrc/icosah/mics.pyx":3380
 *     for i1 in range(len(obj1)):
 *         tmp4a=tetrahedron_not_obj(obj1[i1],obj2,verbose-1)
 *         if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *             if len(tmp1a)==1:
 *                 tmp1a=tmp4a.reshape(len(tmp4a)*72)
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/mics.pyx":3386
 *                 tmp1a=np.append(tmp1a,tmp4a)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if len(tmp1a)!=1:
 *         return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
    /*else*/ {
    }
    __pyx_L6:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3387
 *         else:
 *             pass
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *     else:
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3387, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_11 != 1) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3388
 *             pass
 *     if len(tmp1a)!=1:
 *         return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[[0]]]])
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3388, __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, 3388, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_5, __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, 3388, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_5, __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, 3388, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_int_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_7, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_7, __pyx_int_3);
      __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 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, 3388, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":3387
 *         else:
 *             pass
 *     if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *         return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *     else:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3390
 *         return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray tetrahedron_not_obj(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3390, __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, 3390, __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, 3390, __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, 3390, __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_15))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __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, 3390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __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, 3390, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":3362
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray object_not_object(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_15);
  { 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_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_not_object", __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_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp1a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":3392
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray tetrahedron_not_obj(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=4] obj,
 *                                     int verbose):
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_tetrahedron_not_obj(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_obj, int __pyx_v_verbose) {
  int __pyx_v_i1;
  int __pyx_v_counter1;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_tmp2a = NULL;
  Py_ssize_t __pyx_v_i2;
  int __pyx_v_flag1;
  __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_tmp1a;
  __Pyx_Buffer __pyx_pybuffer_tmp1a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __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
  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;
  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;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tetrahedron_not_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_tmp1b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1b.refcount = 0;
  __pyx_pybuffernd_tmp1b.data = NULL;
  __pyx_pybuffernd_tmp1b.rcbuffer = &__pyx_pybuffer_tmp1b;
  __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.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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3392, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3392, __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/mics.pyx":3410
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     tmp1b=np.array([0])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3410, __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, 3410, __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, 3410, __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, 3410, __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, 3410, __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_4mics_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_4mics_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, 3410, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3411
 * 
 *     tmp1a=np.array([0])
 *     tmp1b=np.array([0])             # <<<<<<<<<<<<<<
 * 
 *     if verbose>0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3411, __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, 3411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3411, __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_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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 3411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3411, __pyx_L1_error)
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3411, __pyx_L1_error)
  }
  __pyx_t_5 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3413
 *     tmp1b=np.array([0])
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       tetrahedron_not_obj()')
 *     else:
 */
  __pyx_t_10 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_10) {

    /* "pyqcstrc/icosah/mics.pyx":3414
 * 
 *     if verbose>0:
 *         print('       tetrahedron_not_obj()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3413
 *     tmp1b=np.array([0])
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       tetrahedron_not_obj()')
 *     else:
 */
    goto __pyx_L3;
  }

  /* "pyqcstrc/icosah/mics.pyx":3416
 *         print('       tetrahedron_not_obj()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 * 
 *     for i1 in range(len(obj)):
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":3418
 *         pass
 * 
 *     for i1 in range(len(obj)):             # <<<<<<<<<<<<<<
 *         #tmp3a=intersection_two_tetrahedron_0(tetrahedron,obj[i1])
 *         tmp3a=intersection_two_tetrahedron_4(tetrahedron,obj[i1],verbose-1)
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3418, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
    __pyx_v_i1 = __pyx_t_6;

    /* "pyqcstrc/icosah/mics.pyx":3420
 *     for i1 in range(len(obj)):
 *         #tmp3a=intersection_two_tetrahedron_0(tetrahedron,obj[i1])
 *         tmp3a=intersection_two_tetrahedron_4(tetrahedron,obj[i1],verbose-1)             # <<<<<<<<<<<<<<
 *         if tmp3a.tolist()!=[[[0]]]:
 *             if len(tmp1b)==1:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3420, __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, 3420, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_intersection_two_tetrahedron_4(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_t_1), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_13 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_13 < 0)) __PYX_ERR(0, 3420, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3421
 *         #tmp3a=intersection_two_tetrahedron_0(tetrahedron,obj[i1])
 *         tmp3a=intersection_two_tetrahedron_4(tetrahedron,obj[i1],verbose-1)
 *         if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *             if len(tmp1b)==1:
 *                 tmp1b=tmp3a.reshape(len(tmp3a)*18)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3421, __pyx_L1_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_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_10) {

      /* "pyqcstrc/icosah/mics.pyx":3422
 *         tmp3a=intersection_two_tetrahedron_4(tetrahedron,obj[i1],verbose-1)
 *         if tmp3a.tolist()!=[[[0]]]:
 *             if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp3a.reshape(len(tmp3a)*18)
 *             else:
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3422, __pyx_L1_error)
      __pyx_t_10 = ((__pyx_t_14 == 1) != 0);
      if (__pyx_t_10) {

        /* "pyqcstrc/icosah/mics.pyx":3423
 *         if tmp3a.tolist()!=[[[0]]]:
 *             if len(tmp1b)==1:
 *                 tmp1b=tmp3a.reshape(len(tmp3a)*18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp3a)
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp3a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3423, __pyx_L1_error)
        __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_14 * 18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __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_3)) __PYX_ERR(0, 3423, __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, 3423, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_13 < 0)) {
            PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_13 < 0)) __PYX_ERR(0, 3423, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3422
 *         tmp3a=intersection_two_tetrahedron_4(tetrahedron,obj[i1],verbose-1)
 *         if tmp3a.tolist()!=[[[0]]]:
 *             if len(tmp1b)==1:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp3a.reshape(len(tmp3a)*18)
 *             else:
 */
        goto __pyx_L7;
      }

      /* "pyqcstrc/icosah/mics.pyx":3425
 *                 tmp1b=tmp3a.reshape(len(tmp3a)*18)
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp3a)             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3425, __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, 3425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_13 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_13 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp3a)};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3425, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_1, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp3a)};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3425, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3425, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_1) {
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1b));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp3a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp3a));
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, ((PyObject *)__pyx_v_tmp3a));
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3425, __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, 3425, __pyx_L1_error)
        __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
          if (unlikely(__pyx_t_13 < 0)) {
            PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_13 < 0)) __PYX_ERR(0, 3425, __pyx_L1_error)
        }
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;
      }
      __pyx_L7:;

      /* "pyqcstrc/icosah/mics.pyx":3421
 *         #tmp3a=intersection_two_tetrahedron_0(tetrahedron,obj[i1])
 *         tmp3a=intersection_two_tetrahedron_4(tetrahedron,obj[i1],verbose-1)
 *         if tmp3a.tolist()!=[[[0]]]:             # <<<<<<<<<<<<<<
 *             if len(tmp1b)==1:
 *                 tmp1b=tmp3a.reshape(len(tmp3a)*18)
 */
      goto __pyx_L6;
    }

    /* "pyqcstrc/icosah/mics.pyx":3427
 *                 tmp1b=np.append(tmp1b,tmp3a)
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if len(tmp1b)!=1:
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 */
    /*else*/ {
    }
    __pyx_L6:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3428
 *         else:
 *             pass
 *     if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 *         tmp4a=tetrahedralization(tetrahedron,tmp3a,verbose-1)
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3428, __pyx_L1_error)
  __pyx_t_10 = ((__pyx_t_11 != 1) != 0);
  if (__pyx_t_10) {

    /* "pyqcstrc/icosah/mics.pyx":3429
 *             pass
 *     if len(tmp1b)!=1:
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))             # <<<<<<<<<<<<<<
 *         tmp4a=tetrahedralization(tetrahedron,tmp3a,verbose-1)
 *         for i1 in range(len(tmp4a)):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3429, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 18.0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3429, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_4, __pyx_int_6, __pyx_int_3};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3429, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_15 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (__pyx_t_1) {
        __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_6, __pyx_t_4);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_6, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_6, __pyx_int_3);
      __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 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, 3429, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_6 < 0)) __PYX_ERR(0, 3429, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3430
 *     if len(tmp1b)!=1:
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 *         tmp4a=tetrahedralization(tetrahedron,tmp3a,verbose-1)             # <<<<<<<<<<<<<<
 *         for i1 in range(len(tmp4a)):
 *             tmp2a=centroid(tmp4a[i1])
 */
    __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization(((PyArrayObject *)__pyx_v_tetrahedron), ((PyArrayObject *)__pyx_v_tmp3a), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_2), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 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_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, 3430, __pyx_L1_error)
    }
    __pyx_v_tmp4a = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3431
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 *         tmp4a=tetrahedralization(tetrahedron,tmp3a,verbose-1)
 *         for i1 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *             tmp2a=centroid(tmp4a[i1])
 *             counter1=0
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3431, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_11;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
      __pyx_v_i1 = __pyx_t_6;

      /* "pyqcstrc/icosah/mics.pyx":3432
 *         tmp4a=tetrahedralization(tetrahedron,tmp3a,verbose-1)
 *         for i1 in range(len(tmp4a)):
 *             tmp2a=centroid(tmp4a[i1])             # <<<<<<<<<<<<<<
 *             counter1=0
 *             for i2 in range(len(obj)):
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3432, __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, 3432, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_2), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3433
 *         for i1 in range(len(tmp4a)):
 *             tmp2a=centroid(tmp4a[i1])
 *             counter1=0             # <<<<<<<<<<<<<<
 *             for i2 in range(len(obj)):
 *                 flag1=inside_outside_tetrahedron(tmp2a,obj[i2][0],obj[i2][1],obj[i2][2],obj[i2][3])
 */
      __pyx_v_counter1 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3434
 *             tmp2a=centroid(tmp4a[i1])
 *             counter1=0
 *             for i2 in range(len(obj)):             # <<<<<<<<<<<<<<
 *                 flag1=inside_outside_tetrahedron(tmp2a,obj[i2][0],obj[i2][1],obj[i2][2],obj[i2][3])
 *                 if flag1==0: # inside
 */
      __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_obj)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3434, __pyx_L1_error)
      __pyx_t_16 = __pyx_t_14;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_i2 = __pyx_t_17;

        /* "pyqcstrc/icosah/mics.pyx":3435
 *             counter1=0
 *             for i2 in range(len(obj)):
 *                 flag1=inside_outside_tetrahedron(tmp2a,obj[i2][0],obj[i2][1],obj[i2][2],obj[i2][3])             # <<<<<<<<<<<<<<
 *                 if flag1==0: # inside
 *                     counter1+=1
 */
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3435, __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, 3435, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3435, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3435, __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, 3435, __pyx_L1_error)
        __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj), __pyx_v_i2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3435, __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, 3435, __pyx_L1_error)
        __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_15), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_1), 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3436
 *             for i2 in range(len(obj)):
 *                 flag1=inside_outside_tetrahedron(tmp2a,obj[i2][0],obj[i2][1],obj[i2][2],obj[i2][3])
 *                 if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        __pyx_t_10 = ((__pyx_v_flag1 == 0) != 0);
        if (__pyx_t_10) {

          /* "pyqcstrc/icosah/mics.pyx":3437
 *                 flag1=inside_outside_tetrahedron(tmp2a,obj[i2][0],obj[i2][1],obj[i2][2],obj[i2][3])
 *                 if flag1==0: # inside
 *                     counter1+=1             # <<<<<<<<<<<<<<
 *                     break
 *                 else:
 */
          __pyx_v_counter1 = (__pyx_v_counter1 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3438
 *                 if flag1==0: # inside
 *                     counter1+=1
 *                     break             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          goto __pyx_L12_break;

          /* "pyqcstrc/icosah/mics.pyx":3436
 *             for i2 in range(len(obj)):
 *                 flag1=inside_outside_tetrahedron(tmp2a,obj[i2][0],obj[i2][1],obj[i2][2],obj[i2][3])
 *                 if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                     counter1+=1
 *                     break
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":3440
 *                     break
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 if len(tmp1a)==1:
 */
        /*else*/ {
        }
      }
      __pyx_L12_break:;

      /* "pyqcstrc/icosah/mics.pyx":3441
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp4a[i1].reshape(72)
 */
      __pyx_t_10 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_10) {

        /* "pyqcstrc/icosah/mics.pyx":3442
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp4a[i1].reshape(72)
 *                 else:
 */
        __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3442, __pyx_L1_error)
        __pyx_t_10 = ((__pyx_t_14 == 1) != 0);
        if (__pyx_t_10) {

          /* "pyqcstrc/icosah/mics.pyx":3443
 *             if counter1==0:
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp4a[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a[i1])
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
            }
          }
          __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_4, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3443, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3443, __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_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 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_4mics_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_13 < 0)) __PYX_ERR(0, 3443, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3442
 *                     pass
 *             if counter1==0:
 *                 if len(tmp1a)==1:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp4a[i1].reshape(72)
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "pyqcstrc/icosah/mics.pyx":3445
 *                     tmp1a=tmp4a[i1].reshape(72)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp4a[i1])             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3445, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3445, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_2 = NULL;
          __pyx_t_13 = 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_13 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_15};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3445, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
            PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), __pyx_t_15};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3445, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3445, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (__pyx_t_2) {
              __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 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_3, 0+__pyx_t_13, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_15);
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_t_15);
            __pyx_t_15 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3445, __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;
          if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3445, __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_13 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_13 < 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_4mics_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_13 < 0)) __PYX_ERR(0, 3445, __pyx_L1_error)
          }
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_1));
          __pyx_t_1 = 0;
        }
        __pyx_L15:;

        /* "pyqcstrc/icosah/mics.pyx":3441
 *                 else:
 *                     pass
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 if len(tmp1a)==1:
 *                     tmp1a=tmp4a[i1].reshape(72)
 */
        goto __pyx_L14;
      }

      /* "pyqcstrc/icosah/mics.pyx":3447
 *                     tmp1a=np.append(tmp1a,tmp4a[i1])
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if len(tmp1a)!=1:
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
      /*else*/ {
      }
      __pyx_L14:;
    }

    /* "pyqcstrc/icosah/mics.pyx":3448
 *             else:
 *                 pass
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3448, __pyx_L1_error)
    __pyx_t_10 = ((__pyx_t_11 != 1) != 0);
    if (__pyx_t_10) {

      /* "pyqcstrc/icosah/mics.pyx":3449
 *                 pass
 *         if len(tmp1a)!=1:
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[[0]]]])
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3449, __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, 3449, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_15)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3449, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __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_15, __pyx_t_3, __pyx_int_4, __pyx_int_6, __pyx_int_3};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3449, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3449, __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_3);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_3);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_int_4);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_6, __pyx_int_3);
        __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3449, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3449, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":3448
 *             else:
 *                 pass
 *         if len(tmp1a)!=1:             # <<<<<<<<<<<<<<
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3451
 *             return tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[[0]]]])
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3451, __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, 3451, __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, 3451, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_3, 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_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __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_1)) __PYX_ERR(0, 3451, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3451, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":3428
 *         else:
 *             pass
 *     if len(tmp1b)!=1:             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp1b.reshape(int(len(tmp1b)/18),6,3))
 *         tmp4a=tetrahedralization(tetrahedron,tmp3a,verbose-1)
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3453
 *             return np.array([[[[0]]]])
 *     else:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 * cpdef np.ndarray object_subtraction_3(np.ndarray[DTYPE_int_t, ndim=4] obj1,
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3453, __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, 3453, __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, 3453, __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 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3453, __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, 3453, __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, 3453, __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 = 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_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3453, __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, 3453, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":3392
 *         return np.array([[[[0]]]])
 * 
 * cdef np.ndarray tetrahedron_not_obj(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                     np.ndarray[DTYPE_int_t, ndim=4] obj,
 *                                     int verbose):
 */

  /* 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_15);
  { 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_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.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.mics.tetrahedron_not_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_tetrahedron.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.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_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2a);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":3455
 *         return np.array([[[[0]]]])
 * 
 * cpdef np.ndarray object_subtraction_3(np.ndarray[DTYPE_int_t, ndim=4] obj1,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                 int verbose):
 */

static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_25object_subtraction_3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_3(PyArrayObject *__pyx_v_obj1, PyArrayObject *__pyx_v_obj2, int __pyx_v_verbose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_i3;
  int __pyx_v_i4;
  int __pyx_v_i5;
  int __pyx_v_counter0;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  CYTHON_UNUSED int __pyx_v_counter3;
  int __pyx_v_counter4;
  int __pyx_v_counter7;
  int __pyx_v_flag1;
  long __pyx_v_v01;
  long __pyx_v_v02;
  long __pyx_v_v03;
  float __pyx_v_vol;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1d = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp4a = 0;
  PyArrayObject *__pyx_v_obj2_surface = 0;
  PyArrayObject *__pyx_v_tmp2c = NULL;
  __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_obj2_surface;
  __Pyx_Buffer __pyx_pybuffer_obj2_surface;
  __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_tmp1d;
  __Pyx_Buffer __pyx_pybuffer_tmp1d;
  __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;
  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;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_t_22;
  PyArrayObject *__pyx_t_23 = NULL;
  long __pyx_t_24;
  long __pyx_t_25;
  long __pyx_t_26;
  __pyx_t_5numpy_float64_t __pyx_t_27;
  Py_UCS4 __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("object_subtraction_3", 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_tmp1d.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp1d.refcount = 0;
  __pyx_pybuffernd_tmp1d.data = NULL;
  __pyx_pybuffernd_tmp1d.rcbuffer = &__pyx_pybuffer_tmp1d;
  __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_obj2_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_surface.refcount = 0;
  __pyx_pybuffernd_obj2_surface.data = NULL;
  __pyx_pybuffernd_obj2_surface.rcbuffer = &__pyx_pybuffer_obj2_surface;
  __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3455, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3455, __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/mics.pyx":3470
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] obj2_surface
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        object_subtraction_3()')
 *     #print '  get A not B = A not (A and B)'
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3471
 * 
 *     if verbose>0:
 *         print('        object_subtraction_3()')             # <<<<<<<<<<<<<<
 *     #print '  get A not B = A not (A and B)'
 *     #print '  obj1: A'
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3470
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] obj2_surface
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('        object_subtraction_3()')
 *     #print '  get A not B = A not (A and B)'
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3476
 *     #print '  obj2: A and B'
 * 
 *     tmp1a=np.array([0])             # <<<<<<<<<<<<<<
 *     if obj2.tolist()!=[[[[0]]]]:
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3476, __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, 3476, __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, 3476, __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, 3476, __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, 3476, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_7 < 0)) __PYX_ERR(0, 3476, __pyx_L1_error)
  }
  __pyx_t_6 = 0;
  __pyx_v_tmp1a = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3477
 * 
 *     tmp1a=np.array([0])
 *     if obj2.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 * 
 *         # get surfaces of obj2
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj2), __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __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_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3477, __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, 3477, __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_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3481
 *         # get surfaces of obj2
 *         #obj2_surface=generator_surface(obj2,verbose-1)
 *         obj2_surface=generator_surface_1(obj2,verbose-1)             # <<<<<<<<<<<<<<
 * 
 *         tmp3a=obj2_surface.reshape(len(obj2_surface)*3,6,3)
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_generator_surface_1(((PyArrayObject *)__pyx_v_obj2), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_obj2_surface.diminfo[0].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_surface.diminfo[0].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_surface.diminfo[1].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_surface.diminfo[1].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_surface.diminfo[2].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_surface.diminfo[2].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_surface.diminfo[3].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_surface.diminfo[3].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[3];
      if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3481, __pyx_L1_error)
    }
    __pyx_v_obj2_surface = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3483
 *         obj2_surface=generator_surface_1(obj2,verbose-1)
 * 
 *         tmp3a=obj2_surface.reshape(len(obj2_surface)*3,6,3)             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj2_surface), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj2_surface)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3483, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_11 * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3483, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_int_6, __pyx_int_3};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3483, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_t_2);
      __Pyx_INCREF(__pyx_int_6);
      __Pyx_GIVEREF(__pyx_int_6);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_int_6);
      __Pyx_INCREF(__pyx_int_3);
      __Pyx_GIVEREF(__pyx_int_3);
      PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_7, __pyx_int_3);
      __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3483, __pyx_L1_error)
    __pyx_t_13 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 3483, __pyx_L1_error)
    }
    __pyx_t_13 = 0;
    __pyx_v_tmp3a = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3484
 * 
 *         tmp3a=obj2_surface.reshape(len(obj2_surface)*3,6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 * 
 *         counter0=0
 */
    __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_7 < 0)) __PYX_ERR(0, 3484, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3486
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 * 
 *         counter0=0             # <<<<<<<<<<<<<<
 *         counter3=0
 *         for i1 in range(len(obj1)):
 */
    __pyx_v_counter0 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3487
 * 
 *         counter0=0
 *         counter3=0             # <<<<<<<<<<<<<<
 *         for i1 in range(len(obj1)):
 *             counter2=0
 */
    __pyx_v_counter3 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3488
 *         counter0=0
 *         counter3=0
 *         for i1 in range(len(obj1)):             # <<<<<<<<<<<<<<
 *             counter2=0
 *             for i2 in range(4):
 */
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_obj1)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3488, __pyx_L1_error)
    __pyx_t_14 = __pyx_t_11;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_14; __pyx_t_7+=1) {
      __pyx_v_i1 = __pyx_t_7;

      /* "pyqcstrc/icosah/mics.pyx":3489
 *         counter3=0
 *         for i1 in range(len(obj1)):
 *             counter2=0             # <<<<<<<<<<<<<<
 *             for i2 in range(4):
 *                 counter1=0
 */
      __pyx_v_counter2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3490
 *         for i1 in range(len(obj1)):
 *             counter2=0
 *             for i2 in range(4):             # <<<<<<<<<<<<<<
 *                 counter1=0
 *                 for i3 in range(len(obj2)):
 */
      for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) {
        __pyx_v_i2 = __pyx_t_15;

        /* "pyqcstrc/icosah/mics.pyx":3491
 *             counter2=0
 *             for i2 in range(4):
 *                 counter1=0             # <<<<<<<<<<<<<<
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(obj1[i1][i2],obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 */
        __pyx_v_counter1 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3492
 *             for i2 in range(4):
 *                 counter1=0
 *                 for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                     flag1=inside_outside_tetrahedron(obj1[i1][i2],obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0: # inside
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3492, __pyx_L1_error)
        __pyx_t_17 = __pyx_t_16;
        for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
          __pyx_v_i3 = __pyx_t_18;

          /* "pyqcstrc/icosah/mics.pyx":3493
 *                 counter1=0
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(obj1[i1][i2],obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])             # <<<<<<<<<<<<<<
 *                     if flag1==0: # inside
 *                         counter1+=1
 */
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3493, __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, 3493, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3493, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3493, __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, 3493, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __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, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3493, __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, 3493, __pyx_L1_error)
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3493, __pyx_L1_error)
          __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_19), 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3494
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(obj1[i1][i2],obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3495
 *                     flag1=inside_outside_tetrahedron(obj1[i1][i2],obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0: # inside
 *                         counter1+=1             # <<<<<<<<<<<<<<
 *                         break
 *                     else:
 */
            __pyx_v_counter1 = (__pyx_v_counter1 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3496
 *                     if flag1==0: # inside
 *                         counter1+=1
 *                         break             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            goto __pyx_L10_break;

            /* "pyqcstrc/icosah/mics.pyx":3494
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(obj1[i1][i2],obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                         counter1+=1
 *                         break
 */
          }

          /* "pyqcstrc/icosah/mics.pyx":3498
 *                         break
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter1!=0:
 *                     if counter2==0:
 */
          /*else*/ {
          }
        }
        __pyx_L10_break:;

        /* "pyqcstrc/icosah/mics.pyx":3499
 *                     else:
 *                         pass
 *                 if counter1!=0:             # <<<<<<<<<<<<<<
 *                     if counter2==0:
 *                         tmp1b=obj1[i1][i2].reshape(18)
 */
        __pyx_t_1 = ((__pyx_v_counter1 != 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":3500
 *                         pass
 *                 if counter1!=0:
 *                     if counter2==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=obj1[i1][i2].reshape(18)
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3501
 *                 if counter1!=0:
 *                     if counter2==0:
 *                         tmp1b=obj1[i1][i2].reshape(18)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1b=np.append(tmp1b,obj1[i1][i2])
 */
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __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_19 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_18);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3501, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3501, __pyx_L1_error)
            __pyx_t_6 = ((PyArrayObject *)__pyx_t_19);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_18 < 0)) {
                PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_18 < 0)) __PYX_ERR(0, 3501, __pyx_L1_error)
            }
            __pyx_t_6 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_19));
            __pyx_t_19 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3500
 *                         pass
 *                 if counter1!=0:
 *                     if counter2==0:             # <<<<<<<<<<<<<<
 *                         tmp1b=obj1[i1][i2].reshape(18)
 *                     else:
 */
            goto __pyx_L13;
          }

          /* "pyqcstrc/icosah/mics.pyx":3503
 *                         tmp1b=obj1[i1][i2].reshape(18)
 *                     else:
 *                         tmp1b=np.append(tmp1b,obj1[i1][i2])             # <<<<<<<<<<<<<<
 *                     counter2+=1
 *                 else:
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3503, __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, 3503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_5 = NULL;
            __pyx_t_18 = 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_18 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1b), __pyx_t_12};
              __pyx_t_19 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3503, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
              PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1b), __pyx_t_12};
              __pyx_t_19 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3503, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            } else
            #endif
            {
              __pyx_t_3 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3503, __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_tmp1b));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
              PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_18, ((PyObject *)__pyx_v_tmp1b));
              __Pyx_GIVEREF(__pyx_t_12);
              PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_18, __pyx_t_12);
              __pyx_t_12 = 0;
              __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3503, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __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, 3503, __pyx_L1_error)
            __pyx_t_6 = ((PyArrayObject *)__pyx_t_19);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
              __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_18 < 0)) {
                PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_18 < 0)) __PYX_ERR(0, 3503, __pyx_L1_error)
            }
            __pyx_t_6 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_19));
            __pyx_t_19 = 0;
          }
          __pyx_L13:;

          /* "pyqcstrc/icosah/mics.pyx":3504
 *                     else:
 *                         tmp1b=np.append(tmp1b,obj1[i1][i2])
 *                     counter2+=1             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_v_counter2 = (__pyx_v_counter2 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3499
 *                     else:
 *                         pass
 *                 if counter1!=0:             # <<<<<<<<<<<<<<
 *                     if counter2==0:
 *                         tmp1b=obj1[i1][i2].reshape(18)
 */
          goto __pyx_L12;
        }

        /* "pyqcstrc/icosah/mics.pyx":3506
 *                     counter2+=1
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if counter2==4: # i1-th tetrahedron is inside obj2
 *                 tmp2c=centroid(obj1[i1])
 */
        /*else*/ {
        }
        __pyx_L12:;
      }

      /* "pyqcstrc/icosah/mics.pyx":3507
 *                 else:
 *                     pass
 *             if counter2==4: # i1-th tetrahedron is inside obj2             # <<<<<<<<<<<<<<
 *                 tmp2c=centroid(obj1[i1])
 *                 counter7=0
 */
      switch (__pyx_v_counter2) {
        case 4:

        /* "pyqcstrc/icosah/mics.pyx":3508
 *                     pass
 *             if counter2==4: # i1-th tetrahedron is inside obj2
 *                 tmp2c=centroid(obj1[i1])             # <<<<<<<<<<<<<<
 *                 counter7=0
 *                 for i3 in range(len(obj2)):
 */
        __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3508, __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, 3508, __pyx_L1_error)
        __pyx_t_2 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_19), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3508, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp2c, ((PyArrayObject *)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3509
 *             if counter2==4: # i1-th tetrahedron is inside obj2
 *                 tmp2c=centroid(obj1[i1])
 *                 counter7=0             # <<<<<<<<<<<<<<
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2c,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 */
        __pyx_v_counter7 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3510
 *                 tmp2c=centroid(obj1[i1])
 *                 counter7=0
 *                 for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                     flag1=inside_outside_tetrahedron(tmp2c,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0:
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3510, __pyx_L1_error)
        __pyx_t_17 = __pyx_t_16;
        for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_17; __pyx_t_15+=1) {
          __pyx_v_i3 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":3511
 *                 counter7=0
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2c,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])             # <<<<<<<<<<<<<<
 *                     if flag1==0:
 *                         counter7+=1
 */
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3511, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3511, __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, 3511, __pyx_L1_error)
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3511, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3511, __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, 3511, __pyx_L1_error)
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3511, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3511, __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, 3511, __pyx_L1_error)
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3511, __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, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3511, __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, 3511, __pyx_L1_error)
          __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2c), ((PyArrayObject *)__pyx_t_19), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_12), ((PyArrayObject *)__pyx_t_5), 0);
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3512
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2c,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0:             # <<<<<<<<<<<<<<
 *                         counter7+=1
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3513
 *                     flag1=inside_outside_tetrahedron(tmp2c,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0:
 *                         counter7+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_v_counter7 = (__pyx_v_counter7 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3512
 *                 for i3 in range(len(obj2)):
 *                     flag1=inside_outside_tetrahedron(tmp2c,obj2[i3][0],obj2[i3][1],obj2[i3][2],obj2[i3][3])
 *                     if flag1==0:             # <<<<<<<<<<<<<<
 *                         counter7+=1
 *                     else:
 */
            goto __pyx_L16;
          }

          /* "pyqcstrc/icosah/mics.pyx":3515
 *                         counter7+=1
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter7==0:
 *                     if counter0==0:
 */
          /*else*/ {
          }
          __pyx_L16:;
        }

        /* "pyqcstrc/icosah/mics.pyx":3516
 *                     else:
 *                         pass
 *                 if counter7==0:             # <<<<<<<<<<<<<<
 *                     if counter0==0:
 *                         tmp1a=obj1[i1].reshape(72)
 */
        __pyx_t_1 = ((__pyx_v_counter7 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":3517
 *                         pass
 *                 if counter7==0:
 *                     if counter0==0:             # <<<<<<<<<<<<<<
 *                         tmp1a=obj1[i1].reshape(72)
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_counter0 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3518
 *                 if counter7==0:
 *                     if counter0==0:
 *                         tmp1a=obj1[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1a=np.append(tmp1a,obj1[i1])
 */
            __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3518, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3518, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_12)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_72);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3518, __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, 3518, __pyx_L1_error)
            __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3518, __pyx_L1_error)
            }
            __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3517
 *                         pass
 *                 if counter7==0:
 *                     if counter0==0:             # <<<<<<<<<<<<<<
 *                         tmp1a=obj1[i1].reshape(72)
 *                     else:
 */
            goto __pyx_L18;
          }

          /* "pyqcstrc/icosah/mics.pyx":3520
 *                         tmp1a=obj1[i1].reshape(72)
 *                     else:
 *                         tmp1a=np.append(tmp1a,obj1[i1])             # <<<<<<<<<<<<<<
 *                     counter0+=1
 *             elif counter2==0: # i1-th tetrahedron is out of obj2
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3520, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3520, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __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, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3520, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_19 = NULL;
            __pyx_t_15 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
              __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
              if (likely(__pyx_t_19)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_19);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_12, function);
                __pyx_t_15 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_12)) {
              PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
              __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3520, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 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_12)) {
              PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_tmp1a), __pyx_t_3};
              __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3520, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else
            #endif
            {
              __pyx_t_2 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3520, __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_15, ((PyObject *)__pyx_v_tmp1a));
              __Pyx_GIVEREF(__pyx_t_3);
              PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_15, __pyx_t_3);
              __pyx_t_3 = 0;
              __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3520, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3520, __pyx_L1_error)
            __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
              __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
              if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3520, __pyx_L1_error)
            }
            __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
            __pyx_t_5 = 0;
          }
          __pyx_L18:;

          /* "pyqcstrc/icosah/mics.pyx":3521
 *                     else:
 *                         tmp1a=np.append(tmp1a,obj1[i1])
 *                     counter0+=1             # <<<<<<<<<<<<<<
 *             elif counter2==0: # i1-th tetrahedron is out of obj2
 *                 if counter0==0:
 */
          __pyx_v_counter0 = (__pyx_v_counter0 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3516
 *                     else:
 *                         pass
 *                 if counter7==0:             # <<<<<<<<<<<<<<
 *                     if counter0==0:
 *                         tmp1a=obj1[i1].reshape(72)
 */
        }

        /* "pyqcstrc/icosah/mics.pyx":3507
 *                 else:
 *                     pass
 *             if counter2==4: # i1-th tetrahedron is inside obj2             # <<<<<<<<<<<<<<
 *                 tmp2c=centroid(obj1[i1])
 *                 counter7=0
 */
        break;
        case 0:

        /* "pyqcstrc/icosah/mics.pyx":3523
 *                     counter0+=1
 *             elif counter2==0: # i1-th tetrahedron is out of obj2
 *                 if counter0==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1].reshape(72)
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter0 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":3524
 *             elif counter2==0: # i1-th tetrahedron is out of obj2
 *                 if counter0==0:
 *                     tmp1a=obj1[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])
 */
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3524, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3524, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_5 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_72);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3524, __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, 3524, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3524, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3523
 *                     counter0+=1
 *             elif counter2==0: # i1-th tetrahedron is out of obj2
 *                 if counter0==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=obj1[i1].reshape(72)
 *                 else:
 */
          goto __pyx_L19;
        }

        /* "pyqcstrc/icosah/mics.pyx":3526
 *                     tmp1a=obj1[i1].reshape(72)
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])             # <<<<<<<<<<<<<<
 *                 counter0+=1
 *             else: # i1-th tetrahedron is partially out of obj2
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3526, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3526, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3526, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          __pyx_t_15 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
              __pyx_t_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_12)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3526, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_12)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1a), __pyx_t_2};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3526, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          } else
          #endif
          {
            __pyx_t_19 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3526, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            if (__pyx_t_3) {
              __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_3); __pyx_t_3 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_15, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_15, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3526, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          }
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3526, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3526, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_5));
          __pyx_t_5 = 0;
        }
        __pyx_L19:;

        /* "pyqcstrc/icosah/mics.pyx":3527
 *                 else:
 *                     tmp1a=np.append(tmp1a,obj1[i1])
 *                 counter0+=1             # <<<<<<<<<<<<<<
 *             else: # i1-th tetrahedron is partially out of obj2
 *                 # tmp1b: vertices of i1-th tetrahedron which is out of obj2
 */
        __pyx_v_counter0 = (__pyx_v_counter0 + 1);

        /* "pyqcstrc/icosah/mics.pyx":3522
 *                         tmp1a=np.append(tmp1a,obj1[i1])
 *                     counter0+=1
 *             elif counter2==0: # i1-th tetrahedron is out of obj2             # <<<<<<<<<<<<<<
 *                 if counter0==0:
 *                     tmp1a=obj1[i1].reshape(72)
 */
        break;
        default:

        /* "pyqcstrc/icosah/mics.pyx":3532
 *                 # get vertices of obj2 which are inside i1-th tetrahedron, and merge them into tmp1b, then do tetrahedralization
 *                 #
 *                 counter4=0             # <<<<<<<<<<<<<<
 *                 for i3 in range(len(tmp3a)):
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 */
        __pyx_v_counter4 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3533
 *                 #
 *                 counter4=0
 *                 for i3 in range(len(tmp3a)):             # <<<<<<<<<<<<<<
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                     if flag1==0: # inside
 */
        __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp3a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3533, __pyx_L1_error)
        __pyx_t_17 = __pyx_t_16;
        for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_17; __pyx_t_15+=1) {
          __pyx_v_i3 = __pyx_t_15;

          /* "pyqcstrc/icosah/mics.pyx":3534
 *                 counter4=0
 *                 for i3 in range(len(tmp3a)):
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])             # <<<<<<<<<<<<<<
 *                     if flag1==0: # inside
 *                         if counter4==0:
 */
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3534, __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, 3534, __pyx_L1_error)
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3534, __pyx_L1_error)
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_12, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3534, __pyx_L1_error)
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_12, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3534, __pyx_L1_error)
          __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj1), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_12, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3534, __pyx_L1_error)
          __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_19), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), ((PyArrayObject *)__pyx_t_4), 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 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;

          /* "pyqcstrc/icosah/mics.pyx":3535
 *                 for i3 in range(len(tmp3a)):
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                     if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                         if counter4==0:
 *                             tmp1d=tmp3a[i3].reshape(18)
 */
          __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3536
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                     if flag1==0: # inside
 *                         if counter4==0:             # <<<<<<<<<<<<<<
 *                             tmp1d=tmp3a[i3].reshape(18)
 *                         else:
 */
            __pyx_t_1 = ((__pyx_v_counter4 == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":3537
 *                     if flag1==0: # inside
 *                         if counter4==0:
 *                             tmp1d=tmp3a[i3].reshape(18)             # <<<<<<<<<<<<<<
 *                         else:
 *                             tmp1d=np.append(tmp1d,tmp3a[i3])
 */
              __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3537, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3537, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                }
              }
              __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_18);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3537, __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, 3537, __pyx_L1_error)
              __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
                __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_18 < 0)) {
                  PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.diminfo[0].strides = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1d.diminfo[0].shape = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 3537, __pyx_L1_error)
              }
              __pyx_t_6 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp1d, ((PyArrayObject *)__pyx_t_4));
              __pyx_t_4 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3536
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                     if flag1==0: # inside
 *                         if counter4==0:             # <<<<<<<<<<<<<<
 *                             tmp1d=tmp3a[i3].reshape(18)
 *                         else:
 */
              goto __pyx_L23;
            }

            /* "pyqcstrc/icosah/mics.pyx":3539
 *                             tmp1d=tmp3a[i3].reshape(18)
 *                         else:
 *                             tmp1d=np.append(tmp1d,tmp3a[i3])             # <<<<<<<<<<<<<<
 *                         counter4+=1
 *                     else:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3539, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), __pyx_v_i3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_19 = NULL;
              __pyx_t_18 = 0;
              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_18 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_tmp1d), __pyx_t_2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 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_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_19, ((PyObject *)__pyx_v_tmp1d), __pyx_t_2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              {
                __pyx_t_5 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3539, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                if (__pyx_t_19) {
                  __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_19); __pyx_t_19 = NULL;
                }
                __Pyx_INCREF(((PyObject *)__pyx_v_tmp1d));
                __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1d));
                PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_18, ((PyObject *)__pyx_v_tmp1d));
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_18, __pyx_t_2);
                __pyx_t_2 = 0;
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3539, __pyx_L1_error)
              __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
              {
                __Pyx_BufFmt_StackElem __pyx_stack[1];
                __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
                __pyx_t_18 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                if (unlikely(__pyx_t_18 < 0)) {
                  PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
                  if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1d, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp1d.diminfo[0].strides = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp1d.diminfo[0].shape = __pyx_pybuffernd_tmp1d.rcbuffer->pybuffer.shape[0];
                if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 3539, __pyx_L1_error)
              }
              __pyx_t_6 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp1d, ((PyArrayObject *)__pyx_t_4));
              __pyx_t_4 = 0;
            }
            __pyx_L23:;

            /* "pyqcstrc/icosah/mics.pyx":3540
 *                         else:
 *                             tmp1d=np.append(tmp1d,tmp3a[i3])
 *                         counter4+=1             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
            __pyx_v_counter4 = (__pyx_v_counter4 + 1);

            /* "pyqcstrc/icosah/mics.pyx":3535
 *                 for i3 in range(len(tmp3a)):
 *                     flag1=inside_outside_tetrahedron(tmp3a[i3],obj1[i1][0],obj1[i1][1],obj1[i1][2],obj1[i1][3])
 *                     if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                         if counter4==0:
 *                             tmp1d=tmp3a[i3].reshape(18)
 */
            goto __pyx_L22;
          }

          /* "pyqcstrc/icosah/mics.pyx":3542
 *                         counter4+=1
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 if counter4!=0:
 *                     tmp1b=np.append(tmp1b,tmp1d)
 */
          /*else*/ {
          }
          __pyx_L22:;
        }

        /* "pyqcstrc/icosah/mics.pyx":3543
 *                     else:
 *                         pass
 *                 if counter4!=0:             # <<<<<<<<<<<<<<
 *                     tmp1b=np.append(tmp1b,tmp1d)
 *                     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
        __pyx_t_1 = ((__pyx_v_counter4 != 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":3544
 *                         pass
 *                 if counter4!=0:
 *                     tmp1b=np.append(tmp1b,tmp1d)             # <<<<<<<<<<<<<<
 *                     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *                     # Tetrahedralization
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3544, __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, 3544, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_15 = 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_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp1d)};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3544, __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_tmp1b), ((PyObject *)__pyx_v_tmp1d)};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3544, __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_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3544, __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_15, ((PyObject *)__pyx_v_tmp1b));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1d));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1d));
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_15, ((PyObject *)__pyx_v_tmp1d));
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3544, __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, 3544, __pyx_L1_error)
          __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_15 < 0)) __PYX_ERR(0, 3544, __pyx_L1_error)
          }
          __pyx_t_6 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3545
 *                 if counter4!=0:
 *                     tmp1b=np.append(tmp1b,tmp1d)
 *                     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *                     # Tetrahedralization
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3545, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_16) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3545, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          __pyx_t_15 = 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_15 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_2, __pyx_int_6, __pyx_int_3};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __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[4] = {__pyx_t_3, __pyx_t_2, __pyx_int_6, __pyx_int_3};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_15, 3+__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __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_19 = PyTuple_New(3+__pyx_t_15); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3545, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            if (__pyx_t_3) {
              __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_3); __pyx_t_3 = NULL;
            }
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_15, __pyx_t_2);
            __Pyx_INCREF(__pyx_int_6);
            __Pyx_GIVEREF(__pyx_int_6);
            PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_15, __pyx_int_6);
            __Pyx_INCREF(__pyx_int_3);
            __Pyx_GIVEREF(__pyx_int_3);
            PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_15, __pyx_int_3);
            __pyx_t_2 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 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, 3545, __pyx_L1_error)
          __pyx_t_13 = ((PyArrayObject *)__pyx_t_4);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 0)) {
              PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
              if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_15 < 0)) __PYX_ERR(0, 3545, __pyx_L1_error)
          }
          __pyx_t_13 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3547
 *                     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *                     # Tetrahedralization
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)             # <<<<<<<<<<<<<<
 *                     if tmp4a.tolist()!=[[[[0]]]]:
 *                         # check each tetrahedron in tmp4a is not inside obj2
 */
          __pyx_t_4 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3b), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          {
            __Pyx_BufFmt_StackElem __pyx_stack[1];
            __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
            __pyx_t_15 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack);
            if (unlikely(__pyx_t_15 < 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_4mics_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_15 < 0)) __PYX_ERR(0, 3547, __pyx_L1_error)
          }
          __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_4));
          __pyx_t_4 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3548
 *                     # Tetrahedralization
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                     if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                         # check each tetrahedron in tmp4a is not inside obj2
 *                         for i4 in range(len(tmp4a)):
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp4a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_19 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_19)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_19);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          __pyx_t_4 = (__pyx_t_19) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_19) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3548, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3548, __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_19 = PyList_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3548, __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, 3548, __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, 3548, __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 = PyObject_RichCompare(__pyx_t_4, __pyx_t_19, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3548, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3548, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3550
 *                     if tmp4a.tolist()!=[[[[0]]]]:
 *                         # check each tetrahedron in tmp4a is not inside obj2
 *                         for i4 in range(len(tmp4a)):             # <<<<<<<<<<<<<<
 *                             tmp2c=centroid(tmp4a[i4])
 *                             counter7=0
 */
            __pyx_t_16 = PyObject_Length(((PyObject *)__pyx_v_tmp4a)); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3550, __pyx_L1_error)
            __pyx_t_17 = __pyx_t_16;
            for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_17; __pyx_t_15+=1) {
              __pyx_v_i4 = __pyx_t_15;

              /* "pyqcstrc/icosah/mics.pyx":3551
 *                         # check each tetrahedron in tmp4a is not inside obj2
 *                         for i4 in range(len(tmp4a)):
 *                             tmp2c=centroid(tmp4a[i4])             # <<<<<<<<<<<<<<
 *                             counter7=0
 *                             for i5 in range(len(obj2)):
 */
              __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3551, __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, 3551, __pyx_L1_error)
              __pyx_t_19 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5math1_centroid(((PyArrayObject *)__pyx_t_5), 0)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3551, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_19);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF_SET(__pyx_v_tmp2c, ((PyArrayObject *)__pyx_t_19));
              __pyx_t_19 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3552
 *                         for i4 in range(len(tmp4a)):
 *                             tmp2c=centroid(tmp4a[i4])
 *                             counter7=0             # <<<<<<<<<<<<<<
 *                             for i5 in range(len(obj2)):
 *                                 flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 */
              __pyx_v_counter7 = 0;

              /* "pyqcstrc/icosah/mics.pyx":3553
 *                             tmp2c=centroid(tmp4a[i4])
 *                             counter7=0
 *                             for i5 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                                 flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                                 if flag1==0: # inside
 */
              __pyx_t_20 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_20 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3553, __pyx_L1_error)
              __pyx_t_21 = __pyx_t_20;
              for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_21; __pyx_t_18+=1) {
                __pyx_v_i5 = __pyx_t_18;

                /* "pyqcstrc/icosah/mics.pyx":3554
 *                             counter7=0
 *                             for i5 in range(len(obj2)):
 *                                 flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])             # <<<<<<<<<<<<<<
 *                                 if flag1==0: # inside
 *                                     pass
 */
                __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_5);
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3554, __pyx_L1_error)
                __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_19, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3554, __pyx_L1_error)
                __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_19, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __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, 3554, __pyx_L1_error)
                __pyx_t_19 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_19);
                __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_19, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3554, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3554, __pyx_L1_error)
                __pyx_v_flag1 = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2c), ((PyArrayObject *)__pyx_t_5), ((PyArrayObject *)__pyx_t_4), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_3), 0);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "pyqcstrc/icosah/mics.pyx":3555
 *                             for i5 in range(len(obj2)):
 *                                 flag1=inside_outside_tetrahedron(tmp2c,obj2[i5][0],obj2[i5][1],obj2[i5][2],obj2[i5][3])
 *                                 if flag1==0: # inside             # <<<<<<<<<<<<<<
 *                                     pass
 *                                 else:
 */
                __pyx_t_1 = ((__pyx_v_flag1 == 0) != 0);
                if (__pyx_t_1) {
                  goto __pyx_L30;
                }

                /* "pyqcstrc/icosah/mics.pyx":3558
 *                                     pass
 *                                 else:
 *                                     if counter0==0:             # <<<<<<<<<<<<<<
 *                                         tmp1a=tmp4a[i4].reshape(72)
 *                                     else:
 */
                /*else*/ {
                  __pyx_t_1 = ((__pyx_v_counter0 == 0) != 0);
                  if (__pyx_t_1) {

                    /* "pyqcstrc/icosah/mics.pyx":3559
 *                                 else:
 *                                     if counter0==0:
 *                                         tmp1a=tmp4a[i4].reshape(72)             # <<<<<<<<<<<<<<
 *                                     else:
 *                                         tmp1a=np.append(tmp1a,tmp4a[i4])
 */
                    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3559, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3559, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __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_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_72);
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3559, __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, 3559, __pyx_L1_error)
                    __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
                    {
                      __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                      if (unlikely(__pyx_t_22 < 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_4mics_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_22 < 0)) __PYX_ERR(0, 3559, __pyx_L1_error)
                    }
                    __pyx_t_6 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
                    __pyx_t_3 = 0;

                    /* "pyqcstrc/icosah/mics.pyx":3558
 *                                     pass
 *                                 else:
 *                                     if counter0==0:             # <<<<<<<<<<<<<<
 *                                         tmp1a=tmp4a[i4].reshape(72)
 *                                     else:
 */
                    goto __pyx_L31;
                  }

                  /* "pyqcstrc/icosah/mics.pyx":3561
 *                                         tmp1a=tmp4a[i4].reshape(72)
 *                                     else:
 *                                         tmp1a=np.append(tmp1a,tmp4a[i4])             # <<<<<<<<<<<<<<
 *                                     counter0+1
 *                             """
 */
                  /*else*/ {
                    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3561, __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, 3561, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4a), __pyx_v_i4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3561, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_4);
                    __pyx_t_5 = NULL;
                    __pyx_t_22 = 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_22 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_2)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3561, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                      PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_tmp1a), __pyx_t_4};
                      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_22, 2+__pyx_t_22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3561, __pyx_L1_error)
                      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_19 = PyTuple_New(2+__pyx_t_22); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3561, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_19);
                      if (__pyx_t_5) {
                        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_19, 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_19, 0+__pyx_t_22, ((PyObject *)__pyx_v_tmp1a));
                      __Pyx_GIVEREF(__pyx_t_4);
                      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_22, __pyx_t_4);
                      __pyx_t_4 = 0;
                      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3561, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 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, 3561, __pyx_L1_error)
                    __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
                    {
                      __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_6, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
                      if (unlikely(__pyx_t_22 < 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_4mics_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_22 < 0)) __PYX_ERR(0, 3561, __pyx_L1_error)
                    }
                    __pyx_t_6 = 0;
                    __Pyx_DECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_3));
                    __pyx_t_3 = 0;
                  }
                  __pyx_L31:;

                  /* "pyqcstrc/icosah/mics.pyx":3562
 *                                     else:
 *                                         tmp1a=np.append(tmp1a,tmp4a[i4])
 *                                     counter0+1             # <<<<<<<<<<<<<<
 *                             """
 *                             counter5=0
 */
                  (void)((__pyx_v_counter0 + 1));
                }
                __pyx_L30:;
              }
            }

            /* "pyqcstrc/icosah/mics.pyx":3548
 *                     # Tetrahedralization
 *                     tmp4a=tetrahedralization_points(tmp3b,verbose-1)
 *                     if tmp4a.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 *                         # check each tetrahedron in tmp4a is not inside obj2
 *                         for i4 in range(len(tmp4a)):
 */
            goto __pyx_L25;
          }

          /* "pyqcstrc/icosah/mics.pyx":3588
 *                             """
 *                     else:
 *                         pass             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          /*else*/ {
          }
          __pyx_L25:;

          /* "pyqcstrc/icosah/mics.pyx":3543
 *                     else:
 *                         pass
 *                 if counter4!=0:             # <<<<<<<<<<<<<<
 *                     tmp1b=np.append(tmp1b,tmp1d)
 *                     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 */
          goto __pyx_L24;
        }

        /* "pyqcstrc/icosah/mics.pyx":3590
 *                         pass
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *         if tmp1a.tolist()!=[0]:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 */
        /*else*/ {
        }
        __pyx_L24:;
        break;
      }
    }

    /* "pyqcstrc/icosah/mics.pyx":3591
 *                 else:
 *                     pass
 *         if tmp1a.tolist()!=[0]:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v01,v02,v03=obj_volume_6d(tmp4a)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_19 = NULL;
    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 = (__pyx_t_19) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_19) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3591, __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, 3591, __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_19 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3591, __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_19); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3591, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3592
 *                     pass
 *         if tmp1a.tolist()!=[0]:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             v01,v02,v03=obj_volume_6d(tmp4a)
 *             vol=(v01+v02*TAU)/v03
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_tmp1a)); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3592, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_FromDouble((((double)__pyx_t_11) / 72.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_7 = 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_7 = 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_19 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3592, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_19);
        __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_19 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3592, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_19);
        __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, 3592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = 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_19 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __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, 3592, __pyx_L1_error)
      __pyx_t_23 = ((PyArrayObject *)__pyx_t_19);
      {
        __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_23, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp4a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp4a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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, 3592, __pyx_L1_error)
      }
      __pyx_t_23 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp4a, ((PyArrayObject *)__pyx_t_19));
      __pyx_t_19 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3593
 *         if tmp1a.tolist()!=[0]:
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v01,v02,v03=obj_volume_6d(tmp4a)             # <<<<<<<<<<<<<<
 *             vol=(v01+v02*TAU)/v03
 *             if verbose>0:
 */
      __pyx_t_19 = __pyx_f_8pyqcstrc_6icosah_5utils_obj_volume_6d(((PyArrayObject *)__pyx_v_tmp4a), 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (likely(__pyx_t_19 != Py_None)) {
        PyObject* sequence = __pyx_t_19;
        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, 3593, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = 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_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3593, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 3593, __pyx_L1_error)
      }
      __pyx_t_24 = __Pyx_PyInt_As_long(__pyx_t_2); if (unlikely((__pyx_t_24 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3593, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_25 = __Pyx_PyInt_As_long(__pyx_t_5); if (unlikely((__pyx_t_25 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3593, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_26 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_26 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 3593, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_v01 = __pyx_t_24;
      __pyx_v_v02 = __pyx_t_25;
      __pyx_v_v03 = __pyx_t_26;

      /* "pyqcstrc/icosah/mics.pyx":3594
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v01,v02,v03=obj_volume_6d(tmp4a)
 *             vol=(v01+v02*TAU)/v03             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('          A not B obj, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 */
      __pyx_t_27 = (__pyx_v_v01 + (__pyx_v_v02 * __pyx_v_8pyqcstrc_6icosah_4mics_TAU));
      if (unlikely(__pyx_v_v03 == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "float division");
        __PYX_ERR(0, 3594, __pyx_L1_error)
      }
      __pyx_v_vol = (__pyx_t_27 / ((__pyx_t_5numpy_float64_t)__pyx_v_v03));

      /* "pyqcstrc/icosah/mics.pyx":3595
 *             v01,v02,v03=obj_volume_6d(tmp4a)
 *             vol=(v01+v02*TAU)/v03
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('          A not B obj, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 *             return tmp4a
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3596
 *             vol=(v01+v02*TAU)/v03
 *             if verbose>0:
 *                 print('          A not B obj, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
        __pyx_t_19 = PyTuple_New(9); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __pyx_t_11 = 0;
        __pyx_t_28 = 127;
        __Pyx_INCREF(__pyx_kp_u_A_not_B_obj_volume);
        __pyx_t_11 += 32;
        __Pyx_GIVEREF(__pyx_kp_u_A_not_B_obj_volume);
        PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_kp_u_A_not_B_obj_volume);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v01, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_kp_u__17);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v02, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__17);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__17);
        PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_kp_u__17);
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_v03, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_19, 5, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u__18);
        __pyx_t_11 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__18);
        PyTuple_SET_ITEM(__pyx_t_19, 6, __pyx_kp_u__18);
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_kp_u_10_6f); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_28 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_28) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_28;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_19, 7, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__19);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__19);
        PyTuple_SET_ITEM(__pyx_t_19, 8, __pyx_kp_u__19);
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __pyx_t_11, __pyx_t_28); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3595
 *             v01,v02,v03=obj_volume_6d(tmp4a)
 *             vol=(v01+v02*TAU)/v03
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('          A not B obj, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 *             return tmp4a
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3597
 *             if verbose>0:
 *                 print('          A not B obj, volume = %d %d %d (%10.6f)'%(v01,v02,v03,vol))
 *             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/mics.pyx":3591
 *                 else:
 *                     pass
 *         if tmp1a.tolist()!=[0]:             # <<<<<<<<<<<<<<
 *             tmp4a=tmp1a.reshape(int(len(tmp1a)/72),4,6,3)
 *             v01,v02,v03=obj_volume_6d(tmp4a)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3599
 *             return tmp4a
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         return obj1
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3599, __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, 3599, __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, 3599, __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, 3599, __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, 3599, __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, 3599, __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_19 = (__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_19)) __PYX_ERR(0, 3599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_19) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_19, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3599, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_19);
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }

    /* "pyqcstrc/icosah/mics.pyx":3477
 * 
 *     tmp1a=np.array([0])
 *     if obj2.tolist()!=[[[[0]]]]:             # <<<<<<<<<<<<<<
 * 
 *         # get surfaces of obj2
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3601
 *             return np.array([[[[0]]]])
 *     else:
 *         return obj1             # <<<<<<<<<<<<<<
 * 
 * # Developing
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj1));
    __pyx_r = ((PyArrayObject *)__pyx_v_obj1);
    goto __pyx_L0;
  }

  /* "pyqcstrc/icosah/mics.pyx":3455
 *         return np.array([[[[0]]]])
 * 
 * cpdef np.ndarray object_subtraction_3(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_12);
  __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_obj1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp4a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_3", __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_obj2_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1d.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.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_tmp1d);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4a);
  __Pyx_XDECREF((PyObject *)__pyx_v_obj2_surface);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2c);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_25object_subtraction_3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8pyqcstrc_6icosah_4mics_25object_subtraction_3(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("object_subtraction_3 (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("object_subtraction_3", 1, 3, 3, 1); __PYX_ERR(0, 3455, __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("object_subtraction_3", 1, 3, 3, 2); __PYX_ERR(0, 3455, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "object_subtraction_3") < 0)) __PYX_ERR(0, 3455, __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, 3457, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("object_subtraction_3", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3455, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.object_subtraction_3", __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, 3455, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj2), __pyx_ptype_5numpy_ndarray, 1, "obj2", 0))) __PYX_ERR(0, 3456, __pyx_L1_error)
  __pyx_r = __pyx_pf_8pyqcstrc_6icosah_4mics_24object_subtraction_3(__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_4mics_24object_subtraction_3(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("object_subtraction_3", 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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3455, __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3455, __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_4mics_object_subtraction_3(((PyArrayObject *)__pyx_v_obj1), ((PyArrayObject *)__pyx_v_obj2), __pyx_v_verbose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3455, __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.mics.object_subtraction_3", __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/mics.pyx":3604
 * 
 * # Developing
 * cdef np.ndarray subtraction_tetrahedron_object(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                 np.ndarray[DTYPE_int_t, ndim=3] point_b,
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_subtraction_tetrahedron_object(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_point_b, CYTHON_UNUSED PyArrayObject *__pyx_v_obj2_surface, PyArrayObject *__pyx_v_obj3_surface, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter0;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp2b = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2_surface;
  __Pyx_Buffer __pyx_pybuffer_obj2_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3_surface;
  __Pyx_Buffer __pyx_pybuffer_obj3_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_b;
  __Pyx_Buffer __pyx_pybuffer_point_b;
  __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_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1c;
  __Pyx_Buffer __pyx_pybuffer_tmp1c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2b;
  __Pyx_Buffer __pyx_pybuffer_tmp2b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3a;
  __Pyx_Buffer __pyx_pybuffer_tmp3a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp3b;
  __Pyx_Buffer __pyx_pybuffer_tmp3b;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyArrayObject *__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;
  Py_ssize_t __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;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("subtraction_tetrahedron_object", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __pyx_pybuffer_tmp2b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2b.refcount = 0;
  __pyx_pybuffernd_tmp2b.data = NULL;
  __pyx_pybuffernd_tmp2b.rcbuffer = &__pyx_pybuffer_tmp2b;
  __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_tetrahedron.pybuffer.buf = NULL;
  __pyx_pybuffer_tetrahedron.refcount = 0;
  __pyx_pybuffernd_tetrahedron.data = NULL;
  __pyx_pybuffernd_tetrahedron.rcbuffer = &__pyx_pybuffer_tetrahedron;
  __pyx_pybuffer_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  __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_obj2_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_surface.refcount = 0;
  __pyx_pybuffernd_obj2_surface.data = NULL;
  __pyx_pybuffernd_obj2_surface.rcbuffer = &__pyx_pybuffer_obj2_surface;
  __pyx_pybuffer_obj3_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3_surface.refcount = 0;
  __pyx_pybuffernd_obj3_surface.data = NULL;
  __pyx_pybuffernd_obj3_surface.rcbuffer = &__pyx_pybuffer_obj3_surface;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3604, __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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3604, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3604, __pyx_L1_error)
  }
  __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];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3604, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2_surface.diminfo[0].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_surface.diminfo[0].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_surface.diminfo[1].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_surface.diminfo[1].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_surface.diminfo[2].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_surface.diminfo[2].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_surface.diminfo[3].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_surface.diminfo[3].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3604, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3_surface.diminfo[0].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3_surface.diminfo[0].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3_surface.diminfo[1].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3_surface.diminfo[1].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3_surface.diminfo[2].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3_surface.diminfo[2].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3_surface.diminfo[3].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3_surface.diminfo[3].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[3];

  /* "pyqcstrc/icosah/mics.pyx":3622
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a,obj_common
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       subtraction_tetrahedron_object()')
 *     #print 'Subtraction_tetrahedron_object()'
 */
  __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3623
 * 
 *     if verbose>0:
 *         print('       subtraction_tetrahedron_object()')             # <<<<<<<<<<<<<<
 *     #print 'Subtraction_tetrahedron_object()'
 *     #print 'Intersection_two_tetrahedron_mod2()'
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3622
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a,obj_common
 * 
 *     if verbose>0:             # <<<<<<<<<<<<<<
 *         print('       subtraction_tetrahedron_object()')
 *     #print 'Subtraction_tetrahedron_object()'
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3632
 *     #####################################
 *     # (1) get vertices of tetrahedron which are outside of obj2 (points A)
 *     counter1=0             # <<<<<<<<<<<<<<
 *     for i1 in range(4):
 *         tmp2a=tetrahedron[i1]
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3633
 *     # (1) get vertices of tetrahedron which are outside of obj2 (points A)
 *     counter1=0
 *     for i1 in range(4):             # <<<<<<<<<<<<<<
 *         tmp2a=tetrahedron[i1]
 *         counter0=0
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 4; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":3634
 *     counter1=0
 *     for i1 in range(4):
 *         tmp2a=tetrahedron[i1]             # <<<<<<<<<<<<<<
 *         counter0=0
 *         for i2 in range(len(obj2)):
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __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, 3634, __pyx_L1_error)
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_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_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_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_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_5 < 0)) __PYX_ERR(0, 3634, __pyx_L1_error)
    }
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3635
 *     for i1 in range(4):
 *         tmp2a=tetrahedron[i1]
 *         counter0=0             # <<<<<<<<<<<<<<
 *         for i2 in range(len(obj2)):
 *             tmp3a=obj2[i2]
 */
    __pyx_v_counter0 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3636
 *         tmp2a=tetrahedron[i1]
 *         counter0=0
 *         for i2 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3636, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_9;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_10; __pyx_t_5+=1) {
      __pyx_v_i2 = __pyx_t_5;

      /* "pyqcstrc/icosah/mics.pyx":3637
 *         counter0=0
 *         for i2 in range(len(obj2)):
 *             tmp3a=obj2[i2]             # <<<<<<<<<<<<<<
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag==0: # inside
 */
      __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, 3637, __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, 3637, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
      {
        __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_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_12 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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, 3637, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3638
 *         for i2 in range(len(obj2)):
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])             # <<<<<<<<<<<<<<
 *             if flag==0: # inside
 *                 counter0+=1
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3638, __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, 3638, __pyx_L1_error)
      __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3638, __pyx_L1_error)
      __pyx_t_14 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3638, __pyx_L1_error)
      __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3638, __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, 3638, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_13), ((PyArrayObject *)__pyx_t_14), ((PyArrayObject *)__pyx_t_15), 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3639
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag==0: # inside             # <<<<<<<<<<<<<<
 *                 counter0+=1
 *                 break
 */
      __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3640
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag==0: # inside
 *                 counter0+=1             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
        __pyx_v_counter0 = (__pyx_v_counter0 + 1);

        /* "pyqcstrc/icosah/mics.pyx":3641
 *             if flag==0: # inside
 *                 counter0+=1
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        goto __pyx_L7_break;

        /* "pyqcstrc/icosah/mics.pyx":3639
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag==0: # inside             # <<<<<<<<<<<<<<
 *                 counter0+=1
 *                 break
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3643
 *                 break
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *         if counter0==0:
 *             if counter1==0:
 */
      /*else*/ {
      }
    }
    __pyx_L7_break:;

    /* "pyqcstrc/icosah/mics.pyx":3644
 *             else:
 *                 pass
 *         if counter0==0:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tmp2a.reshape(18)
 */
    __pyx_t_1 = ((__pyx_v_counter0 == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3645
 *                 pass
 *         if counter0==0:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp2a.reshape(18)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3646
 *         if counter0==0:
 *             if counter1==0:
 *                 tmp1a=tmp2a.reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp2a)
 */
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp2a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
          }
        }
        __pyx_t_15 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_13, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3646, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_15);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_5 < 0)) __PYX_ERR(0, 3646, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_15));
        __pyx_t_15 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3645
 *                 pass
 *         if counter0==0:
 *             if counter1==0:             # <<<<<<<<<<<<<<
 *                 tmp1a=tmp2a.reshape(18)
 *             else:
 */
        goto __pyx_L10;
      }

      /* "pyqcstrc/icosah/mics.pyx":3648
 *                 tmp1a=tmp2a.reshape(18)
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp2a)             # <<<<<<<<<<<<<<
 *             counter1+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3648, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_append); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3648, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp2a)};
          __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3648, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
          PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp2a)};
          __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3648, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        {
          __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3648, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
          PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1a));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp2a));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2a));
          PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, ((PyObject *)__pyx_v_tmp2a));
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3648, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3648, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_15);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer);
          __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_5 < 0)) __PYX_ERR(0, 3648, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_15));
        __pyx_t_15 = 0;
      }
      __pyx_L10:;

      /* "pyqcstrc/icosah/mics.pyx":3649
 *             else:
 *                 tmp1a=np.append(tmp1a,tmp2a)
 *             counter1+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter1 = (__pyx_v_counter1 + 1);

      /* "pyqcstrc/icosah/mics.pyx":3644
 *             else:
 *                 pass
 *         if counter0==0:             # <<<<<<<<<<<<<<
 *             if counter1==0:
 *                 tmp1a=tmp2a.reshape(18)
 */
      goto __pyx_L9;
    }

    /* "pyqcstrc/icosah/mics.pyx":3651
 *             counter1+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     if counter1==0: # tetrahedron is inside obj3
 *         #print 'inconsistency: common part is empty?'
 */
    /*else*/ {
    }
    __pyx_L9:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3652
 *         else:
 *             pass
 *     if counter1==0: # tetrahedron is inside obj3             # <<<<<<<<<<<<<<
 *         #print 'inconsistency: common part is empty?'
 *         return np.array([[[0]]])
 */
  __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3654
 *     if counter1==0: # tetrahedron is inside obj3
 *         #print 'inconsistency: common part is empty?'
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 *     else:
 *         #print '    points A:'
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3654, __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_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_13);
    PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
    __pyx_t_13 = 0;
    __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
    __pyx_t_14 = 0;
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_15 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3654, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":3652
 *         else:
 *             pass
 *     if counter1==0: # tetrahedron is inside obj3             # <<<<<<<<<<<<<<
 *         #print 'inconsistency: common part is empty?'
 *         return np.array([[[0]]])
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3657
 *     else:
 *         #print '    points A:'
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)             # <<<<<<<<<<<<<<
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)
 *         #for i1 in range(len(tmp3a)):
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3657, __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, 3657, __pyx_L1_error)
    __pyx_t_13 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = NULL;
    __pyx_t_3 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_13, __pyx_int_6, __pyx_int_3};
      __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3657, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_13, __pyx_int_6, __pyx_int_3};
      __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3657, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_14) {
        __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_14); __pyx_t_14 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_3, __pyx_t_13);
      __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_13 = 0;
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3657, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_15);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 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_4mics_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_3 < 0)) __PYX_ERR(0, 3657, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_15));
    __pyx_t_15 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3658
 *         #print '    points A:'
 *         tmp3a=tmp1a.reshape(int(len(tmp1a)/18),6,3)
 *         tmp3a=remove_doubling_dim3_in_perp_space(tmp3a)             # <<<<<<<<<<<<<<
 *         #for i1 in range(len(tmp3a)):
 *         #    v1,v2,v3,v4,v5,v6=projection(tmp3a[i1][0],tmp3a[i1][1],tmp3a[i1][2],tmp3a[i1][3],tmp3a[i1][4],tmp3a[i1][5])
 */
    __pyx_t_15 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3a), 0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_15), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_3 < 0)) __PYX_ERR(0, 3658, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_15));
    __pyx_t_15 = 0;
  }

  /* "pyqcstrc/icosah/mics.pyx":3695
 *     # (3) get points in (points B) which are inside tetrahedron -- > (points C)
 *     #tmp1b=np.append(tmp1b,obj3_surface)
 *     tmp1b=np.append(point_b,obj3_surface)             # <<<<<<<<<<<<<<
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __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_17))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_point_b), ((PyObject *)__pyx_v_obj3_surface)};
    __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3695, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_point_b), ((PyObject *)__pyx_v_obj3_surface)};
    __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3695, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_point_b));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_point_b));
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_3, ((PyObject *)__pyx_v_point_b));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj3_surface));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_obj3_surface));
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_3, ((PyObject *)__pyx_v_obj3_surface));
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_13, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3695, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_15);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3695, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_15);
  __pyx_t_15 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3696
 *     #tmp1b=np.append(tmp1b,obj3_surface)
 *     tmp1b=np.append(point_b,obj3_surface)
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     counter2=0
 */
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3696, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_13, __pyx_int_6, __pyx_int_3};
    __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_13, __pyx_int_6, __pyx_int_3};
    __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_14 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_3, __pyx_t_13);
    __Pyx_INCREF(__pyx_int_6);
    __Pyx_GIVEREF(__pyx_int_6);
    PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_3, __pyx_int_6);
    __Pyx_INCREF(__pyx_int_3);
    __Pyx_GIVEREF(__pyx_int_3);
    PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_3, __pyx_int_3);
    __pyx_t_13 = 0;
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3696, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_15);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_3 < 0)) __PYX_ERR(0, 3696, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_15);
  __pyx_t_15 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3697
 *     tmp1b=np.append(point_b,obj3_surface)
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)             # <<<<<<<<<<<<<<
 *     counter2=0
 *     for i1 in range(len(tmp3b)):
 */
  __pyx_t_15 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3b), 0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_15), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 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_4mics_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_3 < 0)) __PYX_ERR(0, 3697, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_15));
  __pyx_t_15 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3698
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     counter2=0             # <<<<<<<<<<<<<<
 *     for i1 in range(len(tmp3b)):
 *         tmp2b=tmp3b[i1]
 */
  __pyx_v_counter2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3699
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     counter2=0
 *     for i1 in range(len(tmp3b)):             # <<<<<<<<<<<<<<
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3699, __pyx_L1_error)
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_10; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":3700
 *     counter2=0
 *     for i1 in range(len(tmp3b)):
 *         tmp2b=tmp3b[i1]             # <<<<<<<<<<<<<<
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside
 */
    __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3700, __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, 3700, __pyx_L1_error)
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_15);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 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_tmp2b.diminfo[0].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2b.diminfo[0].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2b.diminfo[1].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2b.diminfo[1].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3700, __pyx_L1_error)
    }
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp2b, ((PyArrayObject *)__pyx_t_15));
    __pyx_t_15 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3701
 *     for i1 in range(len(tmp3b)):
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])             # <<<<<<<<<<<<<<
 *         if flag==0: # inside
 *             if counter2==0:
 */
    __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3701, __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, 3701, __pyx_L1_error)
    __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3701, __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, 3701, __pyx_L1_error)
    __pyx_t_14 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3701, __pyx_L1_error)
    __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3701, __pyx_L1_error)
    __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2b), ((PyArrayObject *)__pyx_t_15), ((PyArrayObject *)__pyx_t_17), ((PyArrayObject *)__pyx_t_14), ((PyArrayObject *)__pyx_t_13), 0);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3702
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1b=tmp2b.reshape(18)
 */
    __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3703
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp2b.reshape(18)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3704
 *         if flag==0: # inside
 *             if counter2==0:
 *                 tmp1b=tmp2b.reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp2b)
 */
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp2b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3704, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_17 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
          }
        }
        __pyx_t_13 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_17, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3704, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3704, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_13);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_5 < 0)) __PYX_ERR(0, 3704, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_13));
        __pyx_t_13 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3703
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp2b.reshape(18)
 *             else:
 */
        goto __pyx_L15;
      }

      /* "pyqcstrc/icosah/mics.pyx":3706
 *                 tmp1b=tmp2b.reshape(18)
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp2b)             # <<<<<<<<<<<<<<
 *             counter2+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_17)) {
          PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp2b)};
          __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3706, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_13);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
          PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp2b)};
          __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3706, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_GOTREF(__pyx_t_13);
        } else
        #endif
        {
          __pyx_t_15 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3706, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
          PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1b));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp2b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2b));
          PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_5, ((PyObject *)__pyx_v_tmp2b));
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3706, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3706, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_13);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_5 < 0)) __PYX_ERR(0, 3706, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_13));
        __pyx_t_13 = 0;
      }
      __pyx_L15:;

      /* "pyqcstrc/icosah/mics.pyx":3707
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp2b)
 *             counter2+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter2 = (__pyx_v_counter2 + 1);

      /* "pyqcstrc/icosah/mics.pyx":3702
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1b=tmp2b.reshape(18)
 */
      goto __pyx_L14;
    }

    /* "pyqcstrc/icosah/mics.pyx":3709
 *             counter2+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 */
    /*else*/ {
    }
    __pyx_L14:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3710
 *         else:
 *             pass
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *     #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     #print '    points C:'
 */
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3710, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_14 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_15, __pyx_int_6, __pyx_int_3};
    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3710, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
    PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_15, __pyx_int_6, __pyx_int_3};
    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3710, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_14) {
      __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_3, __pyx_t_15);
    __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_15 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3710, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_13);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 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_4mics_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_3 < 0)) __PYX_ERR(0, 3710, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_13));
  __pyx_t_13 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3721
 *     #####################################
 *     # (4) merge points A and points C
 *     if counter1==0 and counter2==0:             # <<<<<<<<<<<<<<
 *         return np.array([[[0]]])
 *     else:
 */
  __pyx_t_18 = ((__pyx_v_counter1 == 0) != 0);
  if (__pyx_t_18) {
  } else {
    __pyx_t_1 = __pyx_t_18;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_18 = ((__pyx_v_counter2 == 0) != 0);
  __pyx_t_1 = __pyx_t_18;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3722
 *     # (4) merge points A and points C
 *     if counter1==0 and counter2==0:
 *         return np.array([[[0]]])             # <<<<<<<<<<<<<<
 *     else:
 *         if counter1!=0 and counter2!=0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3722, __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_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_17);
    PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_15);
    PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_15);
    __pyx_t_15 = 0;
    __pyx_t_15 = NULL;
    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_13 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3722, __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, 3722, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":3721
 *     #####################################
 *     # (4) merge points A and points C
 *     if counter1==0 and counter2==0:             # <<<<<<<<<<<<<<
 *         return np.array([[[0]]])
 *     else:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3724
 *         return np.array([[[0]]])
 *     else:
 *         if counter1!=0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=np.append(tmp1a,tmp1b)
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
  /*else*/ {
    __pyx_t_18 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_1 = __pyx_t_18;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_18 = ((__pyx_v_counter2 != 0) != 0);
    __pyx_t_1 = __pyx_t_18;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3725
 *     else:
 *         if counter1!=0 and counter2!=0:
 *             tmp1c=np.append(tmp1a,tmp1b)             # <<<<<<<<<<<<<<
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1!=0 and counter2==0:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __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_17))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1b)};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3725, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1b)};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3725, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3725, __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_tmp1a));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_3, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_3, ((PyObject *)__pyx_v_tmp1b));
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3725, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3725, __pyx_L1_error)
      __pyx_t_16 = ((PyArrayObject *)__pyx_t_13);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3725, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __pyx_v_tmp1c = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3726
 *         if counter1!=0 and counter2!=0:
 *             tmp1c=np.append(tmp1a,tmp1b)
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)             # <<<<<<<<<<<<<<
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3726, __pyx_L1_error)
      __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3726, __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_17))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_15, __pyx_int_6, __pyx_int_3};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3726, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_15, __pyx_int_6, __pyx_int_3};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3726, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_3, __pyx_t_15);
        __Pyx_INCREF(__pyx_int_6);
        __Pyx_GIVEREF(__pyx_int_6);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_3, __pyx_int_6);
        __Pyx_INCREF(__pyx_int_3);
        __Pyx_GIVEREF(__pyx_int_3);
        PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_3, __pyx_int_3);
        __pyx_t_15 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3726, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":3724
 *         return np.array([[[0]]])
 *     else:
 *         if counter1!=0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=np.append(tmp1a,tmp1b)
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3727
 *             tmp1c=np.append(tmp1a,tmp1b)
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1!=0 and counter2==0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1a
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    __pyx_t_18 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_1 = __pyx_t_18;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_t_18 = ((__pyx_v_counter2 == 0) != 0);
    __pyx_t_1 = __pyx_t_18;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3728
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a             # <<<<<<<<<<<<<<
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1==0 and counter2!=0:
 */
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3728, __pyx_L1_error)
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
      __pyx_v_tmp1c = __pyx_v_tmp1a;

      /* "pyqcstrc/icosah/mics.pyx":3729
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)             # <<<<<<<<<<<<<<
 *         elif counter1==0 and counter2!=0:
 *             tmp1c=tmp1b
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3729, __pyx_L1_error)
      __pyx_t_14 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = NULL;
      __pyx_t_3 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_15)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_14, __pyx_int_6, __pyx_int_3};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3729, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_15, __pyx_t_14, __pyx_int_6, __pyx_int_3};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3729, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __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_14);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_3, __pyx_t_14);
        __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_14 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3729, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3729, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":3727
 *             tmp1c=np.append(tmp1a,tmp1b)
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1!=0 and counter2==0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1a
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3730
 *             tmp1c=tmp1a
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1==0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1b
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    __pyx_t_18 = ((__pyx_v_counter1 == 0) != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_1 = __pyx_t_18;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_t_18 = ((__pyx_v_counter2 != 0) != 0);
    __pyx_t_1 = __pyx_t_18;
    __pyx_L24_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3731
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1==0 and counter2!=0:
 *             tmp1c=tmp1b             # <<<<<<<<<<<<<<
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         else:
 */
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3731, __pyx_L1_error)
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
      __pyx_v_tmp1c = __pyx_v_tmp1b;

      /* "pyqcstrc/icosah/mics.pyx":3732
 *         elif counter1==0 and counter2!=0:
 *             tmp1c=tmp1b
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[0]]])
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3732, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_14 = NULL;
      __pyx_t_3 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_2, __pyx_int_6, __pyx_int_3};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3732, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[4] = {__pyx_t_14, __pyx_t_2, __pyx_int_6, __pyx_int_3};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3732, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_14) {
          __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_3, __pyx_t_2);
        __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_2 = 0;
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3732, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L0;

      /* "pyqcstrc/icosah/mics.pyx":3730
 *             tmp1c=tmp1a
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         elif counter1==0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1b
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3734
 *             return tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         else:
 *             return np.array([[[0]]])             # <<<<<<<<<<<<<<
 * 
 * # Developing
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3734, __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, 3734, __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, 3734, __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_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_17);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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_13 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_17);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3734, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;
      goto __pyx_L0;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":3604
 * 
 * # Developing
 * cdef np.ndarray subtraction_tetrahedron_object(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                 np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                 np.ndarray[DTYPE_int_t, ndim=3] point_b,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  { 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_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.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_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.subtraction_tetrahedron_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.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_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.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_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyqcstrc/icosah/mics.pyx":3737
 * 
 * # Developing
 * cdef np.ndarray subtraction_tetrahedron_object_dev(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                     np.ndarray[DTYPE_int_t, ndim=3] point_b,
 */

static PyArrayObject *__pyx_f_8pyqcstrc_6icosah_4mics_subtraction_tetrahedron_object_dev(PyArrayObject *__pyx_v_tetrahedron, PyArrayObject *__pyx_v_obj2, PyArrayObject *__pyx_v_point_b, CYTHON_UNUSED PyArrayObject *__pyx_v_obj2_surface, PyArrayObject *__pyx_v_obj3_surface, int __pyx_v_verbose) {
  int __pyx_v_flag;
  int __pyx_v_i1;
  int __pyx_v_i2;
  int __pyx_v_counter1;
  int __pyx_v_counter2;
  int __pyx_v_counter3;
  int __pyx_v_counter4;
  PyArrayObject *__pyx_v_tmp1a = 0;
  PyArrayObject *__pyx_v_tmp1b = 0;
  PyArrayObject *__pyx_v_tmp1c = 0;
  PyArrayObject *__pyx_v_tmp2a = 0;
  PyArrayObject *__pyx_v_tmp2b = 0;
  PyArrayObject *__pyx_v_tmp3a = 0;
  PyArrayObject *__pyx_v_tmp3b = 0;
  PyArrayObject *__pyx_v_tmp3c = 0;
  PyArrayObject *__pyx_v_tmp4c = NULL;
  PyObject *__pyx_v_tmp2c = NULL;
  Py_ssize_t __pyx_v_i3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2;
  __Pyx_Buffer __pyx_pybuffer_obj2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj2_surface;
  __Pyx_Buffer __pyx_pybuffer_obj2_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_obj3_surface;
  __Pyx_Buffer __pyx_pybuffer_obj3_surface;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_point_b;
  __Pyx_Buffer __pyx_pybuffer_point_b;
  __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_tmp1b;
  __Pyx_Buffer __pyx_pybuffer_tmp1b;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp1c;
  __Pyx_Buffer __pyx_pybuffer_tmp1c;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2a;
  __Pyx_Buffer __pyx_pybuffer_tmp2a;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tmp2b;
  __Pyx_Buffer __pyx_pybuffer_tmp2b;
  __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_tmp3c;
  __Pyx_Buffer __pyx_pybuffer_tmp3c;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyArrayObject *__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;
  Py_ssize_t __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;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("subtraction_tetrahedron_object_dev", 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_tmp2a.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2a.refcount = 0;
  __pyx_pybuffernd_tmp2a.data = NULL;
  __pyx_pybuffernd_tmp2a.rcbuffer = &__pyx_pybuffer_tmp2a;
  __pyx_pybuffer_tmp2b.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp2b.refcount = 0;
  __pyx_pybuffernd_tmp2b.data = NULL;
  __pyx_pybuffernd_tmp2b.rcbuffer = &__pyx_pybuffer_tmp2b;
  __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_tmp3c.pybuffer.buf = NULL;
  __pyx_pybuffer_tmp3c.refcount = 0;
  __pyx_pybuffernd_tmp3c.data = NULL;
  __pyx_pybuffernd_tmp3c.rcbuffer = &__pyx_pybuffer_tmp3c;
  __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_obj2.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2.refcount = 0;
  __pyx_pybuffernd_obj2.data = NULL;
  __pyx_pybuffernd_obj2.rcbuffer = &__pyx_pybuffer_obj2;
  __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_obj2_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj2_surface.refcount = 0;
  __pyx_pybuffernd_obj2_surface.data = NULL;
  __pyx_pybuffernd_obj2_surface.rcbuffer = &__pyx_pybuffer_obj2_surface;
  __pyx_pybuffer_obj3_surface.pybuffer.buf = NULL;
  __pyx_pybuffer_obj3_surface.refcount = 0;
  __pyx_pybuffernd_obj3_surface.data = NULL;
  __pyx_pybuffernd_obj3_surface.rcbuffer = &__pyx_pybuffer_obj3_surface;
  {
    __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_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3737, __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_obj2.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3737, __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_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer, (PyObject*)__pyx_v_point_b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3737, __pyx_L1_error)
  }
  __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];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj2_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3737, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj2_surface.diminfo[0].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj2_surface.diminfo[0].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj2_surface.diminfo[1].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj2_surface.diminfo[1].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj2_surface.diminfo[2].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj2_surface.diminfo[2].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj2_surface.diminfo[3].strides = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj2_surface.diminfo[3].shape = __pyx_pybuffernd_obj2_surface.rcbuffer->pybuffer.shape[3];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer, (PyObject*)__pyx_v_obj3_surface, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 4, 0, __pyx_stack) == -1)) __PYX_ERR(0, 3737, __pyx_L1_error)
  }
  __pyx_pybuffernd_obj3_surface.diminfo[0].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_obj3_surface.diminfo[0].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_obj3_surface.diminfo[1].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_obj3_surface.diminfo[1].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_obj3_surface.diminfo[2].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_obj3_surface.diminfo[2].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[2]; __pyx_pybuffernd_obj3_surface.diminfo[3].strides = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.strides[3]; __pyx_pybuffernd_obj3_surface.diminfo[3].shape = __pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer.shape[3];

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

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

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

  /* "pyqcstrc/icosah/mics.pyx":3758
 *         print('         subtraction_tetrahedron_object_dev()')
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *     # common part between tetrahedron and obj3.
 *     #obj_common=intersection_using_tetrahedron(tetrahedron.reshape(1,4,6,3),obj3,path)
 */
  /*else*/ {
  }
  __pyx_L3:;

  /* "pyqcstrc/icosah/mics.pyx":3796
 *     #####################################
 *     # (1) get vertices of tetrahedron which are outside of obj2 (points A)
 *     counter1=0             # <<<<<<<<<<<<<<
 *     for i1 in range(4):
 *         tmp2a=tetrahedron[i1]
 */
  __pyx_v_counter1 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3797
 *     # (1) get vertices of tetrahedron which are outside of obj2 (points A)
 *     counter1=0
 *     for i1 in range(4):             # <<<<<<<<<<<<<<
 *         tmp2a=tetrahedron[i1]
 *         for i2 in range(len(obj2)):
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 4; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":3798
 *     counter1=0
 *     for i1 in range(4):
 *         tmp2a=tetrahedron[i1]             # <<<<<<<<<<<<<<
 *         for i2 in range(len(obj2)):
 *             tmp3a=obj2[i2]
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3798, __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, 3798, __pyx_L1_error)
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_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_tmp2a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_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_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_5 < 0)) __PYX_ERR(0, 3798, __pyx_L1_error)
    }
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp2a, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3799
 *     for i1 in range(4):
 *         tmp2a=tetrahedron[i1]
 *         for i2 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3799, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_9;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_10; __pyx_t_5+=1) {
      __pyx_v_i2 = __pyx_t_5;

      /* "pyqcstrc/icosah/mics.pyx":3800
 *         tmp2a=tetrahedron[i1]
 *         for i2 in range(len(obj2)):
 *             tmp3a=obj2[i2]             # <<<<<<<<<<<<<<
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag!=0: # outside
 */
      __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, 3800, __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, 3800, __pyx_L1_error)
      __pyx_t_11 = ((PyArrayObject *)__pyx_t_2);
      {
        __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_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
        if (unlikely(__pyx_t_12 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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, 3800, __pyx_L1_error)
      }
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3801
 *         for i2 in range(len(obj2)):
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])             # <<<<<<<<<<<<<<
 *             if flag!=0: # outside
 *                 if counter1==0:
 */
      __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3801, __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, 3801, __pyx_L1_error)
      __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3801, __pyx_L1_error)
      __pyx_t_14 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3801, __pyx_L1_error)
      __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3801, __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, 3801, __pyx_L1_error)
      __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2a), ((PyArrayObject *)__pyx_t_2), ((PyArrayObject *)__pyx_t_13), ((PyArrayObject *)__pyx_t_14), ((PyArrayObject *)__pyx_t_15), 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3802
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag!=0: # outside             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=tmp2a.reshape(18)
 */
      __pyx_t_1 = ((__pyx_v_flag != 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3803
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag!=0: # outside
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp2a.reshape(18)
 *                 else:
 */
        __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":3804
 *             if flag!=0: # outside
 *                 if counter1==0:
 *                     tmp1a=tmp2a.reshape(18)             # <<<<<<<<<<<<<<
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp2a)
 */
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp2a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3804, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_14, function);
            }
          }
          __pyx_t_15 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_13, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_int_18);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3804, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3804, __pyx_L1_error)
          __pyx_t_16 = ((PyArrayObject *)__pyx_t_15);
          {
            __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_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_12 < 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_4mics_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_12 < 0)) __PYX_ERR(0, 3804, __pyx_L1_error)
          }
          __pyx_t_16 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_15));
          __pyx_t_15 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3803
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag!=0: # outside
 *                 if counter1==0:             # <<<<<<<<<<<<<<
 *                     tmp1a=tmp2a.reshape(18)
 *                 else:
 */
          goto __pyx_L9;
        }

        /* "pyqcstrc/icosah/mics.pyx":3806
 *                     tmp1a=tmp2a.reshape(18)
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp2a)             # <<<<<<<<<<<<<<
 *                 counter1+=1
 *             else:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3806, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_append); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3806, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = NULL;
          __pyx_t_12 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_13, function);
              __pyx_t_12 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_13)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp2a)};
            __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3806, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_15);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
            PyObject *__pyx_temp[3] = {__pyx_t_14, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp2a)};
            __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3806, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_15);
          } else
          #endif
          {
            __pyx_t_2 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3806, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (__pyx_t_14) {
              __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL;
            }
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1a));
            PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, ((PyObject *)__pyx_v_tmp1a));
            __Pyx_INCREF(((PyObject *)__pyx_v_tmp2a));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2a));
            PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, ((PyObject *)__pyx_v_tmp2a));
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3806, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3806, __pyx_L1_error)
          __pyx_t_16 = ((PyArrayObject *)__pyx_t_15);
          {
            __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_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
            if (unlikely(__pyx_t_12 < 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_4mics_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_12 < 0)) __PYX_ERR(0, 3806, __pyx_L1_error)
          }
          __pyx_t_16 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp1a, ((PyArrayObject *)__pyx_t_15));
          __pyx_t_15 = 0;
        }
        __pyx_L9:;

        /* "pyqcstrc/icosah/mics.pyx":3807
 *                 else:
 *                     tmp1a=np.append(tmp1a,tmp2a)
 *                 counter1+=1             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
        __pyx_v_counter1 = (__pyx_v_counter1 + 1);

        /* "pyqcstrc/icosah/mics.pyx":3802
 *             tmp3a=obj2[i2]
 *             flag=inside_outside_tetrahedron(tmp2a,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *             if flag!=0: # outside             # <<<<<<<<<<<<<<
 *                 if counter1==0:
 *                     tmp1a=tmp2a.reshape(18)
 */
        goto __pyx_L8;
      }

      /* "pyqcstrc/icosah/mics.pyx":3809
 *                 counter1+=1
 *             else:
 *                 pass             # <<<<<<<<<<<<<<
 *     if counter1==0: # tetrahedron is inside obj3
 *         #print 'inconsistency: common part is empty?'
 */
      /*else*/ {
      }
      __pyx_L8:;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":3810
 *             else:
 *                 pass
 *     if counter1==0: # tetrahedron is inside obj3             # <<<<<<<<<<<<<<
 *         #print 'inconsistency: common part is empty?'
 *         return np.array([[[[0]]]])
 */
  __pyx_t_1 = ((__pyx_v_counter1 == 0) != 0);
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3812
 *     if counter1==0: # tetrahedron is inside obj3
 *         #print 'inconsistency: common part is empty?'
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3812, __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_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_13);
    PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
    __pyx_t_13 = 0;
    __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_14);
    PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
    __pyx_t_14 = 0;
    __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_13);
    PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
    __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_15 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_14);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3812, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_15);
    __pyx_t_15 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":3810
 *             else:
 *                 pass
 *     if counter1==0: # tetrahedron is inside obj3             # <<<<<<<<<<<<<<
 *         #print 'inconsistency: common part is empty?'
 *         return np.array([[[[0]]]])
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3814
 *         return np.array([[[[0]]]])
 *     else:
 *         pass             # <<<<<<<<<<<<<<
 *         #if counter0!=0:
 *         #    tmp1a=np.append(tmp1a,tmp1b)
 */
  /*else*/ {
  }

  /* "pyqcstrc/icosah/mics.pyx":3847
 *     # (3) get points in (points B) which are inside tetrahedron (points C)
 *     #tmp1b=np.append(tmp1b,obj3_surface)
 *     tmp1b=np.append(point_b,obj3_surface)             # <<<<<<<<<<<<<<
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3847, __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, 3847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __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_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_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_point_b), ((PyObject *)__pyx_v_obj3_surface)};
    __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3847, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_point_b), ((PyObject *)__pyx_v_obj3_surface)};
    __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3847, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_point_b));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_point_b));
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_3, ((PyObject *)__pyx_v_point_b));
    __Pyx_INCREF(((PyObject *)__pyx_v_obj3_surface));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_obj3_surface));
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_3, ((PyObject *)__pyx_v_obj3_surface));
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3847, __pyx_L1_error)
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_15);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3847, __pyx_L1_error)
  }
  __pyx_t_16 = 0;
  __pyx_v_tmp1b = ((PyArrayObject *)__pyx_t_15);
  __pyx_t_15 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3848
 *     #tmp1b=np.append(tmp1b,obj3_surface)
 *     tmp1b=np.append(point_b,obj3_surface)
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *     #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     counter2=0
 */
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3848, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 0;
  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_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_13, __pyx_int_6, __pyx_int_3};
    __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_13, __pyx_int_6, __pyx_int_3};
    __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_17 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_3, __pyx_t_13);
    __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_13 = 0;
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_17, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3848, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_15);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_3 < 0)) __PYX_ERR(0, 3848, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __pyx_v_tmp3b = ((PyArrayObject *)__pyx_t_15);
  __pyx_t_15 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3850
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     counter2=0             # <<<<<<<<<<<<<<
 *     for i1 in range(len(tmp3b)):
 *         tmp2b=tmp3b[i1]
 */
  __pyx_v_counter2 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3851
 *     #tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     counter2=0
 *     for i1 in range(len(tmp3b)):             # <<<<<<<<<<<<<<
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp3b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3851, __pyx_L1_error)
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_10; __pyx_t_3+=1) {
    __pyx_v_i1 = __pyx_t_3;

    /* "pyqcstrc/icosah/mics.pyx":3852
 *     counter2=0
 *     for i1 in range(len(tmp3b)):
 *         tmp2b=tmp3b[i1]             # <<<<<<<<<<<<<<
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside
 */
    __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3b), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3852, __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, 3852, __pyx_L1_error)
    __pyx_t_4 = ((PyArrayObject *)__pyx_t_15);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
      __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_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_tmp2b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp2b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_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_tmp2b.diminfo[0].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp2b.diminfo[0].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp2b.diminfo[1].strides = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp2b.diminfo[1].shape = __pyx_pybuffernd_tmp2b.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3852, __pyx_L1_error)
    }
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_tmp2b, ((PyArrayObject *)__pyx_t_15));
    __pyx_t_15 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3853
 *     for i1 in range(len(tmp3b)):
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])             # <<<<<<<<<<<<<<
 *         if flag==0: # inside
 *             if counter2==0:
 */
    __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3853, __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, 3853, __pyx_L1_error)
    __pyx_t_14 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3853, __pyx_L1_error)
    __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3853, __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, 3853, __pyx_L1_error)
    __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tetrahedron), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3853, __pyx_L1_error)
    __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2b), ((PyArrayObject *)__pyx_t_15), ((PyArrayObject *)__pyx_t_14), ((PyArrayObject *)__pyx_t_17), ((PyArrayObject *)__pyx_t_13), 0);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3854
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1b=tmp2a.reshape(18)
 */
    __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3855
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp2a.reshape(18)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter2 == 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3856
 *         if flag==0: # inside
 *             if counter2==0:
 *                 tmp1b=tmp2a.reshape(18)             # <<<<<<<<<<<<<<
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp2b)
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp2a), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_14 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
          }
        }
        __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_14, __pyx_int_18) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_int_18);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3856, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_13);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_5 < 0)) __PYX_ERR(0, 3856, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_13));
        __pyx_t_13 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3855
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside
 *             if counter2==0:             # <<<<<<<<<<<<<<
 *                 tmp1b=tmp2a.reshape(18)
 *             else:
 */
        goto __pyx_L14;
      }

      /* "pyqcstrc/icosah/mics.pyx":3858
 *                 tmp1b=tmp2a.reshape(18)
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp2b)             # <<<<<<<<<<<<<<
 *             counter2+=1
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3858, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_append); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3858, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp2b)};
          __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3858, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_13);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, ((PyObject *)__pyx_v_tmp1b), ((PyObject *)__pyx_v_tmp2b)};
          __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3858, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_13);
        } else
        #endif
        {
          __pyx_t_15 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3858, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__pyx_t_17) {
            __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_17); __pyx_t_17 = NULL;
          }
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
          PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1b));
          __Pyx_INCREF(((PyObject *)__pyx_v_tmp2b));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp2b));
          PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_5, ((PyObject *)__pyx_v_tmp2b));
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_15, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3858, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3858, __pyx_L1_error)
        __pyx_t_16 = ((PyArrayObject *)__pyx_t_13);
        {
          __Pyx_BufFmt_StackElem __pyx_stack[1];
          __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer);
          __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_5 < 0)) __PYX_ERR(0, 3858, __pyx_L1_error)
        }
        __pyx_t_16 = 0;
        __Pyx_DECREF_SET(__pyx_v_tmp1b, ((PyArrayObject *)__pyx_t_13));
        __pyx_t_13 = 0;
      }
      __pyx_L14:;

      /* "pyqcstrc/icosah/mics.pyx":3859
 *             else:
 *                 tmp1b=np.append(tmp1b,tmp2b)
 *             counter2+=1             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      __pyx_v_counter2 = (__pyx_v_counter2 + 1);

      /* "pyqcstrc/icosah/mics.pyx":3854
 *         tmp2b=tmp3b[i1]
 *         flag=inside_outside_tetrahedron(tmp2b,tetrahedron[0],tetrahedron[1],tetrahedron[2],tetrahedron[3])
 *         if flag==0: # inside             # <<<<<<<<<<<<<<
 *             if counter2==0:
 *                 tmp1b=tmp2a.reshape(18)
 */
      goto __pyx_L13;
    }

    /* "pyqcstrc/icosah/mics.pyx":3861
 *             counter2+=1
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 */
    /*else*/ {
    }
    __pyx_L13:;
  }

  /* "pyqcstrc/icosah/mics.pyx":3862
 *         else:
 *             pass
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)             # <<<<<<<<<<<<<<
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     print('    points C:')
 */
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1b), __pyx_n_s_reshape); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1b)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3862, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_17 = NULL;
  __pyx_t_3 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_3 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_t_15, __pyx_int_6, __pyx_int_3};
    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3862, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
    PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_t_15, __pyx_int_6, __pyx_int_3};
    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3862, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_17) {
      __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17); __pyx_t_17 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_15);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_3, __pyx_t_15);
    __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_15 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3862, __pyx_L1_error)
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_13);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_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_3 < 0)) __PYX_ERR(0, 3862, __pyx_L1_error)
  }
  __pyx_t_11 = 0;
  __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_13));
  __pyx_t_13 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3863
 *             pass
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)             # <<<<<<<<<<<<<<
 *     print('    points C:')
 *     #for i1 in range(len(tmp3b)):
 */
  __pyx_t_13 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3b), 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_13), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 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_4mics_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_3 < 0)) __PYX_ERR(0, 3863, __pyx_L1_error)
  }
  __Pyx_DECREF_SET(__pyx_v_tmp3b, ((PyArrayObject *)__pyx_t_13));
  __pyx_t_13 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3864
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     print('    points C:')             # <<<<<<<<<<<<<<
 *     #for i1 in range(len(tmp3b)):
 *     #    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_t_13 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "pyqcstrc/icosah/mics.pyx":3873
 *     #####################################
 *     # (4) merge points A and points C
 *     if counter1==0 and counter2==0:             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 *     else:
 */
  __pyx_t_18 = ((__pyx_v_counter1 == 0) != 0);
  if (__pyx_t_18) {
  } else {
    __pyx_t_1 = __pyx_t_18;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_18 = ((__pyx_v_counter2 == 0) != 0);
  __pyx_t_1 = __pyx_t_18;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyqcstrc/icosah/mics.pyx":3874
 *     # (4) merge points A and points C
 *     if counter1==0 and counter2==0:
 *         return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *     else:
 *         if counter1!=0 and counter2!=0:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3874, __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_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_14);
    PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
    __pyx_t_14 = 0;
    __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_15);
    PyList_SET_ITEM(__pyx_t_14, 0, __pyx_t_15);
    __pyx_t_15 = 0;
    __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_GIVEREF(__pyx_t_14);
    PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
    __pyx_t_14 = 0;
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_15);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3874, __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, 3874, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;
    goto __pyx_L0;

    /* "pyqcstrc/icosah/mics.pyx":3873
 *     #####################################
 *     # (4) merge points A and points C
 *     if counter1==0 and counter2==0:             # <<<<<<<<<<<<<<
 *         return np.array([[[[0]]]])
 *     else:
 */
  }

  /* "pyqcstrc/icosah/mics.pyx":3876
 *         return np.array([[[[0]]]])
 *     else:
 *         if counter1!=0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=np.append(tmp1a,tmp1b)
 *         elif counter1!=0 and counter2==0:
 */
  /*else*/ {
    __pyx_t_18 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_1 = __pyx_t_18;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_t_18 = ((__pyx_v_counter2 != 0) != 0);
    __pyx_t_1 = __pyx_t_18;
    __pyx_L19_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3877
 *     else:
 *         if counter1!=0 and counter2!=0:
 *             tmp1c=np.append(tmp1a,tmp1b)             # <<<<<<<<<<<<<<
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __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_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_3 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1b)};
        __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3877, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
        PyObject *__pyx_temp[3] = {__pyx_t_2, ((PyObject *)__pyx_v_tmp1a), ((PyObject *)__pyx_v_tmp1b)};
        __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3877, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_13);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3877, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 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_14, 0+__pyx_t_3, ((PyObject *)__pyx_v_tmp1a));
        __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1b));
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_3, ((PyObject *)__pyx_v_tmp1b));
        __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3877, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3877, __pyx_L1_error)
      __pyx_t_16 = ((PyArrayObject *)__pyx_t_13);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3877, __pyx_L1_error)
      }
      __pyx_t_16 = 0;
      __pyx_v_tmp1c = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3876
 *         return np.array([[[[0]]]])
 *     else:
 *         if counter1!=0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=np.append(tmp1a,tmp1b)
 *         elif counter1!=0 and counter2==0:
 */
      goto __pyx_L18;
    }

    /* "pyqcstrc/icosah/mics.pyx":3878
 *         if counter1!=0 and counter2!=0:
 *             tmp1c=np.append(tmp1a,tmp1b)
 *         elif counter1!=0 and counter2==0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1a
 *         elif counter1==0 and counter2!=0:
 */
    __pyx_t_18 = ((__pyx_v_counter1 != 0) != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_1 = __pyx_t_18;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_18 = ((__pyx_v_counter2 == 0) != 0);
    __pyx_t_1 = __pyx_t_18;
    __pyx_L21_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3879
 *             tmp1c=np.append(tmp1a,tmp1b)
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a             # <<<<<<<<<<<<<<
 *         elif counter1==0 and counter2!=0:
 *             tmp1c=tmp1b
 */
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1a, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3879, __pyx_L1_error)
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1a));
      __pyx_v_tmp1c = __pyx_v_tmp1a;

      /* "pyqcstrc/icosah/mics.pyx":3878
 *         if counter1!=0 and counter2!=0:
 *             tmp1c=np.append(tmp1a,tmp1b)
 *         elif counter1!=0 and counter2==0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1a
 *         elif counter1==0 and counter2!=0:
 */
      goto __pyx_L18;
    }

    /* "pyqcstrc/icosah/mics.pyx":3880
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a
 *         elif counter1==0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1b
 *         else:
 */
    __pyx_t_18 = ((__pyx_v_counter1 == 0) != 0);
    if (__pyx_t_18) {
    } else {
      __pyx_t_1 = __pyx_t_18;
      goto __pyx_L23_bool_binop_done;
    }
    __pyx_t_18 = ((__pyx_v_counter2 != 0) != 0);
    __pyx_t_1 = __pyx_t_18;
    __pyx_L23_bool_binop_done:;
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3881
 *             tmp1c=tmp1a
 *         elif counter1==0 and counter2!=0:
 *             tmp1c=tmp1b             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1b, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_3 < 0)) __PYX_ERR(0, 3881, __pyx_L1_error)
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_tmp1b));
      __pyx_v_tmp1c = __pyx_v_tmp1b;

      /* "pyqcstrc/icosah/mics.pyx":3880
 *         elif counter1!=0 and counter2==0:
 *             tmp1c=tmp1a
 *         elif counter1==0 and counter2!=0:             # <<<<<<<<<<<<<<
 *             tmp1c=tmp1b
 *         else:
 */
      goto __pyx_L18;
    }

    /* "pyqcstrc/icosah/mics.pyx":3883
 *             tmp1c=tmp1b
 *         else:
 *             pass             # <<<<<<<<<<<<<<
 *         if verbose>0:
 *             print('    merge points A and points B -> tetrahedralization')
 */
    /*else*/ {
    }
    __pyx_L18:;

    /* "pyqcstrc/icosah/mics.pyx":3884
 *         else:
 *             pass
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('    merge points A and points B -> tetrahedralization')
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3885
 *             pass
 *         if verbose>0:
 *             print('    merge points A and points B -> tetrahedralization')             # <<<<<<<<<<<<<<
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)
 */
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3884
 *         else:
 *             pass
 *         if verbose>0:             # <<<<<<<<<<<<<<
 *             print('    merge points A and points B -> tetrahedralization')
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3886
 *         if verbose>0:
 *             print('    merge points A and points B -> tetrahedralization')
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)             # <<<<<<<<<<<<<<
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)
 *         if len(tmp3c)>=4:
 */
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3886, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 18.0)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_2 = NULL;
    __pyx_t_3 = 0;
    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_3 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_14, __pyx_int_6, __pyx_int_3};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3886, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_14, __pyx_int_6, __pyx_int_3};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_3, 3+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3886, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(3+__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_3, __pyx_t_14);
      __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_14 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3886, __pyx_L1_error)
    __pyx_t_11 = ((PyArrayObject *)__pyx_t_13);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3886, __pyx_L1_error)
    }
    __pyx_t_11 = 0;
    __pyx_v_tmp3c = ((PyArrayObject *)__pyx_t_13);
    __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3887
 *             print('    merge points A and points B -> tetrahedralization')
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)             # <<<<<<<<<<<<<<
 *         if len(tmp3c)>=4:
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)
 */
    __pyx_t_13 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_5utils_remove_doubling_dim3_in_perp_space(((PyArrayObject *)__pyx_v_tmp3c), 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_13), &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp3c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 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_tmp3c.diminfo[0].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tmp3c.diminfo[0].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tmp3c.diminfo[1].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tmp3c.diminfo[1].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tmp3c.diminfo[2].strides = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tmp3c.diminfo[2].shape = __pyx_pybuffernd_tmp3c.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3887, __pyx_L1_error)
    }
    __Pyx_DECREF_SET(__pyx_v_tmp3c, ((PyArrayObject *)__pyx_t_13));
    __pyx_t_13 = 0;

    /* "pyqcstrc/icosah/mics.pyx":3888
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)
 *         if len(tmp3c)>=4:             # <<<<<<<<<<<<<<
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)
 *             if verbose>0:
 */
    __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp3c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3888, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_9 >= 4) != 0);
    if (__pyx_t_1) {

      /* "pyqcstrc/icosah/mics.pyx":3889
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)
 *         if len(tmp3c)>=4:
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('    number of tetrahedron = %d'%(len(tmp4c)))
 */
      __pyx_t_13 = ((PyObject *)__pyx_f_8pyqcstrc_6icosah_6intsct_tetrahedralization_points(((PyArrayObject *)__pyx_v_tmp3c), (__pyx_v_verbose - 1), 0)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_v_tmp4c = ((PyArrayObject *)__pyx_t_13);
      __pyx_t_13 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3890
 *         if len(tmp3c)>=4:
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('    number of tetrahedron = %d'%(len(tmp4c)))
 *             #####################################
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3891
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)
 *             if verbose>0:
 *                 print('    number of tetrahedron = %d'%(len(tmp4c)))             # <<<<<<<<<<<<<<
 *             #####################################
 *             #                                   #
 */
        __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3891, __pyx_L1_error)
        __pyx_t_13 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_number_of_tetrahedron_d_2, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3890
 *         if len(tmp3c)>=4:
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('    number of tetrahedron = %d'%(len(tmp4c)))
 *             #####################################
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3897
 *             #####################################
 *             # (5) get tetrahedra in tmp4c which are outside of obj2
 *             counter3=0             # <<<<<<<<<<<<<<
 *             for i1 in range(len(tmp4c)):
 *                 counter4=0
 */
      __pyx_v_counter3 = 0;

      /* "pyqcstrc/icosah/mics.pyx":3898
 *             # (5) get tetrahedra in tmp4c which are outside of obj2
 *             counter3=0
 *             for i1 in range(len(tmp4c)):             # <<<<<<<<<<<<<<
 *                 counter4=0
 *                 for i2 in range(4):
 */
      __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp4c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3898, __pyx_L1_error)
      __pyx_t_10 = __pyx_t_9;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_10; __pyx_t_3+=1) {
        __pyx_v_i1 = __pyx_t_3;

        /* "pyqcstrc/icosah/mics.pyx":3899
 *             counter3=0
 *             for i1 in range(len(tmp4c)):
 *                 counter4=0             # <<<<<<<<<<<<<<
 *                 for i2 in range(4):
 *                     tmp2c=tmp4c[i1][i2]
 */
        __pyx_v_counter4 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3900
 *             for i1 in range(len(tmp4c)):
 *                 counter4=0
 *                 for i2 in range(4):             # <<<<<<<<<<<<<<
 *                     tmp2c=tmp4c[i1][i2]
 *                     for i3 in range(len(obj2)):
 */
        for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
          __pyx_v_i2 = __pyx_t_5;

          /* "pyqcstrc/icosah/mics.pyx":3901
 *                 counter4=0
 *                 for i2 in range(4):
 *                     tmp2c=tmp4c[i1][i2]             # <<<<<<<<<<<<<<
 *                     for i3 in range(len(obj2)):
 *                         tmp3a=obj2[i3]
 */
          __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3901, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_13, __pyx_v_i2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3901, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF_SET(__pyx_v_tmp2c, __pyx_t_15);
          __pyx_t_15 = 0;

          /* "pyqcstrc/icosah/mics.pyx":3902
 *                 for i2 in range(4):
 *                     tmp2c=tmp4c[i1][i2]
 *                     for i3 in range(len(obj2)):             # <<<<<<<<<<<<<<
 *                         tmp3a=obj2[i3]
 *                         flag=inside_outside_tetrahedron(tmp2c,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 */
          __pyx_t_19 = PyObject_Length(((PyObject *)__pyx_v_obj2)); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3902, __pyx_L1_error)
          __pyx_t_20 = __pyx_t_19;
          for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) {
            __pyx_v_i3 = __pyx_t_21;

            /* "pyqcstrc/icosah/mics.pyx":3903
 *                     tmp2c=tmp4c[i1][i2]
 *                     for i3 in range(len(obj2)):
 *                         tmp3a=obj2[i3]             # <<<<<<<<<<<<<<
 *                         flag=inside_outside_tetrahedron(tmp2c,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *                         if flag==0: # inside
 */
            __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_obj2), __pyx_v_i3, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3903, __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, 3903, __pyx_L1_error)
            __pyx_t_11 = ((PyArrayObject *)__pyx_t_15);
            {
              __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_11, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
              if (unlikely(__pyx_t_12 < 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_4mics_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_12 < 0)) __PYX_ERR(0, 3903, __pyx_L1_error)
            }
            __pyx_t_11 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp3a, ((PyArrayObject *)__pyx_t_15));
            __pyx_t_15 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3904
 *                     for i3 in range(len(obj2)):
 *                         tmp3a=obj2[i3]
 *                         flag=inside_outside_tetrahedron(tmp2c,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])             # <<<<<<<<<<<<<<
 *                         if flag==0: # inside
 *                             counter4+=1
 */
            if (!(likely(((__pyx_v_tmp2c) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_tmp2c, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3904, __pyx_L1_error)
            __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3904, __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, 3904, __pyx_L1_error)
            __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3904, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3904, __pyx_L1_error)
            __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3904, __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, 3904, __pyx_L1_error)
            __pyx_t_14 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp3a), 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3904, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3904, __pyx_L1_error)
            __pyx_v_flag = __pyx_f_8pyqcstrc_6icosah_10numericalc_inside_outside_tetrahedron(((PyArrayObject *)__pyx_v_tmp2c), ((PyArrayObject *)__pyx_t_15), ((PyArrayObject *)__pyx_t_13), ((PyArrayObject *)__pyx_t_17), ((PyArrayObject *)__pyx_t_14), 0);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3905
 *                         tmp3a=obj2[i3]
 *                         flag=inside_outside_tetrahedron(tmp2c,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *                         if flag==0: # inside             # <<<<<<<<<<<<<<
 *                             counter4+=1
 *                             break
 */
            __pyx_t_1 = ((__pyx_v_flag == 0) != 0);
            if (__pyx_t_1) {

              /* "pyqcstrc/icosah/mics.pyx":3906
 *                         flag=inside_outside_tetrahedron(tmp2c,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *                         if flag==0: # inside
 *                             counter4+=1             # <<<<<<<<<<<<<<
 *                             break
 *                         else:
 */
              __pyx_v_counter4 = (__pyx_v_counter4 + 1);

              /* "pyqcstrc/icosah/mics.pyx":3907
 *                         if flag==0: # inside
 *                             counter4+=1
 *                             break             # <<<<<<<<<<<<<<
 *                         else:
 *                             pass
 */
              goto __pyx_L33_break;

              /* "pyqcstrc/icosah/mics.pyx":3905
 *                         tmp3a=obj2[i3]
 *                         flag=inside_outside_tetrahedron(tmp2c,tmp3a[0],tmp3a[1],tmp3a[2],tmp3a[3])
 *                         if flag==0: # inside             # <<<<<<<<<<<<<<
 *                             counter4+=1
 *                             break
 */
            }

            /* "pyqcstrc/icosah/mics.pyx":3909
 *                             break
 *                         else:
 *                             pass             # <<<<<<<<<<<<<<
 *                 if counter4<4:
 *                     if counter3==0:
 */
            /*else*/ {
            }
          }
          __pyx_L33_break:;
        }

        /* "pyqcstrc/icosah/mics.pyx":3910
 *                         else:
 *                             pass
 *                 if counter4<4:             # <<<<<<<<<<<<<<
 *                     if counter3==0:
 *                         tmp1c=tmp4c[i1].reshape(72)
 */
        __pyx_t_1 = ((__pyx_v_counter4 < 4) != 0);
        if (__pyx_t_1) {

          /* "pyqcstrc/icosah/mics.pyx":3911
 *                             pass
 *                 if counter4<4:
 *                     if counter3==0:             # <<<<<<<<<<<<<<
 *                         tmp1c=tmp4c[i1].reshape(72)
 *                     else:
 */
          __pyx_t_1 = ((__pyx_v_counter3 == 0) != 0);
          if (__pyx_t_1) {

            /* "pyqcstrc/icosah/mics.pyx":3912
 *                 if counter4<4:
 *                     if counter3==0:
 *                         tmp1c=tmp4c[i1].reshape(72)             # <<<<<<<<<<<<<<
 *                     else:
 *                         tmp1c=np.append(tmp1c,tmp4c[i1])
 */
            __pyx_t_17 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3912, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_reshape); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3912, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_t_17 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
              __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
              if (likely(__pyx_t_17)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                __Pyx_INCREF(__pyx_t_17);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_13, function);
              }
            }
            __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_17, __pyx_int_72) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_int_72);
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3912, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3912, __pyx_L1_error)
            __pyx_t_16 = ((PyArrayObject *)__pyx_t_14);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
              __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_5 < 0)) __PYX_ERR(0, 3912, __pyx_L1_error)
            }
            __pyx_t_16 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_14));
            __pyx_t_14 = 0;

            /* "pyqcstrc/icosah/mics.pyx":3911
 *                             pass
 *                 if counter4<4:
 *                     if counter3==0:             # <<<<<<<<<<<<<<
 *                         tmp1c=tmp4c[i1].reshape(72)
 *                     else:
 */
            goto __pyx_L36;
          }

          /* "pyqcstrc/icosah/mics.pyx":3914
 *                         tmp1c=tmp4c[i1].reshape(72)
 *                     else:
 *                         tmp1c=np.append(tmp1c,tmp4c[i1])             # <<<<<<<<<<<<<<
 *                     counter3+=1
 *                 else:
 */
          /*else*/ {
            __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3914, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_append); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3914, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmp4c), __pyx_v_i1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3914, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_15 = NULL;
            __pyx_t_5 = 0;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
              __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17);
              if (likely(__pyx_t_15)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
                __Pyx_INCREF(__pyx_t_15);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_17, function);
                __pyx_t_5 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_17)) {
              PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1c), __pyx_t_13};
              __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3914, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
              PyObject *__pyx_temp[3] = {__pyx_t_15, ((PyObject *)__pyx_v_tmp1c), __pyx_t_13};
              __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3914, __pyx_L1_error)
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            } else
            #endif
            {
              __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3914, __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_INCREF(((PyObject *)__pyx_v_tmp1c));
              __Pyx_GIVEREF(((PyObject *)__pyx_v_tmp1c));
              PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, ((PyObject *)__pyx_v_tmp1c));
              __Pyx_GIVEREF(__pyx_t_13);
              PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_t_13);
              __pyx_t_13 = 0;
              __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3914, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3914, __pyx_L1_error)
            __pyx_t_16 = ((PyArrayObject *)__pyx_t_14);
            {
              __Pyx_BufFmt_StackElem __pyx_stack[1];
              __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer);
              __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_DTYPE_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 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_tmp1c.rcbuffer->pybuffer, (PyObject*)__pyx_v_tmp1c, &__Pyx_TypeInfo_nn___pyx_t_8pyqcstrc_6icosah_4mics_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_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_5 < 0)) __PYX_ERR(0, 3914, __pyx_L1_error)
            }
            __pyx_t_16 = 0;
            __Pyx_XDECREF_SET(__pyx_v_tmp1c, ((PyArrayObject *)__pyx_t_14));
            __pyx_t_14 = 0;
          }
          __pyx_L36:;

          /* "pyqcstrc/icosah/mics.pyx":3915
 *                     else:
 *                         tmp1c=np.append(tmp1c,tmp4c[i1])
 *                     counter3+=1             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
          __pyx_v_counter3 = (__pyx_v_counter3 + 1);

          /* "pyqcstrc/icosah/mics.pyx":3910
 *                         else:
 *                             pass
 *                 if counter4<4:             # <<<<<<<<<<<<<<
 *                     if counter3==0:
 *                         tmp1c=tmp4c[i1].reshape(72)
 */
          goto __pyx_L35;
        }

        /* "pyqcstrc/icosah/mics.pyx":3917
 *                     counter3+=1
 *                 else:
 *                     pass             # <<<<<<<<<<<<<<
 *             if verbose>0:
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))
 */
        /*else*/ {
        }
        __pyx_L35:;
      }

      /* "pyqcstrc/icosah/mics.pyx":3918
 *                 else:
 *                     pass
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))
 *             if counter3!=0:
 */
      __pyx_t_1 = ((__pyx_v_verbose > 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3919
 *                     pass
 *             if verbose>0:
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))             # <<<<<<<<<<<<<<
 *             if counter3!=0:
 *                 return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 */
        __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_counter3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3919, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_number_of_tetrahedron_outside_o, __pyx_t_14); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3919, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3919, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "pyqcstrc/icosah/mics.pyx":3918
 *                 else:
 *                     pass
 *             if verbose>0:             # <<<<<<<<<<<<<<
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))
 *             if counter3!=0:
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3920
 *             if verbose>0:
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))
 *             if counter3!=0:             # <<<<<<<<<<<<<<
 *                 return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *             else:
 */
      __pyx_t_1 = ((__pyx_v_counter3 != 0) != 0);
      if (__pyx_t_1) {

        /* "pyqcstrc/icosah/mics.pyx":3921
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))
 *             if counter3!=0:
 *                 return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)             # <<<<<<<<<<<<<<
 *             else:
 *                 return np.array([[[[0]]]])
 */
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_tmp1c), __pyx_n_s_reshape); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3921, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_tmp1c)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3921, __pyx_L1_error)
        __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_9) / 72.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3921, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = NULL;
        __pyx_t_3 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_3 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_17)) {
          PyObject *__pyx_temp[5] = {__pyx_t_13, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 4+__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3921, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
          PyObject *__pyx_temp[5] = {__pyx_t_13, __pyx_t_2, __pyx_int_4, __pyx_int_6, __pyx_int_3};
          __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_3, 4+__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3921, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else
        #endif
        {
          __pyx_t_15 = PyTuple_New(4+__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3921, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_3, __pyx_t_2);
          __Pyx_INCREF(__pyx_int_4);
          __Pyx_GIVEREF(__pyx_int_4);
          PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_3, __pyx_int_4);
          __Pyx_INCREF(__pyx_int_6);
          __Pyx_GIVEREF(__pyx_int_6);
          PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_3, __pyx_int_6);
          __Pyx_INCREF(__pyx_int_3);
          __Pyx_GIVEREF(__pyx_int_3);
          PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_3, __pyx_int_3);
          __pyx_t_2 = 0;
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3921, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3921, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_14);
        __pyx_t_14 = 0;
        goto __pyx_L0;

        /* "pyqcstrc/icosah/mics.pyx":3920
 *             if verbose>0:
 *                 print('    number of tetrahedron outside of obj2 = %d'%(counter3))
 *             if counter3!=0:             # <<<<<<<<<<<<<<
 *                 return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *             else:
 */
      }

      /* "pyqcstrc/icosah/mics.pyx":3923
 *                 return tmp1c.reshape(int(len(tmp1c)/72),4,6,3)
 *             else:
 *                 return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 *         else:
 *             return np.array([[[[0]]]])
 */
      /*else*/ {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3923, __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, 3923, __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, 3923, __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_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_17);
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
        __pyx_t_17 = 0;
        __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_GIVEREF(__pyx_t_2);
        PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_17);
        PyList_SET_ITEM(__pyx_t_2, 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_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_17, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_2);
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3923, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3923, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_14);
        __pyx_t_14 = 0;
        goto __pyx_L0;
      }

      /* "pyqcstrc/icosah/mics.pyx":3888
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)
 *         if len(tmp3c)>=4:             # <<<<<<<<<<<<<<
 *             tmp4c=tetrahedralization_points(tmp3c,verbose-1)
 *             if verbose>0:
 */
    }

    /* "pyqcstrc/icosah/mics.pyx":3925
 *                 return np.array([[[[0]]]])
 *         else:
 *             return np.array([[[[0]]]])             # <<<<<<<<<<<<<<
 * 
 */
    /*else*/ {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3925, __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_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_17);
      PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_17);
      __pyx_t_17 = 0;
      __pyx_t_17 = PyList_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_15);
      PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_15);
      __pyx_t_15 = 0;
      __pyx_t_15 = NULL;
      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_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3925, __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, 3925, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_14);
      __pyx_t_14 = 0;
      goto __pyx_L0;
    }
  }

  /* "pyqcstrc/icosah/mics.pyx":3737
 * 
 * # Developing
 * cdef np.ndarray subtraction_tetrahedron_object_dev(np.ndarray[DTYPE_int_t, ndim=3] tetrahedron,             # <<<<<<<<<<<<<<
 *                                                     np.ndarray[DTYPE_int_t, ndim=4] obj2,
 *                                                     np.ndarray[DTYPE_int_t, ndim=3] point_b,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  { 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_obj2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.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_tmp2a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pyqcstrc.icosah.mics.subtraction_tetrahedron_object_dev", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_obj3_surface.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_point_b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tetrahedron.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_tmp2a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp2b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3a.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3b.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tmp3c.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_tmp2a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp2b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3a);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3b);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp3c);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp4c);
  __Pyx_XDECREF(__pyx_v_tmp2c);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __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__99, 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__100, 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__100, 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[] = {
  {"simplification_convex_polyhedron", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_1simplification_convex_polyhedron, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplification_obj_smart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_3simplification_obj_smart, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplification_obj_edges_using_parents", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_5simplification_obj_edges_using_parents, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplification_obj_edges_1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_7simplification_obj_edges_1, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplification_obj_edges", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_9simplification_obj_edges, METH_VARARGS|METH_KEYWORDS, 0},
  {"simplification", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_11simplification, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction_2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_13object_subtraction_2, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_15object_subtraction, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction_new", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_17object_subtraction_new, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction_dev1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_19object_subtraction_dev1, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction_dev", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_21object_subtraction_dev, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction_dev2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_23object_subtraction_dev2, METH_VARARGS|METH_KEYWORDS, 0},
  {"object_subtraction_3", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8pyqcstrc_6icosah_4mics_25object_subtraction_3, 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_mics(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_mics},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "mics",
    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_6f, __pyx_k_10_6f, sizeof(__pyx_k_10_6f), 0, 1, 0, 0},
  {&__pyx_kp_u_10_8f, __pyx_k_10_8f, sizeof(__pyx_k_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_10_8f_2, __pyx_k_10_8f_2, sizeof(__pyx_k_10_8f_2), 0, 1, 0, 0},
  {&__pyx_kp_u_10_8f_3, __pyx_k_10_8f_3, sizeof(__pyx_k_10_8f_3), 0, 1, 0, 0},
  {&__pyx_kp_u_1_A_and_B, __pyx_k_1_A_and_B, sizeof(__pyx_k_1_A_and_B), 0, 1, 0, 0},
  {&__pyx_kp_u_2_B, __pyx_k_2_B, sizeof(__pyx_k_2_B), 0, 1, 0, 0},
  {&__pyx_kp_u_3_A_not_B, __pyx_k_3_A_not_B, sizeof(__pyx_k_3_A_not_B), 0, 1, 0, 0},
  {&__pyx_kp_u_3d, __pyx_k_3d, sizeof(__pyx_k_3d), 0, 1, 0, 0},
  {&__pyx_kp_u_8_6f, __pyx_k_8_6f, sizeof(__pyx_k_8_6f), 0, 1, 0, 0},
  {&__pyx_kp_u_A_CD_B, __pyx_k_A_CD_B, sizeof(__pyx_k_A_CD_B), 0, 1, 0, 0},
  {&__pyx_kp_u_A_C_B_D, __pyx_k_A_C_B_D, sizeof(__pyx_k_A_C_B_D), 0, 1, 0, 0},
  {&__pyx_kp_u_A_D_B_C, __pyx_k_A_D_B_C, sizeof(__pyx_k_A_D_B_C), 0, 1, 0, 0},
  {&__pyx_kp_u_A_not_B_obj_volume, __pyx_k_A_not_B_obj_volume, sizeof(__pyx_k_A_not_B_obj_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_C_A_B_D, __pyx_k_C_A_B_D, sizeof(__pyx_k_C_A_B_D), 0, 1, 0, 0},
  {&__pyx_kp_u_C_A_D_B, __pyx_k_C_A_D_B, sizeof(__pyx_k_C_A_D_B), 0, 1, 0, 0},
  {&__pyx_kp_u_D_A_B_C, __pyx_k_D_A_B_C, sizeof(__pyx_k_D_A_B_C), 0, 1, 0, 0},
  {&__pyx_kp_u_D_A_C_B, __pyx_k_D_A_C_B, sizeof(__pyx_k_D_A_C_B), 0, 1, 0, 0},
  {&__pyx_n_u_ERROR, __pyx_k_ERROR, sizeof(__pyx_k_ERROR), 0, 1, 0, 1},
  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_u_Object_subtraction, __pyx_k_Object_subtraction, sizeof(__pyx_k_Object_subtraction), 0, 1, 0, 0},
  {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
  {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
  {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
  {&__pyx_kp_u__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 1, 0, 0},
  {&__pyx_kp_u__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 1, 0, 0},
  {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0},
  {&__pyx_kp_u__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 1, 0, 0},
  {&__pyx_kp_u__58, __pyx_k__58, sizeof(__pyx_k__58), 0, 1, 0, 0},
  {&__pyx_kp_u__59, __pyx_k__59, sizeof(__pyx_k__59), 0, 1, 0, 0},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_kp_u_cannot_merged, __pyx_k_cannot_merged, sizeof(__pyx_k_cannot_merged), 0, 1, 0, 0},
  {&__pyx_kp_u_chech_four_edges_forms_tetrahed, __pyx_k_chech_four_edges_forms_tetrahed, sizeof(__pyx_k_chech_four_edges_forms_tetrahed), 0, 1, 0, 0},
  {&__pyx_kp_u_check_two_edges, __pyx_k_check_two_edges, sizeof(__pyx_k_check_two_edges), 0, 1, 0, 0},
  {&__pyx_kp_u_check_two_triangles, __pyx_k_check_two_triangles, sizeof(__pyx_k_check_two_triangles), 0, 1, 0, 0},
  {&__pyx_kp_u_check_two_vertices, __pyx_k_check_two_vertices, sizeof(__pyx_k_check_two_vertices), 0, 1, 0, 0},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_kp_u_coplanar, __pyx_k_coplanar, sizeof(__pyx_k_coplanar), 0, 1, 0, 0},
  {&__pyx_kp_u_coplanar_check_two_triangles, __pyx_k_coplanar_check_two_triangles, sizeof(__pyx_k_coplanar_check_two_triangles), 0, 1, 0, 0},
  {&__pyx_kp_u_cycle, __pyx_k_cycle, sizeof(__pyx_k_cycle), 0, 1, 0, 0},
  {&__pyx_kp_u_cycle_2, __pyx_k_cycle_2, sizeof(__pyx_k_cycle_2), 0, 1, 0, 0},
  {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
  {&__pyx_kp_u_d_th_set_of_triangles, __pyx_k_d_th_set_of_triangles, sizeof(__pyx_k_d_th_set_of_triangles), 0, 1, 0, 0},
  {&__pyx_kp_u_do_merge_tetrahedra_in_obj, __pyx_k_do_merge_tetrahedra_in_obj, sizeof(__pyx_k_do_merge_tetrahedra_in_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_equivalent, __pyx_k_equivalent, sizeof(__pyx_k_equivalent), 0, 1, 0, 0},
  {&__pyx_kp_u_equivalent_2, __pyx_k_equivalent_2, sizeof(__pyx_k_equivalent_2), 0, 1, 0, 0},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_kp_u_extract_common_vertex, __pyx_k_extract_common_vertex, sizeof(__pyx_k_extract_common_vertex), 0, 1, 0, 0},
  {&__pyx_kp_u_extract_surface_without_specifi, __pyx_k_extract_surface_without_specifi, sizeof(__pyx_k_extract_surface_without_specifi), 0, 1, 0, 0},
  {&__pyx_kp_u_fail, __pyx_k_fail, sizeof(__pyx_k_fail), 0, 1, 0, 0},
  {&__pyx_kp_u_fail_initial_obj_returned, __pyx_k_fail_initial_obj_returned, sizeof(__pyx_k_fail_initial_obj_returned), 0, 1, 0, 0},
  {&__pyx_kp_u_fail_initial_obj_returned_2, __pyx_k_fail_initial_obj_returned_2, sizeof(__pyx_k_fail_initial_obj_returned_2), 0, 1, 0, 0},
  {&__pyx_kp_u_fail_initial_obj_returned_3, __pyx_k_fail_initial_obj_returned_3, sizeof(__pyx_k_fail_initial_obj_returned_3), 0, 1, 0, 0},
  {&__pyx_kp_u_fail_try_to_get_correct_obj, __pyx_k_fail_try_to_get_correct_obj, sizeof(__pyx_k_fail_try_to_get_correct_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_flag_1, __pyx_k_flag_1, sizeof(__pyx_k_flag_1), 0, 1, 0, 0},
  {&__pyx_kp_u_found, __pyx_k_found, sizeof(__pyx_k_found), 0, 1, 0, 0},
  {&__pyx_kp_u_generate_obj_surface, __pyx_k_generate_obj_surface, sizeof(__pyx_k_generate_obj_surface), 0, 1, 0, 0},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_kp_u_inequivalent, __pyx_k_inequivalent, sizeof(__pyx_k_inequivalent), 0, 1, 0, 0},
  {&__pyx_kp_u_inequivalent_2, __pyx_k_inequivalent_2, sizeof(__pyx_k_inequivalent_2), 0, 1, 0, 0},
  {&__pyx_kp_u_initial_volume, __pyx_k_initial_volume, sizeof(__pyx_k_initial_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_initial_volume_2, __pyx_k_initial_volume_2, sizeof(__pyx_k_initial_volume_2), 0, 1, 0, 0},
  {&__pyx_kp_u_len_tmp3d, __pyx_k_len_tmp3d, sizeof(__pyx_k_len_tmp3d), 0, 1, 0, 0},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_kp_u_merge_2_tetrahedra_in_obj, __pyx_k_merge_2_tetrahedra_in_obj, sizeof(__pyx_k_merge_2_tetrahedra_in_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_3_tetrahedra_in_obj, __pyx_k_merge_3_tetrahedra_in_obj, sizeof(__pyx_k_merge_3_tetrahedra_in_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_4_tetrahedra_in_obj, __pyx_k_merge_4_tetrahedra_in_obj, sizeof(__pyx_k_merge_4_tetrahedra_in_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_four_tetrahedra, __pyx_k_merge_four_tetrahedra, sizeof(__pyx_k_merge_four_tetrahedra), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_points_A_and_points_B_tet, __pyx_k_merge_points_A_and_points_B_tet, sizeof(__pyx_k_merge_points_A_and_points_B_tet), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_three_tetrahedra, __pyx_k_merge_three_tetrahedra, sizeof(__pyx_k_merge_three_tetrahedra), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_two_edges, __pyx_k_merge_two_edges, sizeof(__pyx_k_merge_two_edges), 0, 1, 0, 0},
  {&__pyx_kp_u_merge_two_tetrahedra, __pyx_k_merge_two_tetrahedra, sizeof(__pyx_k_merge_two_tetrahedra), 0, 1, 0, 0},
  {&__pyx_kp_u_merged, __pyx_k_merged, sizeof(__pyx_k_merged), 0, 1, 0, 0},
  {&__pyx_kp_u_merged_2, __pyx_k_merged_2, sizeof(__pyx_k_merged_2), 0, 1, 0, 0},
  {&__pyx_kp_u_merged_3, __pyx_k_merged_3, sizeof(__pyx_k_merged_3), 0, 1, 0, 0},
  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_kp_u_not_coplanar, __pyx_k_not_coplanar, sizeof(__pyx_k_not_coplanar), 0, 1, 0, 0},
  {&__pyx_kp_u_not_coplaner, __pyx_k_not_coplaner, sizeof(__pyx_k_not_coplaner), 0, 1, 0, 0},
  {&__pyx_kp_u_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 1, 0, 0},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_num2_of_cycle, __pyx_k_num2_of_cycle, sizeof(__pyx_k_num2_of_cycle), 0, 0, 1, 1},
  {&__pyx_n_s_num2_of_shuffle, __pyx_k_num2_of_shuffle, sizeof(__pyx_k_num2_of_shuffle), 0, 0, 1, 1},
  {&__pyx_n_s_num3_of_cycle, __pyx_k_num3_of_cycle, sizeof(__pyx_k_num3_of_cycle), 0, 0, 1, 1},
  {&__pyx_n_s_num3_of_shuffle, __pyx_k_num3_of_shuffle, sizeof(__pyx_k_num3_of_shuffle), 0, 0, 1, 1},
  {&__pyx_n_s_num4_of_cycle, __pyx_k_num4_of_cycle, sizeof(__pyx_k_num4_of_cycle), 0, 0, 1, 1},
  {&__pyx_n_s_num4_of_shuffle, __pyx_k_num4_of_shuffle, sizeof(__pyx_k_num4_of_shuffle), 0, 0, 1, 1},
  {&__pyx_n_s_num_cycle, __pyx_k_num_cycle, sizeof(__pyx_k_num_cycle), 0, 0, 1, 1},
  {&__pyx_kp_u_number_of_common_vertex_0, __pyx_k_number_of_common_vertex_0, sizeof(__pyx_k_number_of_common_vertex_0), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_common_vertex_d, __pyx_k_number_of_common_vertex_d, sizeof(__pyx_k_number_of_common_vertex_d), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_edges_d, __pyx_k_number_of_edges_d, sizeof(__pyx_k_number_of_edges_d), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_egses_d, __pyx_k_number_of_egses_d, sizeof(__pyx_k_number_of_egses_d), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_independent_edges_3, __pyx_k_number_of_independent_edges_3, sizeof(__pyx_k_number_of_independent_edges_3), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_independent_edges_d, __pyx_k_number_of_independent_edges_d, sizeof(__pyx_k_number_of_independent_edges_d), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_set_of_coplanar_trian, __pyx_k_number_of_set_of_coplanar_trian, sizeof(__pyx_k_number_of_set_of_coplanar_trian), 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_number_of_tetrahedron_d_2, __pyx_k_number_of_tetrahedron_d_2, sizeof(__pyx_k_number_of_tetrahedron_d_2), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_tetrahedron_in_reduce, __pyx_k_number_of_tetrahedron_in_reduce, sizeof(__pyx_k_number_of_tetrahedron_in_reduce), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_tetrahedron_outside_o, __pyx_k_number_of_tetrahedron_outside_o, sizeof(__pyx_k_number_of_tetrahedron_outside_o), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_trianges_d, __pyx_k_number_of_trianges_d, sizeof(__pyx_k_number_of_trianges_d), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_triangles_0, __pyx_k_number_of_triangles_0, sizeof(__pyx_k_number_of_triangles_0), 0, 1, 0, 0},
  {&__pyx_kp_u_number_of_triangles_d, __pyx_k_number_of_triangles_d, sizeof(__pyx_k_number_of_triangles_d), 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_NOT_obj2_volume, __pyx_k_obj1_NOT_obj2_volume, sizeof(__pyx_k_obj1_NOT_obj2_volume), 0, 1, 0, 0},
  {&__pyx_n_s_obj2, __pyx_k_obj2, sizeof(__pyx_k_obj2), 0, 0, 1, 1},
  {&__pyx_n_s_obj3, __pyx_k_obj3, sizeof(__pyx_k_obj3), 0, 0, 1, 1},
  {&__pyx_kp_u_object_not_object, __pyx_k_object_not_object, sizeof(__pyx_k_object_not_object), 0, 1, 0, 0},
  {&__pyx_kp_u_object_subtraction_2, __pyx_k_object_subtraction_2, sizeof(__pyx_k_object_subtraction_2), 0, 1, 0, 0},
  {&__pyx_kp_u_object_subtraction_3, __pyx_k_object_subtraction_3, sizeof(__pyx_k_object_subtraction_3), 0, 1, 0, 0},
  {&__pyx_kp_u_object_subtraction_dev, __pyx_k_object_subtraction_dev, sizeof(__pyx_k_object_subtraction_dev), 0, 1, 0, 0},
  {&__pyx_kp_u_object_subtraction_dev1, __pyx_k_object_subtraction_dev1, sizeof(__pyx_k_object_subtraction_dev1), 0, 1, 0, 0},
  {&__pyx_kp_u_object_subtraction_dev2, __pyx_k_object_subtraction_dev2, sizeof(__pyx_k_object_subtraction_dev2), 0, 1, 0, 0},
  {&__pyx_kp_u_object_subtraction_new, __pyx_k_object_subtraction_new, sizeof(__pyx_k_object_subtraction_new), 0, 1, 0, 0},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_kp_u_points_C, __pyx_k_points_C, sizeof(__pyx_k_points_C), 0, 1, 0, 0},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
  {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
  {&__pyx_kp_u_return_previous_obj, __pyx_k_return_previous_obj, sizeof(__pyx_k_return_previous_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_search_tetrahedron_in_edges, __pyx_k_search_tetrahedron_in_edges, sizeof(__pyx_k_search_tetrahedron_in_edges), 0, 1, 0, 0},
  {&__pyx_n_s_shuffle, __pyx_k_shuffle, sizeof(__pyx_k_shuffle), 0, 0, 1, 1},
  {&__pyx_kp_u_simplification, __pyx_k_simplification, sizeof(__pyx_k_simplification), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_2, __pyx_k_simplification_2, sizeof(__pyx_k_simplification_2), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_convex_polyhedro, __pyx_k_simplification_convex_polyhedro, sizeof(__pyx_k_simplification_convex_polyhedro), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_fail, __pyx_k_simplification_fail, sizeof(__pyx_k_simplification_fail), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_obj_edges, __pyx_k_simplification_obj_edges, sizeof(__pyx_k_simplification_obj_edges), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_obj_edges_1, __pyx_k_simplification_obj_edges_1, sizeof(__pyx_k_simplification_obj_edges_1), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_obj_edges_using, __pyx_k_simplification_obj_edges_using, sizeof(__pyx_k_simplification_obj_edges_using), 0, 1, 0, 0},
  {&__pyx_kp_u_simplification_obj_smart, __pyx_k_simplification_obj_smart, sizeof(__pyx_k_simplification_obj_smart), 0, 1, 0, 0},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
  {&__pyx_kp_u_subtraction_tetrahedron_object, __pyx_k_subtraction_tetrahedron_object, sizeof(__pyx_k_subtraction_tetrahedron_object), 0, 1, 0, 0},
  {&__pyx_kp_u_subtraction_tetrahedron_object_2, __pyx_k_subtraction_tetrahedron_object_2, sizeof(__pyx_k_subtraction_tetrahedron_object_2), 0, 1, 0, 0},
  {&__pyx_kp_u_succdeded, __pyx_k_succdeded, sizeof(__pyx_k_succdeded), 0, 1, 0, 0},
  {&__pyx_kp_u_succdeded_2, __pyx_k_succdeded_2, sizeof(__pyx_k_succdeded_2), 0, 1, 0, 0},
  {&__pyx_kp_u_succdeded_simplified_volume, __pyx_k_succdeded_simplified_volume, sizeof(__pyx_k_succdeded_simplified_volume), 0, 1, 0, 0},
  {&__pyx_kp_u_succdeded_simplified_volume_2, __pyx_k_succdeded_simplified_volume_2, sizeof(__pyx_k_succdeded_simplified_volume_2), 0, 1, 0, 0},
  {&__pyx_kp_u_succeed, __pyx_k_succeed, sizeof(__pyx_k_succeed), 0, 1, 0, 0},
  {&__pyx_kp_u_surface_cleaner, __pyx_k_surface_cleaner, sizeof(__pyx_k_surface_cleaner), 0, 1, 0, 0},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_u_tetrahedron_not_obj, __pyx_k_tetrahedron_not_obj, sizeof(__pyx_k_tetrahedron_not_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_tmp_d, __pyx_k_tmp_d, sizeof(__pyx_k_tmp_d), 0, 1, 0, 0},
  {&__pyx_kp_u_tmp_d_xyz, __pyx_k_tmp_d_xyz, sizeof(__pyx_k_tmp_d_xyz), 0, 1, 0, 0},
  {&__pyx_kp_u_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 1, 0, 0},
  {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
  {&__pyx_kp_u_total_volume_10_8f, __pyx_k_total_volume_10_8f, sizeof(__pyx_k_total_volume_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_triangles_to_edges, __pyx_k_triangles_to_edges, sizeof(__pyx_k_triangles_to_edges), 0, 1, 0, 0},
  {&__pyx_kp_u_try_to_get_correct_obj, __pyx_k_try_to_get_correct_obj, sizeof(__pyx_k_try_to_get_correct_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_two_segment_into_one, __pyx_k_two_segment_into_one, sizeof(__pyx_k_two_segment_into_one), 0, 1, 0, 0},
  {&__pyx_kp_u_two_triangles_are_identical, __pyx_k_two_triangles_are_identical, sizeof(__pyx_k_two_triangles_are_identical), 0, 1, 0, 0},
  {&__pyx_kp_u_two_triangles_are_sharing_one_e, __pyx_k_two_triangles_are_sharing_one_e, sizeof(__pyx_k_two_triangles_are_sharing_one_e), 0, 1, 0, 0},
  {&__pyx_kp_u_two_triangles_are_sharing_one_v, __pyx_k_two_triangles_are_sharing_one_v, sizeof(__pyx_k_two_triangles_are_sharing_one_v), 0, 1, 0, 0},
  {&__pyx_kp_u_two_triangles_merged_into_one, __pyx_k_two_triangles_merged_into_one, sizeof(__pyx_k_two_triangles_merged_into_one), 0, 1, 0, 0},
  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
  {&__pyx_n_s_verbose_level, __pyx_k_verbose_level, sizeof(__pyx_k_verbose_level), 0, 0, 1, 1},
  {&__pyx_kp_u_volume_10_8f, __pyx_k_volume_10_8f, sizeof(__pyx_k_volume_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_initial_obj, __pyx_k_volume_initial_obj, sizeof(__pyx_k_volume_initial_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_initial_obj_10_8f, __pyx_k_volume_initial_obj_10_8f, sizeof(__pyx_k_volume_initial_obj_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_merged_tet, __pyx_k_volume_merged_tet, sizeof(__pyx_k_volume_merged_tet), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_merged_tet_10_8f, __pyx_k_volume_merged_tet_10_8f, sizeof(__pyx_k_volume_merged_tet_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_of_reduced_obj, __pyx_k_volume_of_reduced_obj, sizeof(__pyx_k_volume_of_reduced_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_simplified_obj, __pyx_k_volume_simplified_obj, sizeof(__pyx_k_volume_simplified_obj), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_simplified_obj_10_8f, __pyx_k_volume_simplified_obj_10_8f, sizeof(__pyx_k_volume_simplified_obj_10_8f), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_sum_2_tet, __pyx_k_volume_sum_2_tet, sizeof(__pyx_k_volume_sum_2_tet), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_sum_3_tet, __pyx_k_volume_sum_3_tet, sizeof(__pyx_k_volume_sum_3_tet), 0, 1, 0, 0},
  {&__pyx_kp_u_volume_sum_4_tet_10_8f, __pyx_k_volume_sum_4_tet_10_8f, sizeof(__pyx_k_volume_sum_4_tet_10_8f), 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, 34, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 37, __pyx_L1_error)
  __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 2306, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 2444, __pyx_L1_error)
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 2445, __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/mics.pyx":34
 * 
 *     if verbose>0:
 *         print('            two_segment_into_one()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_two_segment_into_one); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "pyqcstrc/icosah/mics.pyx":61
 *     #return edge1,removed_vtrx
 *     if counter!=0:
 *         return tmp1.reshape(3,6,3)             # <<<<<<<<<<<<<<
 *     else:
 *         return np.array([[[0]]])
 */
  __pyx_tuple__2 = PyTuple_Pack(3, __pyx_int_3, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "pyqcstrc/icosah/mics.pyx":82
 * 
 *     if verbose>0:
 *         print('            check_two_triangles()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_check_two_triangles); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "pyqcstrc/icosah/mics.pyx":93
 *         if len(tmp3b)==3: # 2
 *             if verbose>0:
 *                 print('              two triangles are identical')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_two_triangles_are_identical); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "pyqcstrc/icosah/mics.pyx":121
 *                     break
 *                 else:
 *                     print('ERROR')             # <<<<<<<<<<<<<<
 *                     pass
 *             # 2
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_u_ERROR); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "pyqcstrc/icosah/mics.pyx":125
 *             # 2
 *             # (case 1)
 *             tmp3a=tmp1a.reshape(4,6,3)             # <<<<<<<<<<<<<<
 *             tmp3b=np.append(tmp3a[0],tmp3a[2])
 *             tmp3c=np.append(tmp3a[1],tmp3a[2])
 */
  __pyx_tuple__6 = PyTuple_Pack(3, __pyx_int_4, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "pyqcstrc/icosah/mics.pyx":133
 *                 tmp3a=tmp1a.reshape(3,6,3)
 *                 if verbose>1:
 *                     print('              two triangles merged into one')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_two_triangles_merged_into_one); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "pyqcstrc/icosah/mics.pyx":150
 *                 else: #
 *                     if verbose>1:
 *                         print('              two triangles are sharing one edge')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_two_triangles_are_sharing_one_e); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "pyqcstrc/icosah/mics.pyx":162
 *                 tmp2a=np.array([a1,a2,a3])
 *                 counter=0
 *                 for i2 in [0,1,2]:             # <<<<<<<<<<<<<<
 *                     [i4,i7,i8]=comb1[i2]
 *                     t1,t2,t3,b1,b2,b3=projection(tmp3b[i4][0],tmp3b[i4][1],tmp3b[i4][2],tmp3b[i4][3],tmp3b[i4][4],tmp3b[i4][5])
 */
  __pyx_tuple__9 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_1, __pyx_int_2); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "pyqcstrc/icosah/mics.pyx":178
 *                     pass
 *             if verbose>1:
 *                 print('              two triangles are sharing one vertex')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_two_triangles_are_sharing_one_v); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "pyqcstrc/icosah/mics.pyx":181
 *             else:
 *                 pass
 *             return tmp1a.reshape(5,6,3)             # <<<<<<<<<<<<<<
 *         else:
 *             if verbose>1:
 */
  __pyx_tuple__11 = PyTuple_Pack(3, __pyx_int_5, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "pyqcstrc/icosah/mics.pyx":184
 *         else:
 *             if verbose>1:
 *                 print('              not coplaner')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_not_coplaner); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "pyqcstrc/icosah/mics.pyx":198
 *     tmp3a=remove_doubling_dim3_in_perp_space(tmp1a.reshape(int(len(tmp1a)/18),6,3))
 *     if verbose>0:
 *         print('        coplanar_check_two_triangles()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_coplanar_check_two_triangles); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "pyqcstrc/icosah/mics.pyx":203
 *     if coplanar_check(tmp3a)==1:
 *         if verbose>0:
 *             print('         coplanar')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_coplanar); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "pyqcstrc/icosah/mics.pyx":209
 *     else:
 *         if verbose>0:
 *             print('         not coplanar')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_not_coplanar); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "pyqcstrc/icosah/mics.pyx":224
 * 
 *     if verbose>0:
 *         print('      generate_obj_surface()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_generate_obj_surface); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "pyqcstrc/icosah/mics.pyx":275
 *     cdef np.ndarray[DTYPE_int_t,ndim=1] t1,t2,t3,a1,a2,a3,b1,b2,b3
 *     if verbose>0:
 *         print('          check_two_vertices()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_check_two_vertices); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "pyqcstrc/icosah/mics.pyx":294
 *     if abs(x0-x1)<TOL and abs(y0-y1)<TOL and abs(z0-z1)<TOL:
 *         if verbose>1:
 *             print('           equivalent')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_equivalent); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "pyqcstrc/icosah/mics.pyx":300
 *     else:
 *         if verbose>1:
 *             print('           inequivalent')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_inequivalent); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "pyqcstrc/icosah/mics.pyx":312
 * 
 *     if verbose>0:
 *         print('         check_two_edges()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_check_two_edges); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "pyqcstrc/icosah/mics.pyx":322
 *     if flag1==2:
 *         if verbose>0:
 *             print('          equivalent')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_equivalent_2); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "pyqcstrc/icosah/mics.pyx":333
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:
 *                 print('          inequivalent')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_inequivalent_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "pyqcstrc/icosah/mics.pyx":349
 *                 if   flag1== 0 and flag2== 0: #   A==CD=B
 *                     if verbose>1:
 *                         print('          A==CD=B')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_A_CD_B); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "pyqcstrc/icosah/mics.pyx":355
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     if verbose>1:
 *                         print('          C A==D==B')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_C_A_D_B); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pyqcstrc/icosah/mics.pyx":361
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     if verbose>1:
 *                         print('          C A=====B D')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_C_A_B_D); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "pyqcstrc/icosah/mics.pyx":367
 *                 elif flag1== 0 and flag2== 1: #   A==C==B D
 *                     if verbose>1:
 *                         print('          A==C==B D')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_A_C_B_D); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "pyqcstrc/icosah/mics.pyx":373
 *                 elif flag1== 0 and flag2==-1: # D A==C==B
 *                     if verbose>1:
 *                         print('          D A==C==B')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_D_A_C_B); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "pyqcstrc/icosah/mics.pyx":379
 *                 elif flag1== 1 and flag2==-1: # D A=====B C
 *                     if verbose>1:
 *                         print('          D A=====B C')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_D_A_B_C); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "pyqcstrc/icosah/mics.pyx":385
 *                 elif flag1== 1 and flag2== 0: #   A==D==B C
 *                     if verbose>1:
 *                         print('          A==D==B C')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_A_D_B_C); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "pyqcstrc/icosah/mics.pyx":399
 * 
 *     if verbose>0:
 *         print('           merge_two_edges()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_merge_two_edges); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "pyqcstrc/icosah/mics.pyx":409
 *     if flag1==2:
 *         if verbose>0:
 *             print('           merged')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_merged); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "pyqcstrc/icosah/mics.pyx":420
 *         if   flag1==2:  # C is not on a line passing through A and B.
 *             if verbose>0:
 *                 print('           cannot merged')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_cannot_merged); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "pyqcstrc/icosah/mics.pyx":423
 *             else:
 *                 pass
 *             return np.array([0]).reshape(1,1,1)             # <<<<<<<<<<<<<<
 *         else:
 *             # check, point D and A==B
 */
  __pyx_tuple__36 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "pyqcstrc/icosah/mics.pyx":442
 *                 elif flag1==-1 and flag2== 0: # C A==D==B
 *                     tmp1a=np.append(edge2[0],edge1[1])
 *                     return tmp1a.reshape(2,6,3)             # <<<<<<<<<<<<<<
 *                 elif flag1==-1 and flag2== 1: # C A=====B D
 *                     tmp1a=np.append(edge2[0],edge2[1])
 */
  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_int_2, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "pyqcstrc/icosah/mics.pyx":468
 * 
 *     if verbose>0:
 *         print('       triangles_to_edges()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_triangles_to_edges); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "pyqcstrc/icosah/mics.pyx":503
 * 
 *     if verbose>0:
 *         print('       surface_cleaner()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_surface_cleaner); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "pyqcstrc/icosah/mics.pyx":681
 *         else: #
 *             if verbose>0:
 *                 print('            number of independent edges, 3')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_number_of_independent_edges_3); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "pyqcstrc/icosah/mics.pyx":701
 *     # Judgement: whether given four edges form a tetrahedron or not.
 *     if verbose>0:
 *         print('       chech_four_edges_forms_tetrahedron()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_chech_four_edges_forms_tetrahed); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "pyqcstrc/icosah/mics.pyx":722
 *         tmp4a=tetrahedralization_points(tmp3a,verbose-1)
 *         if verbose>0:
 *             print('        found')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_found); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "pyqcstrc/icosah/mics.pyx":728
 *     else:
 *         if verbose>0:
 *             print('        not found')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_not_found); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "pyqcstrc/icosah/mics.pyx":745
 * 
 *     if verbose>0:
 *         print('          search_tetrahedron_in_edges()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_search_tetrahedron_in_edges); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "pyqcstrc/icosah/mics.pyx":797
 * 
 *     if verbose>0:
 *         print('       extract_common_vertex()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_extract_common_vertex); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "pyqcstrc/icosah/mics.pyx":833
 *     else:
 *         if verbose>0:
 *             print('        number of common vertex, 0')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_number_of_common_vertex_0); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "pyqcstrc/icosah/mics.pyx":848
 * 
 *     if verbose>0:
 *         print('       extract_surface_without_specific_vertx()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_extract_surface_without_specifi); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "pyqcstrc/icosah/mics.pyx":878
 *     else:
 *         if verbose>0:
 *             print('        number of triangles, 0')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_number_of_triangles_0); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "pyqcstrc/icosah/mics.pyx":897
 * 
 *     if verbose>0:
 *         print('      simplification_convex_polyhedron()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_simplification_convex_polyhedro); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "pyqcstrc/icosah/mics.pyx":937
 *     else:
 *         if verbose>1:
 *             print('        fail, initial obj returned')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_fail_initial_obj_returned); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "pyqcstrc/icosah/mics.pyx":958
 * 
 *     if verbose>0:
 *         print('      simplification_obj_smart()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_simplification_obj_smart); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "pyqcstrc/icosah/mics.pyx":997
 *         else:
 *             if verbose>0:
 *                 print('         fail, initial obj returned')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_fail_initial_obj_returned_2); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "pyqcstrc/icosah/mics.pyx":1059
 * 
 *     if verbose_level>0:
 *         print('      simplification_obj_edges_using_parents()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_simplification_obj_edges_using); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "pyqcstrc/icosah/mics.pyx":1176
 * 
 *         if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *             print('         succdeded')             # <<<<<<<<<<<<<<
 *             return tmp4a
 *         else:
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_succdeded); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "pyqcstrc/icosah/mics.pyx":1180
 *         else:
 *             if verbose_level>0:
 *                 print('         fail')             # <<<<<<<<<<<<<<
 *                 print('         try to get correct obj')
 *             else:
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_fail); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "pyqcstrc/icosah/mics.pyx":1181
 *             if verbose_level>0:
 *                 print('         fail')
 *                 print('         try to get correct obj')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_try_to_get_correct_obj); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "pyqcstrc/icosah/mics.pyx":1186
 *             tmp1a=np.array([0])
 *             for i1 in range(len(tmp4a)):
 *                 tmp4b=tmp4a[i1].reshape(1,4,6,3)             # <<<<<<<<<<<<<<
 *                 w0,w1,w2=obj_volume_6d(tmp4b)
 *                 tmp4c=intersection_using_tetrahedron_4(tmp4b,obj2,verbose_level-1,1)
 */
  __pyx_tuple__63 = PyTuple_Pack(4, __pyx_int_1, __pyx_int_4, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "pyqcstrc/icosah/mics.pyx":1263
 * 
 *     if verbose>0:
 *         print('      simplification_obj_edges_1()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_u_simplification_obj_edges_1); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "pyqcstrc/icosah/mics.pyx":1369
 * 
 *     if verbose_level>0:
 *         print('      simplification_obj_edges()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_simplification_obj_edges); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "pyqcstrc/icosah/mics.pyx":1488
 *         else:
 *             if verbose_level>0:
 *                 print('         fail, try to get correct obj')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_fail_try_to_get_correct_obj); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "pyqcstrc/icosah/mics.pyx":1520
 *             if v3==v0 and v4==v1 and v5==v2 or abs(vol3-vol4)<vol3*TOL:
 *                 if verbose_level>0:
 *                     print('          succdeded')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_u_succdeded_2); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "pyqcstrc/icosah/mics.pyx":1533
 *                 else:
 *                     if verbose_level>2:
 *                         print('          fail, initial obj returned')             # <<<<<<<<<<<<<<
 *                     else:
 *                         pass
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_fail_initial_obj_returned_3); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "pyqcstrc/icosah/mics.pyx":1559
 * 
 *         if verbose>0:
 *             print('         merge_4_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_merge_4_tetrahedra_in_obj); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "pyqcstrc/icosah/mics.pyx":1728
 * 
 *     if verbose>0:
 *         print('         merge_three_tetrahedra()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_merge_three_tetrahedra); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "pyqcstrc/icosah/mics.pyx":1759
 * 
 *     if verbose>0:
 *         print('         flag=1')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_flag_1); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "pyqcstrc/icosah/mics.pyx":1813
 *                 print('         volume sum 3  tet = %d %d %d (%8.6f)'%(v1,v2,v3,(v1+TAU*v2)/v3))
 *                 # sum of two tetrahedra is forming a tetrahedron
 *                 print('         merged')             # <<<<<<<<<<<<<<
 *             else:
 *                 pass
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u_merged_3); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "pyqcstrc/icosah/mics.pyx":1836
 * 
 *     if verbose>0:
 *         print('         merge_four_tetrahedra()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_u_merge_four_tetrahedra); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "pyqcstrc/icosah/mics.pyx":1929
 *             tmp1a=np.append(tmp1a,tetrahedron_3)
 *             tmp1a=np.append(tmp1a,tetrahedron_4)
 *             tmp4a=tmp1a.reshape(4,4,6,3)             # <<<<<<<<<<<<<<
 *             # Total volume of five tetrahedra
 *             vol1=obj_volume_6d_numerical(tmp4a)
 */
  __pyx_tuple__74 = PyTuple_Pack(4, __pyx_int_4, __pyx_int_4, __pyx_int_6, __pyx_int_3); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "pyqcstrc/icosah/mics.pyx":1964
 *     if len(obj)>=3:
 *         if verbose>0:
 *             print('        merge_3_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_merge_3_tetrahedra_in_obj); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "pyqcstrc/icosah/mics.pyx":2067
 *     if len(obj)>=2:
 *         if verbose>0:
 *             print('         merge_2_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *         else:
 *             pass
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_merge_2_tetrahedra_in_obj); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "pyqcstrc/icosah/mics.pyx":2178
 * 
 *     if verbose>0:
 *         print('         merge_two_tetrahedra()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_merge_two_tetrahedra); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "pyqcstrc/icosah/mics.pyx":2225
 * 
 *     if verbose>0:
 *         print('        do_merge_tetrahedra_in_obj()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_do_merge_tetrahedra_in_obj); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 2225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "pyqcstrc/icosah/mics.pyx":2256
 *             else:
 *                 if verbose>0:
 *                     print('      simplification: fail')             # <<<<<<<<<<<<<<
 *                     print('      return previous obj')
 *                 else:
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_simplification_fail); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "pyqcstrc/icosah/mics.pyx":2257
 *                 if verbose>0:
 *                     print('      simplification: fail')
 *                     print('      return previous obj')             # <<<<<<<<<<<<<<
 *                 else:
 *                     pass
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_return_previous_obj); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "pyqcstrc/icosah/mics.pyx":2288
 *     # verbose_level  0 > 4 (no comment, verbose)
 *     if verbose_level>=0:
 *         print('    simplification()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_simplification_2); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "pyqcstrc/icosah/mics.pyx":2453
 *         if not a:
 *             break
 *         line.append(a[:-1])             # <<<<<<<<<<<<<<
 *     return line
 * 
 */
  __pyx_slice__82 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__82)) __PYX_ERR(0, 2453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__82);
  __Pyx_GIVEREF(__pyx_slice__82);

  /* "pyqcstrc/icosah/mics.pyx":2482
 * 
 *     if verbose>0:
 *         print('    object_subtraction_2()')             # <<<<<<<<<<<<<<
 *     #if verbose==1:
 *     #    print '  get A not B = A not (A and B)'
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_object_subtraction_2); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 2482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "pyqcstrc/icosah/mics.pyx":2608
 * 
 *     if verbose>0:
 *         print('       Object_subtraction()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_Object_subtraction); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "pyqcstrc/icosah/mics.pyx":2701
 *     counter1=0
 *     if verbose>0:
 *         print('       object_subtraction_new()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_object_subtraction_new); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "pyqcstrc/icosah/mics.pyx":2714
 *     #
 *     if verbose>0:
 *         print('          (1) A and B')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_1_A_and_B); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 2714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "pyqcstrc/icosah/mics.pyx":2721
 * 
 *     if verbose>0:
 *         print('          (2) B')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_2_B); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 2721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "pyqcstrc/icosah/mics.pyx":2736
 *     """
 *     if verbose>0:
 *         print('   (3) A not B')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_u_3_A_not_B); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 2736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "pyqcstrc/icosah/mics.pyx":2908
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] surface_obj3
 * 
 *     print(' object_subtraction_dev1()')             # <<<<<<<<<<<<<<
 * 
 *     #if verbose==1:
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_object_subtraction_dev1); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 2908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "pyqcstrc/icosah/mics.pyx":3049
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] tmp4a,tmp4b,tmp4c
 * 
 *     print(' object_subtraction_dev()')             # <<<<<<<<<<<<<<
 * 
 *     #if verbose==1:
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_u_object_subtraction_dev); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 3049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "pyqcstrc/icosah/mics.pyx":3242
 *     cdef np.ndarray[DTYPE_int_t,ndim=4] surface_obj3
 * 
 *     print(' object_subtraction_dev2()')             # <<<<<<<<<<<<<<
 * 
 *     #if verbose==1:
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_u_object_subtraction_dev2); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 3242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "pyqcstrc/icosah/mics.pyx":3373
 * 
 *     if verbose>0:
 *         print('       object_not_object()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_u_object_not_object); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 3373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "pyqcstrc/icosah/mics.pyx":3414
 * 
 *     if verbose>0:
 *         print('       tetrahedron_not_obj()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_tetrahedron_not_obj); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "pyqcstrc/icosah/mics.pyx":3471
 * 
 *     if verbose>0:
 *         print('        object_subtraction_3()')             # <<<<<<<<<<<<<<
 *     #print '  get A not B = A not (A and B)'
 *     #print '  obj1: A'
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_object_subtraction_3); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 3471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "pyqcstrc/icosah/mics.pyx":3623
 * 
 *     if verbose>0:
 *         print('       subtraction_tetrahedron_object()')             # <<<<<<<<<<<<<<
 *     #print 'Subtraction_tetrahedron_object()'
 *     #print 'Intersection_two_tetrahedron_mod2()'
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_subtraction_tetrahedron_object); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 3623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "pyqcstrc/icosah/mics.pyx":3756
 * 
 *     if verbose>0:
 *         print('         subtraction_tetrahedron_object_dev()')             # <<<<<<<<<<<<<<
 *     else:
 *         pass
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_subtraction_tetrahedron_object_2); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 3756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "pyqcstrc/icosah/mics.pyx":3864
 *     tmp3b=tmp1b.reshape(int(len(tmp1b)/18),6,3)
 *     tmp3b=remove_doubling_dim3_in_perp_space(tmp3b)
 *     print('    points C:')             # <<<<<<<<<<<<<<
 *     #for i1 in range(len(tmp3b)):
 *     #    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_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_points_C); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 3864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "pyqcstrc/icosah/mics.pyx":3885
 *             pass
 *         if verbose>0:
 *             print('    merge points A and points B -> tetrahedralization')             # <<<<<<<<<<<<<<
 *         tmp3c=tmp1c.reshape(int(len(tmp1c)/18),6,3)
 *         tmp3c=remove_doubling_dim3_in_perp_space(tmp3c)
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_merge_points_A_and_points_B_tet); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 3885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "../../../../../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__99 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "../../../../../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__100 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "pyqcstrc/icosah/mics.pyx":16
 * 
 * 
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0             # <<<<<<<<<<<<<<
 * cdef np.float64_t TOL=1e-6 # tolerance
 * 
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_int_5); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyList_Type_index.type = (PyObject*)&PyList_Type;
  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_36 = PyInt_FromLong(36); if (unlikely(!__pyx_int_36)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_54 = PyInt_FromLong(54); if (unlikely(!__pyx_int_54)) __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)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

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("simplification_obj_edges_1", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_1, "PyArrayObject *(PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("simplification_obj_edges", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges, "PyArrayObject *(PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("simplification_obj_smart", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_smart, "PyArrayObject *(PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("simplification_obj_edges_using_parents", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_simplification_obj_edges_using_parents, "PyArrayObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("simplification", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_simplification, "PyArrayObject *(PyArrayObject *, int, int, int, int, int, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("simplification_convex_polyhedron", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_simplification_convex_polyhedron, "PyArrayObject *(PyArrayObject *, int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction_2", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_2, "PyArrayObject *(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction_new", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_new, "PyArrayObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction_dev", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev, "PyArrayObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction_dev1", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev1, "PyArrayObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction_dev2", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_dev2, "PyArrayObject *(PyArrayObject *, PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("object_subtraction_3", (void (*)(void))__pyx_f_8pyqcstrc_6icosah_4mics_object_subtraction_3, "PyArrayObject *(PyArrayObject *, PyArrayObject *, 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, "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, "triangle_area", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5math1_triangle_area, "double (PyArrayObject *, 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)
  __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, "point_on_segment", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_10numericalc_point_on_segment, "int (PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  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, "projection_numerical", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_10numericalc_projection_numerical, "PyObject *(__pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, __pyx_t_8pyqcstrc_6icosah_10numericalc_DTYPE_double_t, 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, "equivalent_triangle", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_equivalent_triangle, "int (PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "equivalent_triangle_1", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_equivalent_triangle_1, "int (PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  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)
  if (__Pyx_ImportFunction(__pyx_t_1, "generator_xyz_dim4_tetrahedron", (void (**)(void))&__pyx_f_8pyqcstrc_6icosah_5utils_generator_xyz_dim4_tetrahedron, "int (PyArrayObject *, char, int, 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.intsct"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_ImportFunction(__pyx_t_1, "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_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 initmics(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initmics(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_mics(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_mics(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_mics(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 'mics' 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_mics(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("mics", __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__mics) {
    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.mics")) {
      if (unlikely(PyDict_SetItemString(modules, "pyqcstrc.icosah.mics", __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/mics.pyx":5
 * # Copyright (c) 2021 Tsunetomo Yamada <tsunetomo.yamada@rs.tus.ac.jp>
 * #
 * import sys             # <<<<<<<<<<<<<<
 * import numpy as np
 * cimport numpy as np
 */
  __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/mics.pyx":6
 * #
 * import sys
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * cimport cython
 */
  __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/mics.pyx":16
 * 
 * 
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0             # <<<<<<<<<<<<<<
 * cdef np.float64_t TOL=1e-6 # tolerance
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __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, 16, __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__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __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, 16, __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, 16, __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, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_8pyqcstrc_6icosah_4mics_TAU = __pyx_t_3;

  /* "pyqcstrc/icosah/mics.pyx":17
 * 
 * cdef np.float64_t TAU=(1+np.sqrt(5))/2.0
 * cdef np.float64_t TOL=1e-6 # tolerance             # <<<<<<<<<<<<<<
 * 
 * cdef np.ndarray two_segment_into_one(np.ndarray[DTYPE_int_t, ndim=3] line_segment_1,
 */
  __pyx_v_8pyqcstrc_6icosah_4mics_TOL = 1e-6;

  /* "pyqcstrc/icosah/mics.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.mics", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyqcstrc.icosah.mics");
  }
  __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;
}

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

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

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

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

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

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

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

/* RaiseTooManyValuesToUnpack */
  static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
  static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
  static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
  static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* RaiseNoneIterError */
  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

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

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

/* 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_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            *(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 = (Py_ssize_t) (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 = (Py_ssize_t) (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);
}

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

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

/* UnpackUnboundCMethod */
  static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* None */
  static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

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

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

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

/* SliceObject */
  static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* PyIntCompare */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyIntBinop */
  #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(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(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            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(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            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

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

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

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
    const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     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;
}

/* CIntFromPy */
    static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
    const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) 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 (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)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 (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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 (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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
            char val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int 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 (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -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 */
