From 97a65405e6237148c1e4cdddc03cb5e36d473fe9 Mon Sep 17 00:00:00 2001 From: Russell Neches Date: Tue, 19 Nov 2024 15:37:29 +0900 Subject: [PATCH] optimized quartet topologies with tests --- SuchTree/MuchTree.c | 6497 +++++++++++++++---------------- SuchTree/MuchTree.pyx | 37 +- SuchTree/tests/test_SuchTree.py | 9 + 3 files changed, 3125 insertions(+), 3418 deletions(-) diff --git a/SuchTree/MuchTree.c b/SuchTree/MuchTree.c index 59317a5..27d966c 100644 --- a/SuchTree/MuchTree.c +++ b/SuchTree/MuchTree.c @@ -4,14 +4,14 @@ { "distutils": { "depends": [ - "/tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", - "/tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", - "/tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", - "/tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", - "/tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" + "/tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h", + "/tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h", + "/tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h", + "/tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h", + "/tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h" ], "include_dirs": [ - "/tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/_core/include" + "/tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/_core/include" ], "name": "MuchTree", "sources": [ @@ -1673,7 +1673,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1682,7 +1682,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1691,7 +1691,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1700,7 +1700,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1709,7 +1709,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1718,7 +1718,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1727,7 +1727,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1736,7 +1736,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1745,7 +1745,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1754,7 +1754,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1763,7 +1763,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791 * ctypedef double complex complex128_t * * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1772,7 +1772,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792 * * ctypedef npy_longlong longlong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1781,7 +1781,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1790,7 +1790,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1799,7 +1799,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1808,7 +1808,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1817,7 +1817,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1900,7 +1900,7 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095 * * # Iterator API added in v1.6 * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil # <<<<<<<<<<<<<< @@ -1909,7 +1909,7 @@ struct __pyx_memoryviewslice_obj; */ typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *); -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096 * # Iterator API added in v1.6 * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil # <<<<<<<<<<<<<< @@ -2007,7 +2007,7 @@ struct __pyx_t_8MuchTree_Node { float distance; }; -/* "MuchTree.pyx":978 +/* "MuchTree.pyx":1000 * * * cdef struct Column : # <<<<<<<<<<<<<< @@ -2043,7 +2043,7 @@ struct __pyx_obj_8MuchTree_SuchTree { }; -/* "MuchTree.pyx":983 +/* "MuchTree.pyx":1005 * unsigned int* links * * cdef class SuchLinkedTrees : # <<<<<<<<<<<<<< @@ -2204,7 +2204,7 @@ struct __pyx_obj_8MuchTree___pyx_scope_struct_6_pre_order { }; -/* "MuchTree.pyx":931 +/* "MuchTree.pyx":953 * print( ' right child : %d' % self.data[n].right_child ) * * def nodes_data( self ) : # <<<<<<<<<<<<<< @@ -2222,7 +2222,7 @@ struct __pyx_obj_8MuchTree___pyx_scope_struct_7_nodes_data { }; -/* "MuchTree.pyx":942 +/* "MuchTree.pyx":964 * yield ( n, { 'label' : leaf_name } ) * * def edges_data( self ) : # <<<<<<<<<<<<<< @@ -2239,7 +2239,7 @@ struct __pyx_obj_8MuchTree___pyx_scope_struct_8_edges_data { }; -/* "MuchTree.pyx":1539 +/* "MuchTree.pyx":1561 * 'deviation_b' : deviation_b } * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -2343,7 +2343,7 @@ struct __pyx_vtabstruct_8MuchTree_SuchTree { float (*_get_distance_to_root)(struct __pyx_obj_8MuchTree_SuchTree *, PyObject *); int (*_is_leaf)(struct __pyx_obj_8MuchTree_SuchTree *, int); int (*_is_ancestor)(struct __pyx_obj_8MuchTree_SuchTree *, int, int); - PyObject *(*_quartet_topologies)(struct __pyx_obj_8MuchTree_SuchTree *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); + void (*_quartet_topologies)(struct __pyx_obj_8MuchTree_SuchTree *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); int (*_mrca)(struct __pyx_obj_8MuchTree_SuchTree *, __Pyx_memviewslice, int, int); float (*_distance)(struct __pyx_obj_8MuchTree_SuchTree *, int, int); void (*_distances)(struct __pyx_obj_8MuchTree_SuchTree *, unsigned int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice); @@ -2351,7 +2351,7 @@ struct __pyx_vtabstruct_8MuchTree_SuchTree { static struct __pyx_vtabstruct_8MuchTree_SuchTree *__pyx_vtabptr_8MuchTree_SuchTree; -/* "MuchTree.pyx":983 +/* "MuchTree.pyx":1005 * unsigned int* links * * cdef class SuchLinkedTrees : # <<<<<<<<<<<<<< @@ -3370,9 +3370,6 @@ static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) #endif -/* BufferIndexError.proto */ -static void __Pyx_RaiseBufferIndexError(int axis); - /* PySetContains.proto */ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); @@ -3543,6 +3540,9 @@ static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, doub (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2)) #endif +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); @@ -4024,7 +4024,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p static float __pyx_f_8MuchTree_8SuchTree__get_distance_to_root(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, PyObject *__pyx_v_node_id); /* proto*/ static int __pyx_f_8MuchTree_8SuchTree__is_leaf(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, int __pyx_v_node_id); /* proto*/ static int __pyx_f_8MuchTree_8SuchTree__is_ancestor(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, int __pyx_v_a, int __pyx_v_b); /* proto*/ -static PyObject *__pyx_f_8MuchTree_8SuchTree__quartet_topologies(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, __Pyx_memviewslice __pyx_v_quartets, __Pyx_memviewslice __pyx_v_topologies, __Pyx_memviewslice __pyx_v_visited, __Pyx_memviewslice __pyx_v_M, __Pyx_memviewslice __pyx_v_C, __Pyx_memviewslice __pyx_v_I); /* proto*/ +static void __pyx_f_8MuchTree_8SuchTree__quartet_topologies(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, __Pyx_memviewslice __pyx_v_quartets, __Pyx_memviewslice __pyx_v_topologies, __Pyx_memviewslice __pyx_v_visited, __Pyx_memviewslice __pyx_v_M, __Pyx_memviewslice __pyx_v_C, __Pyx_memviewslice __pyx_v_I); /* proto*/ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, __Pyx_memviewslice __pyx_v_visited, int __pyx_v_a, int __pyx_v_b); /* proto*/ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, int __pyx_v_a, int __pyx_v_b); /* proto*/ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_length, __Pyx_memviewslice __pyx_v_visited, __Pyx_memviewslice __pyx_v_ids, __Pyx_memviewslice __pyx_v_result); /* proto*/ @@ -21255,7 +21255,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 * * @property * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21266,7 +21266,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287 * @property * cdef inline npy_intp itemsize(self) noexcept nogil: * return PyDataType_ELSIZE(self) # <<<<<<<<<<<<<< @@ -21276,7 +21276,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_D __pyx_r = PyDataType_ELSIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286 * * @property * cdef inline npy_intp itemsize(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21289,7 +21289,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_D return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 * * @property * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21300,7 +21300,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_D static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291 * @property * cdef inline npy_intp alignment(self) noexcept nogil: * return PyDataType_ALIGNMENT(self) # <<<<<<<<<<<<<< @@ -21310,7 +21310,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290 * * @property * cdef inline npy_intp alignment(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21323,7 +21323,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 * # for this using PyDataType_HASFIELDS. * @property * cdef inline object fields(self): # <<<<<<<<<<<<<< @@ -21337,7 +21337,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Desc PyObject *__pyx_t_1; __Pyx_RefNannySetupContext("fields", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297 * @property * cdef inline object fields(self): * return PyDataType_FIELDS(self) # <<<<<<<<<<<<<< @@ -21350,7 +21350,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Desc __pyx_r = ((PyObject *)__pyx_t_1); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296 * # for this using PyDataType_HASFIELDS. * @property * cdef inline object fields(self): # <<<<<<<<<<<<<< @@ -21365,7 +21365,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Desc return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 * * @property * cdef inline tuple names(self): # <<<<<<<<<<<<<< @@ -21379,7 +21379,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr PyObject *__pyx_t_1; __Pyx_RefNannySetupContext("names", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301 * @property * cdef inline tuple names(self): * return PyDataType_NAMES(self) # <<<<<<<<<<<<<< @@ -21392,7 +21392,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr __pyx_r = ((PyObject*)__pyx_t_1); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300 * * @property * cdef inline tuple names(self): # <<<<<<<<<<<<<< @@ -21407,7 +21407,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 * # this field via the inline helper method PyDataType_SHAPE. * @property * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21418,7 +21418,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) { PyArray_ArrayDescr *__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308 * @property * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: * return PyDataType_SUBARRAY(self) # <<<<<<<<<<<<<< @@ -21428,7 +21428,7 @@ static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarra __pyx_r = PyDataType_SUBARRAY(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307 * # this field via the inline helper method PyDataType_SHAPE. * @property * cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21441,7 +21441,7 @@ static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarra return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 * * @property * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21452,7 +21452,7 @@ static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarra static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) { npy_uint64 __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313 * cdef inline npy_uint64 flags(self) noexcept nogil: * """The data types flags.""" * return PyDataType_FLAGS(self) # <<<<<<<<<<<<<< @@ -21462,7 +21462,7 @@ static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr __pyx_r = PyDataType_FLAGS(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311 * * @property * cdef inline npy_uint64 flags(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21475,7 +21475,7 @@ static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 * * @property * cdef inline int numiter(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21486,7 +21486,7 @@ static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) { int __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325 * cdef inline int numiter(self) noexcept nogil: * """The number of arrays that need to be broadcast to the same shape.""" * return PyArray_MultiIter_NUMITER(self) # <<<<<<<<<<<<<< @@ -21496,7 +21496,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMulti __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323 * * @property * cdef inline int numiter(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21509,7 +21509,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMulti return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21520,7 +21520,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMulti static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330 * cdef inline npy_intp size(self) noexcept nogil: * """The total broadcasted size.""" * return PyArray_MultiIter_SIZE(self) # <<<<<<<<<<<<<< @@ -21530,7 +21530,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiI __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21543,7 +21543,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiI return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 * * @property * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21554,7 +21554,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiI static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335 * cdef inline npy_intp index(self) noexcept nogil: * """The current (1-d) index into the broadcasted result.""" * return PyArray_MultiIter_INDEX(self) # <<<<<<<<<<<<<< @@ -21564,7 +21564,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMult __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333 * * @property * cdef inline npy_intp index(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21577,7 +21577,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMult return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 * * @property * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21588,7 +21588,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMult static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) { int __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340 * cdef inline int nd(self) noexcept nogil: * """The number of dimensions in the broadcasted result.""" * return PyArray_MultiIter_NDIM(self) # <<<<<<<<<<<<<< @@ -21598,7 +21598,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338 * * @property * cdef inline int nd(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21611,7 +21611,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 * * @property * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21622,7 +21622,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345 * cdef inline npy_intp* dimensions(self) noexcept nogil: * """The shape of the broadcasted result.""" * return PyArray_MultiIter_DIMS(self) # <<<<<<<<<<<<<< @@ -21632,7 +21632,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343 * * @property * cdef inline npy_intp* dimensions(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21645,7 +21645,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 * * @property * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21656,7 +21656,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) { void **__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351 * """An array of iterator objects that holds the iterators for the arrays to be broadcast together. * On return, the iterators are adjusted for broadcasting.""" * return PyArray_MultiIter_ITERS(self) # <<<<<<<<<<<<<< @@ -21666,7 +21666,7 @@ static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiI __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348 * * @property * cdef inline void** iters(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21679,7 +21679,7 @@ static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiI return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21690,7 +21690,7 @@ static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiI static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -21700,7 +21700,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366 * * @property * cdef inline PyObject* base(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21713,7 +21713,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -21727,7 +21727,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -21740,7 +21740,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -21755,7 +21755,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21766,7 +21766,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -21776,7 +21776,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378 * * @property * cdef inline int ndim(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21789,7 +21789,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21800,7 +21800,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -21810,7 +21810,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384 * * @property * cdef inline npy_intp *shape(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21823,7 +21823,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21834,7 +21834,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -21844,7 +21844,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392 * * @property * cdef inline npy_intp *strides(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21857,7 +21857,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21868,7 +21868,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -21878,7 +21878,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399 * * @property * cdef inline npy_intp size(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21891,7 +21891,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21902,7 +21902,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -21912,7 +21912,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405 * * @property * cdef inline char* data(self) noexcept nogil: # <<<<<<<<<<<<<< @@ -21925,7 +21925,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -21942,7 +21942,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -21956,7 +21956,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806 * ctypedef long double complex clongdouble_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -21975,7 +21975,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -21992,7 +21992,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -22006,7 +22006,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -22025,7 +22025,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -22042,7 +22042,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -22056,7 +22056,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -22075,7 +22075,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -22092,7 +22092,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -22106,7 +22106,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -22125,7 +22125,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -22142,7 +22142,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -22156,7 +22156,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -22175,7 +22175,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -22190,7 +22190,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ PyObject *__pyx_t_2; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -22200,7 +22200,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -22213,7 +22213,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_t_2); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -22222,7 +22222,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -22236,7 +22236,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -22251,7 +22251,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<< @@ -22265,7 +22265,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010 * * cdef inline void set_array_base(ndarray arr, object base) except *: * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -22274,7 +22274,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011 * cdef inline void set_array_base(ndarray arr, object base) except *: * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -22283,7 +22283,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error) - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base) except *: # <<<<<<<<<<<<<< @@ -22298,7 +22298,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -22313,7 +22313,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -22322,7 +22322,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -22332,7 +22332,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -22343,7 +22343,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -22352,7 +22352,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -22364,7 +22364,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -22379,7 +22379,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -22403,7 +22403,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -22419,7 +22419,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -22428,7 +22428,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error) - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -22442,7 +22442,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -22457,7 +22457,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -22472,7 +22472,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -22488,7 +22488,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -22511,7 +22511,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027 * raise ImportError("numpy._core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -22535,7 +22535,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -22551,7 +22551,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -22560,7 +22560,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error) - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -22574,7 +22574,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -22589,7 +22589,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< @@ -22604,7 +22604,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -22620,7 +22620,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027 * raise ImportError("numpy._core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -22643,7 +22643,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033 * raise ImportError("numpy._core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -22667,7 +22667,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -22683,7 +22683,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -22692,7 +22692,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -22706,7 +22706,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -22721,7 +22721,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037 * _import_umath() * except Exception: * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< @@ -22736,7 +22736,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -22752,7 +22752,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033 * raise ImportError("numpy._core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -22775,7 +22775,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -22786,7 +22786,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -22796,7 +22796,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040 * * * cdef inline bint is_timedelta64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -22809,7 +22809,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -22820,7 +22820,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -22830,7 +22830,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055 * * * cdef inline bint is_datetime64_object(object obj) noexcept: # <<<<<<<<<<<<<< @@ -22843,7 +22843,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -22854,7 +22854,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -22864,7 +22864,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070 * * * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -22877,7 +22877,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -22888,7 +22888,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -22898,7 +22898,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -22911,7 +22911,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 +/* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -22922,7 +22922,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -22932,7 +22932,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil: # <<<<<<<<<<<<<< @@ -33079,19 +33079,20 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py Py_ssize_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; - unsigned int __pyx_t_15; - PyObject *(*__pyx_t_16)(PyObject *); + PyObject *__pyx_t_15 = NULL; + unsigned int __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); - __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } }; - int __pyx_t_19; + PyObject *(*__pyx_t_18)(PyObject *); + __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_t_20; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -33114,7 +33115,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * names = [] * ids = [] # <<<<<<<<<<<<<< * for n,i in enumerate( ( a, b, c, d ) ) : - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -33125,7 +33126,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * names = [] * ids = [] * for n,i in enumerate( ( a, b, c, d ) ) : # <<<<<<<<<<<<<< - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : * ids.append( i ) */ __Pyx_INCREF(__pyx_int_0); @@ -33168,24 +33169,32 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py /* "MuchTree.pyx":604 * ids = [] * for n,i in enumerate( ( a, b, c, d ) ) : - * if isinstance( i, int ) : # <<<<<<<<<<<<<< + * if isinstance( i, ( int, np.integer ) ) : # <<<<<<<<<<<<<< * ids.append( i ) * try : */ - __pyx_t_5 = PyInt_Check(__pyx_v_i); + __pyx_t_6 = PyInt_Check(__pyx_v_i); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = __Pyx_TypeCheck(__pyx_v_i, __pyx_ptype_5numpy_integer); + __pyx_t_5 = __pyx_t_6; + __pyx_L6_bool_binop_done:; if (__pyx_t_5) { /* "MuchTree.pyx":605 * for n,i in enumerate( ( a, b, c, d ) ) : - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : * ids.append( i ) # <<<<<<<<<<<<<< * try : * names.append( self.leafnodes[ i ] ) */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_ids, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ids, __pyx_v_i); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 605, __pyx_L1_error) /* "MuchTree.pyx":606 - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : * ids.append( i ) * try : # <<<<<<<<<<<<<< * names.append( self.leafnodes[ i ] ) @@ -33194,10 +33203,10 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_7); + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "MuchTree.pyx":607 @@ -33207,24 +33216,24 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * except KeyError : * raise Exception( 'Leaf not found : ' + i ) */ - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->leafnodes, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L6_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->leafnodes, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_names, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 607, __pyx_L6_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_names, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 607, __pyx_L8_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "MuchTree.pyx":606 - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : * ids.append( i ) * try : # <<<<<<<<<<<<<< * names.append( self.leafnodes[ i ] ) * except KeyError : */ } - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - goto __pyx_L13_try_end; - __pyx_L6_error:; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + goto __pyx_L15_try_end; + __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "MuchTree.pyx":608 @@ -33234,13 +33243,13 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * raise Exception( 'Leaf not found : ' + i ) * else : */ - __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); - if (__pyx_t_10) { + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_11) { __Pyx_AddTraceback("MuchTree.SuchTree.get_quartet_topology", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 608, __pyx_L8_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_12, &__pyx_t_13) < 0) __PYX_ERR(0, 608, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); /* "MuchTree.pyx":609 * names.append( self.leafnodes[ i ] ) @@ -33249,37 +33258,37 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * else : * names.append( i ) */ - __pyx_t_13 = PyNumber_Add(__pyx_kp_u_Leaf_not_found, __pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 609, __pyx_L8_except_error) - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 609, __pyx_L8_except_error) + __pyx_t_14 = PyNumber_Add(__pyx_kp_u_Leaf_not_found, __pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 609, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_Raise(__pyx_t_14, 0, 0, 0); + __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L10_except_error) + __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __PYX_ERR(0, 609, __pyx_L8_except_error) + __Pyx_Raise(__pyx_t_15, 0, 0, 0); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __PYX_ERR(0, 609, __pyx_L10_except_error) } - goto __pyx_L8_except_error; + goto __pyx_L10_except_error; /* "MuchTree.pyx":606 - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : * ids.append( i ) * try : # <<<<<<<<<<<<<< * names.append( self.leafnodes[ i ] ) * except KeyError : */ - __pyx_L8_except_error:; - __Pyx_XGIVEREF(__pyx_t_7); + __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; - __pyx_L13_try_end:; + __pyx_L15_try_end:; } /* "MuchTree.pyx":604 * ids = [] * for n,i in enumerate( ( a, b, c, d ) ) : - * if isinstance( i, int ) : # <<<<<<<<<<<<<< + * if isinstance( i, ( int, np.integer ) ) : # <<<<<<<<<<<<<< * ids.append( i ) * try : */ @@ -33294,7 +33303,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * ids.append( self.leafs[i] ) */ /*else*/ { - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_names, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_names, __pyx_v_i); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error) /* "MuchTree.pyx":612 * else : @@ -33306,10 +33315,10 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); + __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "MuchTree.pyx":613 @@ -33319,10 +33328,10 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * except KeyError : * raise Exception( 'Leaf not found : ' + i ) */ - __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 613, __pyx_L16_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_ids, __pyx_t_12); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 613, __pyx_L16_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 613, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ids, __pyx_t_13); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 613, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "MuchTree.pyx":612 * else : @@ -33332,15 +33341,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * except KeyError : */ } + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L23_try_end; - __pyx_L16_error:; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L25_try_end; + __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "MuchTree.pyx":614 @@ -33350,12 +33359,12 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * raise Exception( 'Leaf not found : ' + i ) * */ - __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); - if (__pyx_t_10) { + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); + if (__pyx_t_11) { __Pyx_AddTraceback("MuchTree.SuchTree.get_quartet_topology", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_2) < 0) __PYX_ERR(0, 614, __pyx_L18_except_error) + if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_12, &__pyx_t_2) < 0) __PYX_ERR(0, 614, __pyx_L20_except_error) + __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_2); /* "MuchTree.pyx":615 @@ -33365,16 +33374,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * * visited = np.zeros( self.depth, dtype=int ) */ - __pyx_t_14 = PyNumber_Add(__pyx_kp_u_Leaf_not_found, __pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 615, __pyx_L18_except_error) + __pyx_t_15 = PyNumber_Add(__pyx_kp_u_Leaf_not_found, __pyx_v_i); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L20_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_14 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 615, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 615, __pyx_L18_except_error) - __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_Raise(__pyx_t_14, 0, 0, 0); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_Raise(__pyx_t_13, 0, 0, 0); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 615, __pyx_L18_except_error) + __PYX_ERR(0, 615, __pyx_L20_except_error) } - goto __pyx_L18_except_error; + goto __pyx_L20_except_error; /* "MuchTree.pyx":612 * else : @@ -33383,13 +33392,13 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * ids.append( self.leafs[i] ) * except KeyError : */ - __pyx_L18_except_error:; + __pyx_L20_except_error:; + __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_7); - __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); + __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8); goto __pyx_L1_error; - __pyx_L23_try_end:; + __pyx_L25_try_end:; } } __pyx_L5:; @@ -33398,7 +33407,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * names = [] * ids = [] * for n,i in enumerate( ( a, b, c, d ) ) : # <<<<<<<<<<<<<< - * if isinstance( i, int ) : + * if isinstance( i, ( int, np.integer ) ) : * ids.append( i ) */ } @@ -33427,13 +33436,13 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 617, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 617, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_visited = __pyx_t_11; - __pyx_t_11 = 0; + __pyx_v_visited = __pyx_t_12; + __pyx_t_12 = 0; /* "MuchTree.pyx":619 * visited = np.zeros( self.depth, dtype=int ) @@ -33443,12 +33452,12 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * M = [ self._mrca( visited, x, y ) for x,y in pairs ] */ { /* enter inner scope */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 619, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_combinations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 619, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_combinations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; - __pyx_t_15 = 0; + __pyx_t_16 = 0; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); @@ -33457,66 +33466,66 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_15 = 1; + __pyx_t_16 = 1; } } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_ids, __pyx_int_2}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_15, 2+__pyx_t_15); + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_16, 2+__pyx_t_16); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L29_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; - __pyx_t_16 = NULL; + __pyx_t_17 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_17 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 619, __pyx_L31_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_16)) { + if (likely(!__pyx_t_17)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 619, __pyx_L29_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 619, __pyx_L31_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 619, __pyx_L31_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 619, __pyx_L29_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 619, __pyx_L31_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 619, __pyx_L31_error) #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_16(__pyx_t_2); + __pyx_t_1 = __pyx_t_17(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 619, __pyx_L29_error) + else __PYX_ERR(0, 619, __pyx_L31_error) } break; } @@ -33528,76 +33537,76 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 619, __pyx_L29_error) + __PYX_ERR(0, 619, __pyx_L31_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); - __pyx_t_12 = PyList_GET_ITEM(sequence, 1); + __pyx_t_13 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L29_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 619, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 619, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_17 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); - index = 0; __pyx_t_3 = __pyx_t_17(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L32_unpacking_failed; + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); + index = 0; __pyx_t_3 = __pyx_t_18(__pyx_t_14); if (unlikely(!__pyx_t_3)) goto __pyx_L34_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - index = 1; __pyx_t_12 = __pyx_t_17(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L32_unpacking_failed; - __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_13), 2) < 0) __PYX_ERR(0, 619, __pyx_L29_error) - __pyx_t_17 = NULL; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - goto __pyx_L33_unpacking_done; - __pyx_L32_unpacking_failed:; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_17 = NULL; + index = 1; __pyx_t_13 = __pyx_t_18(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L34_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_14), 2) < 0) __PYX_ERR(0, 619, __pyx_L31_error) + __pyx_t_18 = NULL; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L35_unpacking_done; + __pyx_L34_unpacking_failed:; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_18 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 619, __pyx_L29_error) - __pyx_L33_unpacking_done:; + __PYX_ERR(0, 619, __pyx_L31_error) + __pyx_L35_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_y, __pyx_t_12); - __pyx_t_12 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L29_error) + __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_y, __pyx_t_13); + __pyx_t_13 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_8genexpr4__pyx_v_x); __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_x); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_8genexpr4__pyx_v_x)) __PYX_ERR(0, 619, __pyx_L29_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_8genexpr4__pyx_v_x)) __PYX_ERR(0, 619, __pyx_L31_error); __Pyx_INCREF(__pyx_8genexpr4__pyx_v_y); __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_y); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_8genexpr4__pyx_v_y)) __PYX_ERR(0, 619, __pyx_L29_error); - __pyx_t_12 = __Pyx_PyFrozenSet_New(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 619, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_8genexpr4__pyx_v_y)) __PYX_ERR(0, 619, __pyx_L31_error); + __pyx_t_13 = __Pyx_PyFrozenSet_New(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L31_error) + __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 619, __pyx_L29_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 619, __pyx_L31_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); __pyx_8genexpr4__pyx_v_x = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_y); __pyx_8genexpr4__pyx_v_y = 0; - goto __pyx_L35_exit_scope; - __pyx_L29_error:; + goto __pyx_L37_exit_scope; + __pyx_L31_error:; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); __pyx_8genexpr4__pyx_v_x = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_y); __pyx_8genexpr4__pyx_v_y = 0; goto __pyx_L1_error; - __pyx_L35_exit_scope:; + __pyx_L37_exit_scope:; } /* exit inner scope */ - __pyx_v_pairs = ((PyObject*)__pyx_t_11); - __pyx_t_11 = 0; + __pyx_v_pairs = ((PyObject*)__pyx_t_12); + __pyx_t_12 = 0; /* "MuchTree.pyx":621 * pairs = [ frozenset( ( x, y ) ) for x,y in combinations( ids, 2 ) ] @@ -33607,31 +33616,31 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * sisters = [ pairs[ M.index(i) ] for i in M if M.count(i) == 1 ] */ { /* enter inner scope */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 621, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 621, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __pyx_v_pairs; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 621, __pyx_L38_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 621, __pyx_L40_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 621, __pyx_L38_error) + __pyx_t_13 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_13); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 621, __pyx_L40_error) #else - __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 621, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 621, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_13); #endif - if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) { - PyObject* sequence = __pyx_t_12; + if ((likely(PyTuple_CheckExact(__pyx_t_13))) || (PyList_CheckExact(__pyx_t_13))) { + PyObject* sequence = __pyx_t_13; 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, 621, __pyx_L38_error) + __PYX_ERR(0, 621, __pyx_L40_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -33644,59 +33653,59 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L38_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L38_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_3); #endif - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 621, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_17 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); - index = 0; __pyx_t_1 = __pyx_t_17(__pyx_t_13); if (unlikely(!__pyx_t_1)) goto __pyx_L41_unpacking_failed; + __pyx_t_14 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 621, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); + index = 0; __pyx_t_1 = __pyx_t_18(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L43_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L41_unpacking_failed; + index = 1; __pyx_t_3 = __pyx_t_18(__pyx_t_14); if (unlikely(!__pyx_t_3)) goto __pyx_L43_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_13), 2) < 0) __PYX_ERR(0, 621, __pyx_L38_error) - __pyx_t_17 = NULL; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - goto __pyx_L42_unpacking_done; - __pyx_L41_unpacking_failed:; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_17 = NULL; + if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_14), 2) < 0) __PYX_ERR(0, 621, __pyx_L40_error) + __pyx_t_18 = NULL; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + goto __pyx_L44_unpacking_done; + __pyx_L43_unpacking_failed:; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_18 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 621, __pyx_L38_error) - __pyx_L42_unpacking_done:; + __PYX_ERR(0, 621, __pyx_L40_error) + __pyx_L44_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_x, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_y, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_visited, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 621, __pyx_L38_error) - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_8genexpr5__pyx_v_x); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L38_error) - __pyx_t_19 = __Pyx_PyInt_As_int(__pyx_8genexpr5__pyx_v_y); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L38_error) - __pyx_t_12 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_t_18, __pyx_t_10, __pyx_t_19)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 621, __pyx_L38_error) - __Pyx_GOTREF(__pyx_t_12); - __PYX_XCLEAR_MEMVIEW(&__pyx_t_18, 1); - __pyx_t_18.memview = NULL; __pyx_t_18.data = NULL; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 621, __pyx_L38_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_visited, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 621, __pyx_L40_error) + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_8genexpr5__pyx_v_x); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L40_error) + __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_8genexpr5__pyx_v_y); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L40_error) + __pyx_t_13 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_t_19, __pyx_t_11, __pyx_t_20)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 621, __pyx_L40_error) + __Pyx_GOTREF(__pyx_t_13); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_19, 1); + __pyx_t_19.memview = NULL; __pyx_t_19.data = NULL; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 621, __pyx_L40_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_x); __pyx_8genexpr5__pyx_v_x = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_y); __pyx_8genexpr5__pyx_v_y = 0; - goto __pyx_L44_exit_scope; - __pyx_L38_error:; + goto __pyx_L46_exit_scope; + __pyx_L40_error:; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_x); __pyx_8genexpr5__pyx_v_x = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_y); __pyx_8genexpr5__pyx_v_y = 0; goto __pyx_L1_error; - __pyx_L44_exit_scope:; + __pyx_L46_exit_scope:; } /* exit inner scope */ - __pyx_v_M = ((PyObject*)__pyx_t_11); - __pyx_t_11 = 0; + __pyx_v_M = ((PyObject*)__pyx_t_12); + __pyx_t_12 = 0; /* "MuchTree.pyx":623 * M = [ self._mrca( visited, x, y ) for x,y in pairs ] @@ -33706,50 +33715,50 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * if len( sisters ) == 1 : */ { /* enter inner scope */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 623, __pyx_L47_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 623, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __pyx_v_M; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 623, __pyx_L47_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 623, __pyx_L49_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 623, __pyx_L47_error) + __pyx_t_13 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_13); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 623, __pyx_L49_error) #else - __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 623, __pyx_L47_error) - __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 623, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_13); #endif - __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_i, __pyx_t_12); - __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_count, __pyx_v_M, __pyx_8genexpr6__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 623, __pyx_L47_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_12, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 623, __pyx_L47_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_i, __pyx_t_13); + __pyx_t_13 = 0; + __pyx_t_13 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_count, __pyx_v_M, __pyx_8genexpr6__pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 623, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_13, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 623, __pyx_L49_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_5) { - __pyx_t_12 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_M, __pyx_8genexpr6__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 623, __pyx_L47_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_pairs, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L47_error) + __pyx_t_13 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_M, __pyx_8genexpr6__pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 623, __pyx_L49_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_pairs, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L49_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 623, __pyx_L47_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 623, __pyx_L49_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_i); __pyx_8genexpr6__pyx_v_i = 0; - goto __pyx_L52_exit_scope; - __pyx_L47_error:; + goto __pyx_L54_exit_scope; + __pyx_L49_error:; __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_i); __pyx_8genexpr6__pyx_v_i = 0; goto __pyx_L1_error; - __pyx_L52_exit_scope:; + __pyx_L54_exit_scope:; } /* exit inner scope */ - __pyx_v_sisters = ((PyObject*)__pyx_t_11); - __pyx_t_11 = 0; + __pyx_v_sisters = ((PyObject*)__pyx_t_12); + __pyx_t_12 = 0; /* "MuchTree.pyx":625 * sisters = [ pairs[ M.index(i) ] for i in M if M.count(i) == 1 ] @@ -33769,15 +33778,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * * if any( [ isinstance( i, str ) for i in ( a, b, c, d ) ] ) : */ - __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_sisters, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 626, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_sisters, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 626, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __Pyx_PyFrozenSet_New(__pyx_v_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Xor(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_3 = PyNumber_Xor(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_sisters, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_sisters, __pyx_t_3); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "MuchTree.pyx":625 @@ -33797,54 +33806,54 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * return frozenset( ( frozenset( ( self.leafnodes[w], self.leafnodes[x] ) ), */ { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L57_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L59_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L57_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L59_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_a)) __PYX_ERR(0, 628, __pyx_L57_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_a)) __PYX_ERR(0, 628, __pyx_L59_error); __Pyx_INCREF(__pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_b)) __PYX_ERR(0, 628, __pyx_L57_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_b)) __PYX_ERR(0, 628, __pyx_L59_error); __Pyx_INCREF(__pyx_v_c); __Pyx_GIVEREF(__pyx_v_c); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_c)) __PYX_ERR(0, 628, __pyx_L57_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_c)) __PYX_ERR(0, 628, __pyx_L59_error); __Pyx_INCREF(__pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_d)) __PYX_ERR(0, 628, __pyx_L57_error); - __pyx_t_11 = __pyx_t_2; __Pyx_INCREF(__pyx_t_11); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_d)) __PYX_ERR(0, 628, __pyx_L59_error); + __pyx_t_12 = __pyx_t_2; __Pyx_INCREF(__pyx_t_12); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (__pyx_t_4 >= 4) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 628, __pyx_L57_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 628, __pyx_L59_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L57_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L59_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = PyUnicode_Check(__pyx_8genexpr7__pyx_v_i); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L57_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L59_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 628, __pyx_L57_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 628, __pyx_L59_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_i); __pyx_8genexpr7__pyx_v_i = 0; - goto __pyx_L61_exit_scope; - __pyx_L57_error:; + goto __pyx_L63_exit_scope; + __pyx_L59_error:; __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_i); __pyx_8genexpr7__pyx_v_i = 0; goto __pyx_L1_error; - __pyx_L61_exit_scope:; + __pyx_L63_exit_scope:; } /* exit inner scope */ - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_any, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_any, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 628, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_5) { /* "MuchTree.pyx":629 @@ -33863,19 +33872,19 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __PYX_ERR(0, 629, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(sequence, 0); + __pyx_t_12 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); - __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } - if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { - PyObject* sequence = __pyx_t_11; + 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 != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); @@ -33885,45 +33894,45 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); - __pyx_t_12 = PyList_GET_ITEM(sequence, 1); + __pyx_t_13 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); #endif - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_17 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); - index = 0; __pyx_t_2 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L62_unpacking_failed; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_2 = __pyx_t_18(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L64_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - index = 1; __pyx_t_12 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_12)) goto __pyx_L62_unpacking_failed; - __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) __PYX_ERR(0, 629, __pyx_L1_error) - __pyx_t_17 = NULL; + index = 1; __pyx_t_13 = __pyx_t_18(__pyx_t_1); if (unlikely(!__pyx_t_13)) goto __pyx_L64_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_1), 2) < 0) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_18 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L63_unpacking_done; - __pyx_L62_unpacking_failed:; + goto __pyx_L65_unpacking_done; + __pyx_L64_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_17 = NULL; + __pyx_t_18 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 629, __pyx_L1_error) - __pyx_L63_unpacking_done:; + __pyx_L65_unpacking_done:; } __pyx_v_w = __pyx_t_2; __pyx_t_2 = 0; - __pyx_v_x = __pyx_t_12; - __pyx_t_12 = 0; + __pyx_v_x = __pyx_t_13; + __pyx_t_13 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); @@ -33934,17 +33943,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_12 = PyList_GET_ITEM(sequence, 0); + __pyx_t_13 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif @@ -33954,24 +33963,24 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_17 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); - index = 0; __pyx_t_12 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_12)) goto __pyx_L64_unpacking_failed; - __Pyx_GOTREF(__pyx_t_12); - index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L64_unpacking_failed; + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); + index = 0; __pyx_t_13 = __pyx_t_18(__pyx_t_1); if (unlikely(!__pyx_t_13)) goto __pyx_L66_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + index = 1; __pyx_t_2 = __pyx_t_18(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L66_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) __PYX_ERR(0, 629, __pyx_L1_error) - __pyx_t_17 = NULL; + if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_1), 2) < 0) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_18 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L65_unpacking_done; - __pyx_L64_unpacking_failed:; + goto __pyx_L67_unpacking_done; + __pyx_L66_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_17 = NULL; + __pyx_t_18 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 629, __pyx_L1_error) - __pyx_L65_unpacking_done:; + __pyx_L67_unpacking_done:; } - __pyx_v_y = __pyx_t_12; - __pyx_t_12 = 0; + __pyx_v_y = __pyx_t_13; + __pyx_t_13 = 0; __pyx_v_z = __pyx_t_2; __pyx_t_2 = 0; @@ -33985,18 +33994,18 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->leafnodes, __pyx_v_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_self->leafnodes, __pyx_v_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_self->leafnodes, __pyx_v_x); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_11)) __PYX_ERR(0, 630, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12)) __PYX_ERR(0, 630, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyFrozenSet_New(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyFrozenSet_New(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "MuchTree.pyx":631 @@ -34010,17 +34019,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->leafnodes, __pyx_v_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyFrozenSet_New(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFrozenSet_New(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "MuchTree.pyx":630 * if any( [ isinstance( i, str ) for i in ( a, b, c, d ) ] ) : @@ -34029,17 +34038,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * frozenset( ( self.leafnodes[y], self.leafnodes[z] ) ) ) ) * else : */ - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 630, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11)) __PYX_ERR(0, 630, __pyx_L1_error); + __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_GIVEREF(__pyx_t_12); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 630, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error); - __pyx_t_11 = 0; + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error); + __pyx_t_12 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyFrozenSet_New(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFrozenSet_New(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; @@ -34082,11 +34091,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); - __PYX_XCLEAR_MEMVIEW(&__pyx_t_18, 1); + __Pyx_XDECREF(__pyx_t_15); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_19, 1); __Pyx_AddTraceback("MuchTree.SuchTree.get_quartet_topology", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -34117,8 +34126,8 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_38get_quartet_topology(struct __py * return frozenset( sisters ) * * def quartet_topologies( self, long[:,:] quartets ) : # <<<<<<<<<<<<<< - * - * topologies = np.zeros( ( len(quartets), 4 ), dtype=int ) + * ''' + * Bulk processing function for computing quartet topologies. */ /* Python wrapper */ @@ -34129,7 +34138,8 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_8MuchTree_8SuchTree_41quartet_topologies = {"quartet_topologies", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_41quartet_topologies, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +PyDoc_STRVAR(__pyx_doc_8MuchTree_8SuchTree_40quartet_topologies, "\n Bulk processing function for computing quartet topologies.\n Takes an [N,4] matrix of taxon IDs, where the IDs are in\n arbitrary order\n \n [ [ a, b, c, d ], [ e, f, g, h ], ... ]\n \n and returns an [N,4] matrix of taxon IDs ordered such that\n \n [ { { a, b }, { c, d } }, { { e, f }, { g, h } }, ... ]\n \n Ordered taxa can be represented as a topology like so :\n \n topology = frozenset( ( frozenset( ( T[i,0], T[i,1] ),\n frozenset( ( T[i,2], T[i,3] ) ) ) ) )\n "); +static PyMethodDef __pyx_mdef_8MuchTree_8SuchTree_41quartet_topologies = {"quartet_topologies", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_41quartet_topologies, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_40quartet_topologies}; static PyObject *__pyx_pw_8MuchTree_8SuchTree_41quartet_topologies(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds @@ -34248,38 +34258,38 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("quartet_topologies", 1); - /* "MuchTree.pyx":637 - * def quartet_topologies( self, long[:,:] quartets ) : + /* "MuchTree.pyx":653 + * ''' * * topologies = np.zeros( ( len(quartets), 4 ), dtype=int ) # <<<<<<<<<<<<<< * * visited = np.zeros( self.depth, dtype=int ) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_MemoryView_Len(__pyx_v_quartets); - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_4)) __PYX_ERR(0, 637, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_4)) __PYX_ERR(0, 653, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 637, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 637, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 653, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34287,29 +34297,29 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ __pyx_v_topologies = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":639 + /* "MuchTree.pyx":655 * topologies = np.zeros( ( len(quartets), 4 ), dtype=int ) * * visited = np.zeros( self.depth, dtype=int ) # <<<<<<<<<<<<<< * - * M = np.zeros( 6, dtype=int ) + * M = np.zeros( 6, dtype=int ) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->depth); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->depth); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 639, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 655, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34317,176 +34327,176 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ __pyx_v_visited = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":641 + /* "MuchTree.pyx":657 * visited = np.zeros( self.depth, dtype=int ) * - * M = np.zeros( 6, dtype=int ) # <<<<<<<<<<<<<< - * C = np.zeros( 6, dtype=int ) + * M = np.zeros( 6, dtype=int ) # <<<<<<<<<<<<<< + * C = np.zeros( 6, dtype=int ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 641, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__18, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__18, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_M = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":642 + /* "MuchTree.pyx":658 * - * M = np.zeros( 6, dtype=int ) - * C = np.zeros( 6, dtype=int ) # <<<<<<<<<<<<<< + * M = np.zeros( 6, dtype=int ) + * C = np.zeros( 6, dtype=int ) # <<<<<<<<<<<<<< * * # possible topologies */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 642, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_C = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":645 + /* "MuchTree.pyx":661 * * # possible topologies * I = np.array( [ [ 0, 1, 2, 3 ], [ 0, 2, 1, 3 ], [ 0, 3, 1, 2 ], # <<<<<<<<<<<<<< * [ 1, 2, 0, 3 ], [ 1, 3, 0, 2 ], [ 2, 3, 0, 1 ] ] ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __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, 645, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_3)) __PYX_ERR(0, 645, __pyx_L1_error); - __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_3)) __PYX_ERR(0, 661, __pyx_L1_error); + __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_1)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_1)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_3)) __PYX_ERR(0, 645, __pyx_L1_error); - __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 645, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_3)) __PYX_ERR(0, 661, __pyx_L1_error); + __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_1)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_1)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_2)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_2)) __PYX_ERR(0, 661, __pyx_L1_error); - /* "MuchTree.pyx":646 + /* "MuchTree.pyx":662 * # possible topologies * I = np.array( [ [ 0, 1, 2, 3 ], [ 0, 2, 1, 3 ], [ 0, 3, 1, 2 ], * [ 1, 2, 0, 3 ], [ 1, 3, 0, 2 ], [ 2, 3, 0, 1 ] ] ) # <<<<<<<<<<<<<< * * */ - __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_1)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_1)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_2)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_2)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_0)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_0)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 3, __pyx_int_3)) __PYX_ERR(0, 646, __pyx_L1_error); - __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 646, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 3, __pyx_int_3)) __PYX_ERR(0, 662, __pyx_L1_error); + __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_0)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_0)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_int_2)) __PYX_ERR(0, 646, __pyx_L1_error); - __pyx_t_9 = PyList_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 646, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_int_2)) __PYX_ERR(0, 662, __pyx_L1_error); + __pyx_t_9 = PyList_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_int_2)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_int_2)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_int_3)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_int_3)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 2, __pyx_int_0)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 2, __pyx_int_0)) __PYX_ERR(0, 662, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 3, __pyx_int_1)) __PYX_ERR(0, 646, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 3, __pyx_int_1)) __PYX_ERR(0, 662, __pyx_L1_error); - /* "MuchTree.pyx":645 + /* "MuchTree.pyx":661 * * # possible topologies * I = np.array( [ [ 0, 1, 2, 3 ], [ 0, 2, 1, 3 ], [ 0, 3, 1, 2 ], # <<<<<<<<<<<<<< * [ 1, 2, 0, 3 ], [ 1, 3, 0, 2 ], [ 2, 3, 0, 1 ] ] ) * */ - __pyx_t_10 = PyList_New(6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_10 = PyList_New(6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_6)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_6)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_7)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 4, __pyx_t_8)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 4, __pyx_t_8)) __PYX_ERR(0, 661, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 5, __pyx_t_9)) __PYX_ERR(0, 645, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 5, __pyx_t_9)) __PYX_ERR(0, 661, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_6 = 0; @@ -34512,27 +34522,26 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_I = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":649 + /* "MuchTree.pyx":665 * * * self._quartet_topologies( quartets, topologies, visited, M, C, I ) # <<<<<<<<<<<<<< * * return topologies */ - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_topologies, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 649, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_visited, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 649, __pyx_L1_error) - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_M, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 649, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_C, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 649, __pyx_L1_error) - __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_I, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 649, __pyx_L1_error) - __pyx_t_5 = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_quartet_topologies(__pyx_v_self, __pyx_v_quartets, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_topologies, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_visited, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_M, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_C, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_I, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 665, __pyx_L1_error) + ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_quartet_topologies(__pyx_v_self, __pyx_v_quartets, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16); __PYX_XCLEAR_MEMVIEW(&__pyx_t_12, 1); __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_13, 1); @@ -34543,14 +34552,13 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_16, 1); __pyx_t_16.memview = NULL; __pyx_t_16.data = NULL; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":651 + /* "MuchTree.pyx":667 * self._quartet_topologies( quartets, topologies, visited, M, C, I ) * * return topologies # <<<<<<<<<<<<<< * - * cdef _quartet_topologies( self, long[:,:] quartets, + * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_topologies); @@ -34561,8 +34569,8 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ * return frozenset( sisters ) * * def quartet_topologies( self, long[:,:] quartets ) : # <<<<<<<<<<<<<< - * - * topologies = np.zeros( ( len(quartets), 4 ), dtype=int ) + * ''' + * Bulk processing function for computing quartet topologies. */ /* function exit code */ @@ -34594,15 +34602,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_40quartet_topologies(struct __pyx_ return __pyx_r; } -/* "MuchTree.pyx":653 - * return topologies +/* "MuchTree.pyx":670 * - * cdef _quartet_topologies( self, long[:,:] quartets, # <<<<<<<<<<<<<< - * long[:,:] topologies, - * long[:] visited, + * @cython.boundscheck(False) + * cdef void _quartet_topologies( self, long[:,:] quartets, # <<<<<<<<<<<<<< + * long[:,:] topologies, + * long[:] visited, */ -static PyObject *__pyx_f_8MuchTree_8SuchTree__quartet_topologies(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, __Pyx_memviewslice __pyx_v_quartets, __Pyx_memviewslice __pyx_v_topologies, __Pyx_memviewslice __pyx_v_visited, __Pyx_memviewslice __pyx_v_M, __Pyx_memviewslice __pyx_v_C, __Pyx_memviewslice __pyx_v_I) { +static void __pyx_f_8MuchTree_8SuchTree__quartet_topologies(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self, __Pyx_memviewslice __pyx_v_quartets, __Pyx_memviewslice __pyx_v_topologies, __Pyx_memviewslice __pyx_v_visited, __Pyx_memviewslice __pyx_v_M, __Pyx_memviewslice __pyx_v_C, __Pyx_memviewslice __pyx_v_I) { int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; @@ -34610,477 +34618,219 @@ static PyObject *__pyx_f_8MuchTree_8SuchTree__quartet_topologies(struct __pyx_ob int __pyx_v_b; int __pyx_v_c; int __pyx_v_d; - PyObject *__pyx_v_x = NULL; - PyObject *__pyx_v_y = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; - __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } }; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *(*__pyx_t_11)(PyObject *); - int __pyx_t_12; - int __pyx_t_13; - int __pyx_t_14; - int __pyx_t_15; - PyObject *__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; - Py_ssize_t __pyx_t_22; - Py_ssize_t __pyx_t_23; - Py_ssize_t __pyx_t_24; - Py_ssize_t __pyx_t_25; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_quartet_topologies", 1); + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + Py_ssize_t __pyx_t_11; + Py_ssize_t __pyx_t_12; - /* "MuchTree.pyx":672 - * cdef int d + /* "MuchTree.pyx":688 + * cdef int y * * for i in range( len( quartets ) ) : # <<<<<<<<<<<<<< - * a,b,c,d = quartets[i,] - * + * a = quartets[i,0] + * b = quartets[i,1] */ __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_quartets); __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "MuchTree.pyx":673 + /* "MuchTree.pyx":689 * * for i in range( len( quartets ) ) : - * a,b,c,d = quartets[i,] # <<<<<<<<<<<<<< - * - * # find MRCAs + * a = quartets[i,0] # <<<<<<<<<<<<<< + * b = quartets[i,1] + * c = quartets[i,2] */ - __pyx_t_4.data = __pyx_v_quartets.data; - __pyx_t_4.memview = __pyx_v_quartets.memview; - __PYX_INC_MEMVIEW(&__pyx_t_4, 1); - { - Py_ssize_t __pyx_tmp_idx = __pyx_v_i; - Py_ssize_t __pyx_tmp_shape = __pyx_v_quartets.shape[0]; - Py_ssize_t __pyx_tmp_stride = __pyx_v_quartets.strides[0]; - if (__pyx_tmp_idx < 0) - __pyx_tmp_idx += __pyx_tmp_shape; - if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) { - PyErr_SetString(PyExc_IndexError, - "Index out of bounds (axis 0)"); - __PYX_ERR(0, 673, __pyx_L1_error) - } - __pyx_t_4.data += __pyx_tmp_idx * __pyx_tmp_stride; -} - -__pyx_t_4.shape[0] = __pyx_v_quartets.shape[1]; -__pyx_t_4.strides[0] = __pyx_v_quartets.strides[1]; - __pyx_t_4.suboffsets[0] = -1; - -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_4, 1, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1); - __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; - if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { - PyObject* sequence = __pyx_t_5; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 4)) { - if (size > 4) __Pyx_RaiseTooManyValuesError(4); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 673, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); - __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); - } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); - __pyx_t_8 = PyList_GET_ITEM(sequence, 2); - __pyx_t_9 = PyList_GET_ITEM(sequence, 3); - } - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_9); - #else - { - Py_ssize_t i; - PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; - for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(item); - *(temps[i]) = item; - } - } - #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - Py_ssize_t index = -1; - PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; - __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); - for (index=0; index < 4; index++) { - PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(item); - *(temps[index]) = item; - } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 4) < 0) __PYX_ERR(0, 673, __pyx_L1_error) - __pyx_t_11 = NULL; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - goto __pyx_L6_unpacking_done; - __pyx_L5_unpacking_failed:; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_11 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 673, __pyx_L1_error) - __pyx_L6_unpacking_done:; - } - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_a = __pyx_t_12; - __pyx_v_b = __pyx_t_13; - __pyx_v_c = __pyx_t_14; - __pyx_v_d = __pyx_t_15; + __pyx_t_4 = __pyx_v_i; + __pyx_t_5 = 0; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_quartets.shape[0]; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_quartets.shape[1]; + __pyx_v_a = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_quartets.data + __pyx_t_4 * __pyx_v_quartets.strides[0]) ) + __pyx_t_5 * __pyx_v_quartets.strides[1]) ))); - /* "MuchTree.pyx":676 - * - * # find MRCAs - * for j,(x,y) in enumerate( ( ( a, b ), ( a, c ), ( a, d ), # <<<<<<<<<<<<<< - * ( b, c ), ( b, d ), ( c, d ) ) ) : - * M[j] = self._mrca( visited, x, y ) + /* "MuchTree.pyx":690 + * for i in range( len( quartets ) ) : + * a = quartets[i,0] + * b = quartets[i,1] # <<<<<<<<<<<<<< + * c = quartets[i,2] + * d = quartets[i,3] */ - __pyx_t_15 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_b); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error); - __pyx_t_5 = 0; - __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_a); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error); - __pyx_t_9 = 0; - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error); - __pyx_t_5 = 0; - __pyx_t_9 = 0; + __pyx_t_5 = __pyx_v_i; + __pyx_t_4 = 1; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_quartets.shape[0]; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_quartets.shape[1]; + __pyx_v_b = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_quartets.data + __pyx_t_5 * __pyx_v_quartets.strides[0]) ) + __pyx_t_4 * __pyx_v_quartets.strides[1]) ))); - /* "MuchTree.pyx":677 - * # find MRCAs - * for j,(x,y) in enumerate( ( ( a, b ), ( a, c ), ( a, d ), - * ( b, c ), ( b, d ), ( c, d ) ) ) : # <<<<<<<<<<<<<< - * M[j] = self._mrca( visited, x, y ) + /* "MuchTree.pyx":691 + * a = quartets[i,0] + * b = quartets[i,1] + * c = quartets[i,2] # <<<<<<<<<<<<<< + * d = quartets[i,3] * */ - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_b); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)) __PYX_ERR(0, 677, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error); - __pyx_t_9 = 0; - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_16); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_9)) __PYX_ERR(0, 677, __pyx_L1_error); - __pyx_t_5 = 0; - __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_9)) __PYX_ERR(0, 677, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error); - __pyx_t_9 = 0; - __pyx_t_5 = 0; + __pyx_t_4 = __pyx_v_i; + __pyx_t_5 = 2; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_quartets.shape[0]; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_quartets.shape[1]; + __pyx_v_c = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_quartets.data + __pyx_t_4 * __pyx_v_quartets.strides[0]) ) + __pyx_t_5 * __pyx_v_quartets.strides[1]) ))); - /* "MuchTree.pyx":676 + /* "MuchTree.pyx":692 + * b = quartets[i,1] + * c = quartets[i,2] + * d = quartets[i,3] # <<<<<<<<<<<<<< * * # find MRCAs - * for j,(x,y) in enumerate( ( ( a, b ), ( a, c ), ( a, d ), # <<<<<<<<<<<<<< - * ( b, c ), ( b, d ), ( c, d ) ) ) : - * M[j] = self._mrca( visited, x, y ) */ - __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_10)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_16); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_16)) __PYX_ERR(0, 676, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_17); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_17)) __PYX_ERR(0, 676, __pyx_L1_error); - __pyx_t_8 = 0; - __pyx_t_7 = 0; - __pyx_t_6 = 0; - __pyx_t_10 = 0; - __pyx_t_16 = 0; - __pyx_t_17 = 0; - __pyx_t_17 = __pyx_t_5; __Pyx_INCREF(__pyx_t_17); - __pyx_t_18 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - for (;;) { - if (__pyx_t_18 >= 6) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_18); __Pyx_INCREF(__pyx_t_5); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 676, __pyx_L1_error) - #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { - PyObject* sequence = __pyx_t_5; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 676, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_16 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_16 = PyList_GET_ITEM(sequence, 0); - __pyx_t_10 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_16); - __Pyx_INCREF(__pyx_t_10); - #else - __pyx_t_16 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_16); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); - index = 0; __pyx_t_16 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_16)) goto __pyx_L9_unpacking_failed; - __Pyx_GOTREF(__pyx_t_16); - index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_10)) goto __pyx_L9_unpacking_failed; - __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 676, __pyx_L1_error) - __pyx_t_11 = NULL; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - goto __pyx_L10_unpacking_done; - __pyx_L9_unpacking_failed:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 676, __pyx_L1_error) - __pyx_L10_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_16); - __pyx_t_16 = 0; - __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_10); - __pyx_t_10 = 0; - __pyx_v_j = __pyx_t_15; - __pyx_t_15 = (__pyx_t_15 + 1); + __pyx_t_5 = __pyx_v_i; + __pyx_t_4 = 3; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_quartets.shape[0]; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_quartets.shape[1]; + __pyx_v_d = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_quartets.data + __pyx_t_5 * __pyx_v_quartets.strides[0]) ) + __pyx_t_4 * __pyx_v_quartets.strides[1]) ))); - /* "MuchTree.pyx":678 - * for j,(x,y) in enumerate( ( ( a, b ), ( a, c ), ( a, d ), - * ( b, c ), ( b, d ), ( c, d ) ) ) : - * M[j] = self._mrca( visited, x, y ) # <<<<<<<<<<<<<< + /* "MuchTree.pyx":695 * - * # find unique MCRA(s) + * # find MRCAs + * M[0] = self._mrca( visited, a, b ) # <<<<<<<<<<<<<< + * M[1] = self._mrca( visited, a, c ) + * M[2] = self._mrca( visited, a, d ) */ - __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_y); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error) - __pyx_t_19 = __pyx_v_j; - __pyx_t_12 = -1; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_M.shape[0]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_12 = 0; - } else if (unlikely(__pyx_t_19 >= __pyx_v_M.shape[0])) __pyx_t_12 = 0; - if (unlikely(__pyx_t_12 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_12); - __PYX_ERR(0, 678, __pyx_L1_error) - } - *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_19 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_t_14, __pyx_t_13); + __pyx_t_4 = 0; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_a, __pyx_v_b); - /* "MuchTree.pyx":676 - * + /* "MuchTree.pyx":696 * # find MRCAs - * for j,(x,y) in enumerate( ( ( a, b ), ( a, c ), ( a, d ), # <<<<<<<<<<<<<< - * ( b, c ), ( b, d ), ( c, d ) ) ) : - * M[j] = self._mrca( visited, x, y ) + * M[0] = self._mrca( visited, a, b ) + * M[1] = self._mrca( visited, a, c ) # <<<<<<<<<<<<<< + * M[2] = self._mrca( visited, a, d ) + * M[3] = self._mrca( visited, b, c ) + */ + __pyx_t_4 = 1; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_a, __pyx_v_c); + + /* "MuchTree.pyx":697 + * M[0] = self._mrca( visited, a, b ) + * M[1] = self._mrca( visited, a, c ) + * M[2] = self._mrca( visited, a, d ) # <<<<<<<<<<<<<< + * M[3] = self._mrca( visited, b, c ) + * M[4] = self._mrca( visited, b, d ) + */ + __pyx_t_4 = 2; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_a, __pyx_v_d); + + /* "MuchTree.pyx":698 + * M[1] = self._mrca( visited, a, c ) + * M[2] = self._mrca( visited, a, d ) + * M[3] = self._mrca( visited, b, c ) # <<<<<<<<<<<<<< + * M[4] = self._mrca( visited, b, d ) + * M[5] = self._mrca( visited, c, d ) + */ + __pyx_t_4 = 3; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_b, __pyx_v_c); + + /* "MuchTree.pyx":699 + * M[2] = self._mrca( visited, a, d ) + * M[3] = self._mrca( visited, b, c ) + * M[4] = self._mrca( visited, b, d ) # <<<<<<<<<<<<<< + * M[5] = self._mrca( visited, c, d ) + * + */ + __pyx_t_4 = 4; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_b, __pyx_v_d); + + /* "MuchTree.pyx":700 + * M[3] = self._mrca( visited, b, c ) + * M[4] = self._mrca( visited, b, d ) + * M[5] = self._mrca( visited, c, d ) # <<<<<<<<<<<<<< + * + * # find unique MCRA(s) */ - } - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_4 = 5; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) )) = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_c, __pyx_v_d); - /* "MuchTree.pyx":681 + /* "MuchTree.pyx":703 * * # find unique MCRA(s) * for j in range( 6 ) : # <<<<<<<<<<<<<< * C[j] = 0 * for j in range( 6 ) : */ - for (__pyx_t_15 = 0; __pyx_t_15 < 6; __pyx_t_15+=1) { - __pyx_v_j = __pyx_t_15; + for (__pyx_t_6 = 0; __pyx_t_6 < 6; __pyx_t_6+=1) { + __pyx_v_j = __pyx_t_6; - /* "MuchTree.pyx":682 + /* "MuchTree.pyx":704 * # find unique MCRA(s) * for j in range( 6 ) : * C[j] = 0 # <<<<<<<<<<<<<< * for j in range( 6 ) : * for k in range( 6 ) : */ - __pyx_t_19 = __pyx_v_j; - __pyx_t_13 = -1; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_C.shape[0]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_19 >= __pyx_v_C.shape[0])) __pyx_t_13 = 0; - if (unlikely(__pyx_t_13 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 682, __pyx_L1_error) - } - *((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_19 * __pyx_v_C.strides[0]) )) = 0; + __pyx_t_4 = __pyx_v_j; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_C.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_4 * __pyx_v_C.strides[0]) )) = 0; } - /* "MuchTree.pyx":683 + /* "MuchTree.pyx":705 * for j in range( 6 ) : * C[j] = 0 * for j in range( 6 ) : # <<<<<<<<<<<<<< * for k in range( 6 ) : * if M[j] == M[k] : */ - for (__pyx_t_15 = 0; __pyx_t_15 < 6; __pyx_t_15+=1) { - __pyx_v_j = __pyx_t_15; + for (__pyx_t_6 = 0; __pyx_t_6 < 6; __pyx_t_6+=1) { + __pyx_v_j = __pyx_t_6; - /* "MuchTree.pyx":684 + /* "MuchTree.pyx":706 * C[j] = 0 * for j in range( 6 ) : * for k in range( 6 ) : # <<<<<<<<<<<<<< * if M[j] == M[k] : * C[j] = C[j] + 1 */ - for (__pyx_t_13 = 0; __pyx_t_13 < 6; __pyx_t_13+=1) { - __pyx_v_k = __pyx_t_13; + for (__pyx_t_7 = 0; __pyx_t_7 < 6; __pyx_t_7+=1) { + __pyx_v_k = __pyx_t_7; - /* "MuchTree.pyx":685 + /* "MuchTree.pyx":707 * for j in range( 6 ) : * for k in range( 6 ) : * if M[j] == M[k] : # <<<<<<<<<<<<<< * C[j] = C[j] + 1 * for j in range( 6 ) : */ - __pyx_t_19 = __pyx_v_j; - __pyx_t_14 = -1; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_M.shape[0]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_19 >= __pyx_v_M.shape[0])) __pyx_t_14 = 0; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 685, __pyx_L1_error) - } - __pyx_t_20 = __pyx_v_k; - __pyx_t_14 = -1; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_v_M.shape[0]; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_20 >= __pyx_v_M.shape[0])) __pyx_t_14 = 0; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 685, __pyx_L1_error) - } - __pyx_t_21 = ((*((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_19 * __pyx_v_M.strides[0]) ))) == (*((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_20 * __pyx_v_M.strides[0]) )))); - if (__pyx_t_21) { - - /* "MuchTree.pyx":686 + __pyx_t_4 = __pyx_v_j; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_M.shape[0]; + __pyx_t_5 = __pyx_v_k; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_M.shape[0]; + __pyx_t_8 = ((*((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_4 * __pyx_v_M.strides[0]) ))) == (*((long *) ( /* dim=0 */ (__pyx_v_M.data + __pyx_t_5 * __pyx_v_M.strides[0]) )))); + if (__pyx_t_8) { + + /* "MuchTree.pyx":708 * for k in range( 6 ) : * if M[j] == M[k] : * C[j] = C[j] + 1 # <<<<<<<<<<<<<< * for j in range( 6 ) : * if C[j] == 1 : break */ - __pyx_t_20 = __pyx_v_j; - __pyx_t_14 = -1; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_v_C.shape[0]; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_20 >= __pyx_v_C.shape[0])) __pyx_t_14 = 0; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 686, __pyx_L1_error) - } - __pyx_t_19 = __pyx_v_j; - __pyx_t_14 = -1; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_C.shape[0]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_19 >= __pyx_v_C.shape[0])) __pyx_t_14 = 0; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 686, __pyx_L1_error) - } - *((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_19 * __pyx_v_C.strides[0]) )) = ((*((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_20 * __pyx_v_C.strides[0]) ))) + 1); + __pyx_t_5 = __pyx_v_j; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_C.shape[0]; + __pyx_t_4 = __pyx_v_j; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_C.shape[0]; + *((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_4 * __pyx_v_C.strides[0]) )) = ((*((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_5 * __pyx_v_C.strides[0]) ))) + 1); - /* "MuchTree.pyx":685 + /* "MuchTree.pyx":707 * for j in range( 6 ) : * for k in range( 6 ) : * if M[j] == M[k] : # <<<<<<<<<<<<<< @@ -35091,138 +34841,77 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_4, 1, (PyObject *(*)(char *)) __p } } - /* "MuchTree.pyx":687 + /* "MuchTree.pyx":709 * if M[j] == M[k] : * C[j] = C[j] + 1 * for j in range( 6 ) : # <<<<<<<<<<<<<< * if C[j] == 1 : break * */ - for (__pyx_t_15 = 0; __pyx_t_15 < 6; __pyx_t_15+=1) { - __pyx_v_j = __pyx_t_15; + for (__pyx_t_6 = 0; __pyx_t_6 < 6; __pyx_t_6+=1) { + __pyx_v_j = __pyx_t_6; - /* "MuchTree.pyx":688 + /* "MuchTree.pyx":710 * C[j] = C[j] + 1 * for j in range( 6 ) : * if C[j] == 1 : break # <<<<<<<<<<<<<< * * # reorder quartet ids by topology */ - __pyx_t_20 = __pyx_v_j; - __pyx_t_13 = -1; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_v_C.shape[0]; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_20 >= __pyx_v_C.shape[0])) __pyx_t_13 = 0; - if (unlikely(__pyx_t_13 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 688, __pyx_L1_error) - } - __pyx_t_21 = ((*((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_20 * __pyx_v_C.strides[0]) ))) == 1); - if (__pyx_t_21) { - goto __pyx_L20_break; + __pyx_t_5 = __pyx_v_j; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_C.shape[0]; + __pyx_t_8 = ((*((long *) ( /* dim=0 */ (__pyx_v_C.data + __pyx_t_5 * __pyx_v_C.strides[0]) ))) == 1); + if (__pyx_t_8) { + goto __pyx_L13_break; } } - __pyx_L20_break:; + __pyx_L13_break:; - /* "MuchTree.pyx":691 + /* "MuchTree.pyx":713 * * # reorder quartet ids by topology * for k in range( 4 ) : # <<<<<<<<<<<<<< * topologies[i,k] = quartets[ i, I[j,k] ] * */ - for (__pyx_t_15 = 0; __pyx_t_15 < 4; __pyx_t_15+=1) { - __pyx_v_k = __pyx_t_15; + for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) { + __pyx_v_k = __pyx_t_6; - /* "MuchTree.pyx":692 + /* "MuchTree.pyx":714 * # reorder quartet ids by topology * for k in range( 4 ) : * topologies[i,k] = quartets[ i, I[j,k] ] # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ - __pyx_t_20 = __pyx_v_j; - __pyx_t_19 = __pyx_v_k; - __pyx_t_13 = -1; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_v_I.shape[0]; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_20 >= __pyx_v_I.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_I.shape[1]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_19 >= __pyx_v_I.shape[1])) __pyx_t_13 = 1; - if (unlikely(__pyx_t_13 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 692, __pyx_L1_error) - } - __pyx_t_22 = __pyx_v_i; - __pyx_t_23 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_I.data + __pyx_t_20 * __pyx_v_I.strides[0]) ) + __pyx_t_19 * __pyx_v_I.strides[1]) ))); - __pyx_t_13 = -1; - if (__pyx_t_22 < 0) { - __pyx_t_22 += __pyx_v_quartets.shape[0]; - if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_22 >= __pyx_v_quartets.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_23 < 0) { - __pyx_t_23 += __pyx_v_quartets.shape[1]; - if (unlikely(__pyx_t_23 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_23 >= __pyx_v_quartets.shape[1])) __pyx_t_13 = 1; - if (unlikely(__pyx_t_13 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 692, __pyx_L1_error) - } - __pyx_t_24 = __pyx_v_i; - __pyx_t_25 = __pyx_v_k; - __pyx_t_13 = -1; - if (__pyx_t_24 < 0) { - __pyx_t_24 += __pyx_v_topologies.shape[0]; - if (unlikely(__pyx_t_24 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_24 >= __pyx_v_topologies.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_25 < 0) { - __pyx_t_25 += __pyx_v_topologies.shape[1]; - if (unlikely(__pyx_t_25 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_25 >= __pyx_v_topologies.shape[1])) __pyx_t_13 = 1; - if (unlikely(__pyx_t_13 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 692, __pyx_L1_error) - } - *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_topologies.data + __pyx_t_24 * __pyx_v_topologies.strides[0]) ) + __pyx_t_25 * __pyx_v_topologies.strides[1]) )) = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_quartets.data + __pyx_t_22 * __pyx_v_quartets.strides[0]) ) + __pyx_t_23 * __pyx_v_quartets.strides[1]) ))); + __pyx_t_5 = __pyx_v_j; + __pyx_t_4 = __pyx_v_k; + if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_I.shape[0]; + if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_v_I.shape[1]; + __pyx_t_9 = __pyx_v_i; + __pyx_t_10 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_I.data + __pyx_t_5 * __pyx_v_I.strides[0]) ) + __pyx_t_4 * __pyx_v_I.strides[1]) ))); + if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_v_quartets.shape[0]; + if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_v_quartets.shape[1]; + __pyx_t_11 = __pyx_v_i; + __pyx_t_12 = __pyx_v_k; + if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_v_topologies.shape[0]; + if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_v_topologies.shape[1]; + *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_topologies.data + __pyx_t_11 * __pyx_v_topologies.strides[0]) ) + __pyx_t_12 * __pyx_v_topologies.strides[1]) )) = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_quartets.data + __pyx_t_9 * __pyx_v_quartets.strides[0]) ) + __pyx_t_10 * __pyx_v_quartets.strides[1]) ))); } } - /* "MuchTree.pyx":653 - * return topologies + /* "MuchTree.pyx":670 * - * cdef _quartet_topologies( self, long[:,:] quartets, # <<<<<<<<<<<<<< - * long[:,:] topologies, - * long[:] visited, + * @cython.boundscheck(False) + * cdef void _quartet_topologies( self, long[:,:] quartets, # <<<<<<<<<<<<<< + * long[:,:] topologies, + * long[:] visited, */ /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_16); - __Pyx_XDECREF(__pyx_t_17); - __Pyx_AddTraceback("MuchTree.SuchTree._quartet_topologies", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_x); - __Pyx_XDECREF(__pyx_v_y); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; } -/* "MuchTree.pyx":695 +/* "MuchTree.pyx":717 * * @cython.boundscheck(False) * cdef int _mrca( self, long[:] visited, int a, int b ) noexcept nogil : # <<<<<<<<<<<<<< @@ -35240,7 +34929,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree int __pyx_t_2; int __pyx_t_3; - /* "MuchTree.pyx":698 + /* "MuchTree.pyx":720 * cdef int n * cdef int i * cdef int mrca = -1 # <<<<<<<<<<<<<< @@ -35249,7 +34938,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_mrca = -1; - /* "MuchTree.pyx":701 + /* "MuchTree.pyx":723 * cdef int a_depth * * n = a # <<<<<<<<<<<<<< @@ -35258,7 +34947,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_n = __pyx_v_a; - /* "MuchTree.pyx":702 + /* "MuchTree.pyx":724 * * n = a * i = 0 # <<<<<<<<<<<<<< @@ -35267,7 +34956,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_i = 0; - /* "MuchTree.pyx":703 + /* "MuchTree.pyx":725 * n = a * i = 0 * while True : # <<<<<<<<<<<<<< @@ -35276,7 +34965,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ while (1) { - /* "MuchTree.pyx":704 + /* "MuchTree.pyx":726 * i = 0 * while True : * visited[i] = n # <<<<<<<<<<<<<< @@ -35287,7 +34976,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree if (__pyx_t_1 < 0) __pyx_t_1 += __pyx_v_visited.shape[0]; *((long *) ( /* dim=0 */ (__pyx_v_visited.data + __pyx_t_1 * __pyx_v_visited.strides[0]) )) = __pyx_v_n; - /* "MuchTree.pyx":705 + /* "MuchTree.pyx":727 * while True : * visited[i] = n * n = self.data[n].parent # <<<<<<<<<<<<<< @@ -35297,7 +34986,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree __pyx_t_2 = (__pyx_v_self->data[__pyx_v_n]).parent; __pyx_v_n = __pyx_t_2; - /* "MuchTree.pyx":706 + /* "MuchTree.pyx":728 * visited[i] = n * n = self.data[n].parent * i += 1 # <<<<<<<<<<<<<< @@ -35306,7 +34995,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_i = (__pyx_v_i + 1); - /* "MuchTree.pyx":707 + /* "MuchTree.pyx":729 * n = self.data[n].parent * i += 1 * if n == -1 : break # <<<<<<<<<<<<<< @@ -35320,7 +35009,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree } __pyx_L4_break:; - /* "MuchTree.pyx":708 + /* "MuchTree.pyx":730 * i += 1 * if n == -1 : break * a_depth = i # <<<<<<<<<<<<<< @@ -35329,7 +35018,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_a_depth = __pyx_v_i; - /* "MuchTree.pyx":710 + /* "MuchTree.pyx":732 * a_depth = i * * n = b # <<<<<<<<<<<<<< @@ -35338,7 +35027,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_n = __pyx_v_b; - /* "MuchTree.pyx":711 + /* "MuchTree.pyx":733 * * n = b * while True : # <<<<<<<<<<<<<< @@ -35347,7 +35036,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ while (1) { - /* "MuchTree.pyx":712 + /* "MuchTree.pyx":734 * n = b * while True : * i = 0 # <<<<<<<<<<<<<< @@ -35356,7 +35045,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_i = 0; - /* "MuchTree.pyx":713 + /* "MuchTree.pyx":735 * while True : * i = 0 * while True : # <<<<<<<<<<<<<< @@ -35365,7 +35054,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ while (1) { - /* "MuchTree.pyx":714 + /* "MuchTree.pyx":736 * i = 0 * while True : * if i >= a_depth : break # <<<<<<<<<<<<<< @@ -35377,7 +35066,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree goto __pyx_L9_break; } - /* "MuchTree.pyx":715 + /* "MuchTree.pyx":737 * while True : * if i >= a_depth : break * if visited[i] == n : # <<<<<<<<<<<<<< @@ -35389,7 +35078,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree __pyx_t_3 = ((*((long *) ( /* dim=0 */ (__pyx_v_visited.data + __pyx_t_1 * __pyx_v_visited.strides[0]) ))) == __pyx_v_n); if (__pyx_t_3) { - /* "MuchTree.pyx":716 + /* "MuchTree.pyx":738 * if i >= a_depth : break * if visited[i] == n : * mrca = visited[i] # <<<<<<<<<<<<<< @@ -35400,7 +35089,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree if (__pyx_t_1 < 0) __pyx_t_1 += __pyx_v_visited.shape[0]; __pyx_v_mrca = (*((long *) ( /* dim=0 */ (__pyx_v_visited.data + __pyx_t_1 * __pyx_v_visited.strides[0]) ))); - /* "MuchTree.pyx":717 + /* "MuchTree.pyx":739 * if visited[i] == n : * mrca = visited[i] * break # <<<<<<<<<<<<<< @@ -35409,7 +35098,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ goto __pyx_L9_break; - /* "MuchTree.pyx":715 + /* "MuchTree.pyx":737 * while True : * if i >= a_depth : break * if visited[i] == n : # <<<<<<<<<<<<<< @@ -35418,7 +35107,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ } - /* "MuchTree.pyx":718 + /* "MuchTree.pyx":740 * mrca = visited[i] * break * i += 1 # <<<<<<<<<<<<<< @@ -35429,7 +35118,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree } __pyx_L9_break:; - /* "MuchTree.pyx":719 + /* "MuchTree.pyx":741 * break * i += 1 * if mrca != -1 : break # <<<<<<<<<<<<<< @@ -35441,7 +35130,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree goto __pyx_L7_break; } - /* "MuchTree.pyx":720 + /* "MuchTree.pyx":742 * i += 1 * if mrca != -1 : break * n = self.data[n].parent # <<<<<<<<<<<<<< @@ -35451,7 +35140,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree __pyx_t_2 = (__pyx_v_self->data[__pyx_v_n]).parent; __pyx_v_n = __pyx_t_2; - /* "MuchTree.pyx":721 + /* "MuchTree.pyx":743 * if mrca != -1 : break * n = self.data[n].parent * if n == -1 : # <<<<<<<<<<<<<< @@ -35461,7 +35150,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree __pyx_t_3 = (__pyx_v_n == -1L); if (__pyx_t_3) { - /* "MuchTree.pyx":722 + /* "MuchTree.pyx":744 * n = self.data[n].parent * if n == -1 : * mrca = n # <<<<<<<<<<<<<< @@ -35470,7 +35159,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ __pyx_v_mrca = __pyx_v_n; - /* "MuchTree.pyx":723 + /* "MuchTree.pyx":745 * if n == -1 : * mrca = n * break # <<<<<<<<<<<<<< @@ -35479,7 +35168,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree */ goto __pyx_L7_break; - /* "MuchTree.pyx":721 + /* "MuchTree.pyx":743 * if mrca != -1 : break * n = self.data[n].parent * if n == -1 : # <<<<<<<<<<<<<< @@ -35490,7 +35179,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree } __pyx_L7_break:; - /* "MuchTree.pyx":725 + /* "MuchTree.pyx":747 * break * * return mrca # <<<<<<<<<<<<<< @@ -35500,7 +35189,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree __pyx_r = __pyx_v_mrca; goto __pyx_L0; - /* "MuchTree.pyx":695 + /* "MuchTree.pyx":717 * * @cython.boundscheck(False) * cdef int _mrca( self, long[:] visited, int a, int b ) noexcept nogil : # <<<<<<<<<<<<<< @@ -35513,7 +35202,7 @@ static int __pyx_f_8MuchTree_8SuchTree__mrca(struct __pyx_obj_8MuchTree_SuchTree return __pyx_r; } -/* "MuchTree.pyx":727 +/* "MuchTree.pyx":749 * return mrca * * def distance( self, a, b ) : # <<<<<<<<<<<<<< @@ -35578,7 +35267,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -35586,14 +35275,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("distance", 1, 2, 2, 1); __PYX_ERR(0, 727, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("distance", 1, 2, 2, 1); __PYX_ERR(0, 749, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "distance") < 0)) __PYX_ERR(0, 727, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "distance") < 0)) __PYX_ERR(0, 749, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -35606,7 +35295,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("distance", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 727, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("distance", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 749, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35656,7 +35345,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __Pyx_INCREF(__pyx_v_a); __Pyx_INCREF(__pyx_v_b); - /* "MuchTree.pyx":733 + /* "MuchTree.pyx":755 * leaf name or an integer. * ''' * if isinstance( a, str ) : # <<<<<<<<<<<<<< @@ -35666,7 +35355,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_t_1 = PyUnicode_Check(__pyx_v_a); if (__pyx_t_1) { - /* "MuchTree.pyx":734 + /* "MuchTree.pyx":756 * ''' * if isinstance( a, str ) : * try : # <<<<<<<<<<<<<< @@ -35682,19 +35371,19 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "MuchTree.pyx":735 + /* "MuchTree.pyx":757 * if isinstance( a, str ) : * try : * a = self.leafs[a] # <<<<<<<<<<<<<< * except KeyError : * raise Exception( 'Leaf name not found : ' + a ) */ - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L4_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":734 + /* "MuchTree.pyx":756 * ''' * if isinstance( a, str ) : * try : # <<<<<<<<<<<<<< @@ -35709,7 +35398,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":736 + /* "MuchTree.pyx":758 * try : * a = self.leafs[a] * except KeyError : # <<<<<<<<<<<<<< @@ -35719,30 +35408,30 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("MuchTree.SuchTree.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 736, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 758, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); - /* "MuchTree.pyx":737 + /* "MuchTree.pyx":759 * a = self.leafs[a] * except KeyError : * raise Exception( 'Leaf name not found : ' + a ) # <<<<<<<<<<<<<< * if isinstance( b, str ) : * try : */ - __pyx_t_9 = PyNumber_Add(__pyx_kp_u_Leaf_name_not_found, __pyx_v_a); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 737, __pyx_L6_except_error) + __pyx_t_9 = PyNumber_Add(__pyx_kp_u_Leaf_name_not_found, __pyx_v_a); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 759, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 737, __pyx_L6_except_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 759, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 737, __pyx_L6_except_error) + __PYX_ERR(0, 759, __pyx_L6_except_error) } goto __pyx_L6_except_error; - /* "MuchTree.pyx":734 + /* "MuchTree.pyx":756 * ''' * if isinstance( a, str ) : * try : # <<<<<<<<<<<<<< @@ -35758,7 +35447,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_L9_try_end:; } - /* "MuchTree.pyx":733 + /* "MuchTree.pyx":755 * leaf name or an integer. * ''' * if isinstance( a, str ) : # <<<<<<<<<<<<<< @@ -35767,7 +35456,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT */ } - /* "MuchTree.pyx":738 + /* "MuchTree.pyx":760 * except KeyError : * raise Exception( 'Leaf name not found : ' + a ) * if isinstance( b, str ) : # <<<<<<<<<<<<<< @@ -35777,7 +35466,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_t_1 = PyUnicode_Check(__pyx_v_b); if (__pyx_t_1) { - /* "MuchTree.pyx":739 + /* "MuchTree.pyx":761 * raise Exception( 'Leaf name not found : ' + a ) * if isinstance( b, str ) : * try : # <<<<<<<<<<<<<< @@ -35793,19 +35482,19 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __Pyx_XGOTREF(__pyx_t_2); /*try:*/ { - /* "MuchTree.pyx":740 + /* "MuchTree.pyx":762 * if isinstance( b, str ) : * try : * b = self.leafs[b] # <<<<<<<<<<<<<< * except KeyError : * raise Exception( 'Leaf name not found : ' + b ) */ - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_b); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L13_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_b); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_b, __pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":739 + /* "MuchTree.pyx":761 * raise Exception( 'Leaf name not found : ' + a ) * if isinstance( b, str ) : * try : # <<<<<<<<<<<<<< @@ -35824,7 +35513,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "MuchTree.pyx":741 + /* "MuchTree.pyx":763 * try : * b = self.leafs[b] * except KeyError : # <<<<<<<<<<<<<< @@ -35834,30 +35523,30 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("MuchTree.SuchTree.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 741, __pyx_L15_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 763, __pyx_L15_except_error) __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); - /* "MuchTree.pyx":742 + /* "MuchTree.pyx":764 * b = self.leafs[b] * except KeyError : * raise Exception( 'Leaf name not found : ' + b ) # <<<<<<<<<<<<<< * * if a < 0 or a >= self.length : */ - __pyx_t_10 = PyNumber_Add(__pyx_kp_u_Leaf_name_not_found, __pyx_v_b); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 742, __pyx_L15_except_error) + __pyx_t_10 = PyNumber_Add(__pyx_kp_u_Leaf_name_not_found, __pyx_v_b); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 764, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 742, __pyx_L15_except_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __PYX_ERR(0, 742, __pyx_L15_except_error) + __PYX_ERR(0, 764, __pyx_L15_except_error) } goto __pyx_L15_except_error; - /* "MuchTree.pyx":739 + /* "MuchTree.pyx":761 * raise Exception( 'Leaf name not found : ' + a ) * if isinstance( b, str ) : * try : # <<<<<<<<<<<<<< @@ -35873,7 +35562,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT __pyx_L18_try_end:; } - /* "MuchTree.pyx":738 + /* "MuchTree.pyx":760 * except KeyError : * raise Exception( 'Leaf name not found : ' + a ) * if isinstance( b, str ) : # <<<<<<<<<<<<<< @@ -35882,54 +35571,54 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT */ } - /* "MuchTree.pyx":744 + /* "MuchTree.pyx":766 * raise Exception( 'Leaf name not found : ' + b ) * * if a < 0 or a >= self.length : # <<<<<<<<<<<<<< * raise Exception( 'node id out of bounds :', a ) * if b < 0 or b >= self.length : */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_a, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_a, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 766, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_11) { } else { __pyx_t_1 = __pyx_t_11; goto __pyx_L22_bool_binop_done; } - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyObject_RichCompare(__pyx_v_a, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_a, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __pyx_t_11; __pyx_L22_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":745 + /* "MuchTree.pyx":767 * * if a < 0 or a >= self.length : * raise Exception( 'node id out of bounds :', a ) # <<<<<<<<<<<<<< * if b < 0 or b >= self.length : * raise Exception( 'node id out of bounds :', b ) */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 745, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_kp_u_node_id_out_of_bounds_2); __Pyx_GIVEREF(__pyx_kp_u_node_id_out_of_bounds_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_node_id_out_of_bounds_2)) __PYX_ERR(0, 745, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_node_id_out_of_bounds_2)) __PYX_ERR(0, 767, __pyx_L1_error); __Pyx_INCREF(__pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_a)) __PYX_ERR(0, 745, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_a)) __PYX_ERR(0, 767, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 745, __pyx_L1_error) + __PYX_ERR(0, 767, __pyx_L1_error) - /* "MuchTree.pyx":744 + /* "MuchTree.pyx":766 * raise Exception( 'Leaf name not found : ' + b ) * * if a < 0 or a >= self.length : # <<<<<<<<<<<<<< @@ -35938,54 +35627,54 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT */ } - /* "MuchTree.pyx":746 + /* "MuchTree.pyx":768 * if a < 0 or a >= self.length : * raise Exception( 'node id out of bounds :', a ) * if b < 0 or b >= self.length : # <<<<<<<<<<<<<< * raise Exception( 'node id out of bounds :', b ) * */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_b, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 746, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_b, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_11) { } else { __pyx_t_1 = __pyx_t_11; goto __pyx_L25_bool_binop_done; } - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyObject_RichCompare(__pyx_v_b, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_b, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __pyx_t_11; __pyx_L25_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":747 + /* "MuchTree.pyx":769 * raise Exception( 'node id out of bounds :', a ) * if b < 0 or b >= self.length : * raise Exception( 'node id out of bounds :', b ) # <<<<<<<<<<<<<< * * return self._distance( a, b ) */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_kp_u_node_id_out_of_bounds_2); __Pyx_GIVEREF(__pyx_kp_u_node_id_out_of_bounds_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_node_id_out_of_bounds_2)) __PYX_ERR(0, 747, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_node_id_out_of_bounds_2)) __PYX_ERR(0, 769, __pyx_L1_error); __Pyx_INCREF(__pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_b)) __PYX_ERR(0, 747, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_b)) __PYX_ERR(0, 769, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 747, __pyx_L1_error) + __PYX_ERR(0, 769, __pyx_L1_error) - /* "MuchTree.pyx":746 + /* "MuchTree.pyx":768 * if a < 0 or a >= self.length : * raise Exception( 'node id out of bounds :', a ) * if b < 0 or b >= self.length : # <<<<<<<<<<<<<< @@ -35994,7 +35683,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT */ } - /* "MuchTree.pyx":749 + /* "MuchTree.pyx":771 * raise Exception( 'node id out of bounds :', b ) * * return self._distance( a, b ) # <<<<<<<<<<<<<< @@ -36002,16 +35691,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_a); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_b); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error) - __pyx_t_13 = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_distance(__pyx_v_self, __pyx_t_6, __pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error) - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_a); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_b); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_13 = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_distance(__pyx_v_self, __pyx_t_6, __pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "MuchTree.pyx":727 + /* "MuchTree.pyx":749 * return mrca * * def distance( self, a, b ) : # <<<<<<<<<<<<<< @@ -36036,7 +35725,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_42distance(struct __pyx_obj_8MuchT return __pyx_r; } -/* "MuchTree.pyx":752 +/* "MuchTree.pyx":774 * * @cython.boundscheck(False) * cdef float _distance( self, int a, int b ) : # <<<<<<<<<<<<<< @@ -36063,7 +35752,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_distance", 1); - /* "MuchTree.pyx":754 + /* "MuchTree.pyx":776 * cdef float _distance( self, int a, int b ) : * cdef int mrca * cdef float d = 0 # <<<<<<<<<<<<<< @@ -36072,18 +35761,18 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su */ __pyx_v_d = 0.0; - /* "MuchTree.pyx":757 + /* "MuchTree.pyx":779 * cdef int n * * mrca = self.mrca( a, b ) # <<<<<<<<<<<<<< * * n = a */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mrca); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mrca); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_b); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_b); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -36105,15 +35794,15 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_mrca = __pyx_t_7; - /* "MuchTree.pyx":759 + /* "MuchTree.pyx":781 * mrca = self.mrca( a, b ) * * n = a # <<<<<<<<<<<<<< @@ -36122,7 +35811,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su */ __pyx_v_n = __pyx_v_a; - /* "MuchTree.pyx":760 + /* "MuchTree.pyx":782 * * n = a * while n != mrca : # <<<<<<<<<<<<<< @@ -36133,7 +35822,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su __pyx_t_8 = (__pyx_v_n != __pyx_v_mrca); if (!__pyx_t_8) break; - /* "MuchTree.pyx":761 + /* "MuchTree.pyx":783 * n = a * while n != mrca : * d += self.data[n].distance # <<<<<<<<<<<<<< @@ -36142,7 +35831,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su */ __pyx_v_d = (__pyx_v_d + (__pyx_v_self->data[__pyx_v_n]).distance); - /* "MuchTree.pyx":762 + /* "MuchTree.pyx":784 * while n != mrca : * d += self.data[n].distance * n = self.data[n].parent # <<<<<<<<<<<<<< @@ -36153,7 +35842,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su __pyx_v_n = __pyx_t_7; } - /* "MuchTree.pyx":763 + /* "MuchTree.pyx":785 * d += self.data[n].distance * n = self.data[n].parent * n = b # <<<<<<<<<<<<<< @@ -36162,7 +35851,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su */ __pyx_v_n = __pyx_v_b; - /* "MuchTree.pyx":764 + /* "MuchTree.pyx":786 * n = self.data[n].parent * n = b * while n != mrca : # <<<<<<<<<<<<<< @@ -36173,7 +35862,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su __pyx_t_8 = (__pyx_v_n != __pyx_v_mrca); if (!__pyx_t_8) break; - /* "MuchTree.pyx":765 + /* "MuchTree.pyx":787 * n = b * while n != mrca : * d += self.data[n].distance # <<<<<<<<<<<<<< @@ -36182,7 +35871,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su */ __pyx_v_d = (__pyx_v_d + (__pyx_v_self->data[__pyx_v_n]).distance); - /* "MuchTree.pyx":766 + /* "MuchTree.pyx":788 * while n != mrca : * d += self.data[n].distance * n = self.data[n].parent # <<<<<<<<<<<<<< @@ -36193,7 +35882,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su __pyx_v_n = __pyx_t_7; } - /* "MuchTree.pyx":767 + /* "MuchTree.pyx":789 * d += self.data[n].distance * n = self.data[n].parent * return d # <<<<<<<<<<<<<< @@ -36203,7 +35892,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su __pyx_r = __pyx_v_d; goto __pyx_L0; - /* "MuchTree.pyx":752 + /* "MuchTree.pyx":774 * * @cython.boundscheck(False) * cdef float _distance( self, int a, int b ) : # <<<<<<<<<<<<<< @@ -36225,7 +35914,7 @@ static float __pyx_f_8MuchTree_8SuchTree__distance(struct __pyx_obj_8MuchTree_Su return __pyx_r; } -/* "MuchTree.pyx":769 +/* "MuchTree.pyx":791 * return d * * def distances( self, long[:,:] ids ) : # <<<<<<<<<<<<<< @@ -36287,23 +35976,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "distances") < 0)) __PYX_ERR(0, 769, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "distances") < 0)) __PYX_ERR(0, 791, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_ids = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ids.memview)) __PYX_ERR(0, 769, __pyx_L3_error) + __pyx_v_ids = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ids.memview)) __PYX_ERR(0, 791, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("distances", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 769, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("distances", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 791, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36349,7 +36038,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distances", 1); - /* "MuchTree.pyx":774 + /* "MuchTree.pyx":796 * which are expected as an (n,2) array of type int. * ''' * if not ids.shape[1] == 2 : # <<<<<<<<<<<<<< @@ -36359,44 +36048,44 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much __pyx_t_1 = (!((__pyx_v_ids.shape[1]) == 2)); if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":776 + /* "MuchTree.pyx":798 * if not ids.shape[1] == 2 : * raise Exception( 'expected (n,2) array', * ids.shape[0], ids.shape[1] ) # <<<<<<<<<<<<<< * * visited = np.zeros( self.depth, dtype=int ) */ - __pyx_t_2 = PyInt_FromSsize_t((__pyx_v_ids.shape[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t((__pyx_v_ids.shape[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_ids.shape[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_ids.shape[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "MuchTree.pyx":775 + /* "MuchTree.pyx":797 * ''' * if not ids.shape[1] == 2 : * raise Exception( 'expected (n,2) array', # <<<<<<<<<<<<<< * ids.shape[0], ids.shape[1] ) * */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_u_expected_n_2_array); __Pyx_GIVEREF(__pyx_kp_u_expected_n_2_array); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_expected_n_2_array)) __PYX_ERR(0, 775, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_expected_n_2_array)) __PYX_ERR(0, 797, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(0, 797, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 775, __pyx_L1_error) + __PYX_ERR(0, 797, __pyx_L1_error) - /* "MuchTree.pyx":774 + /* "MuchTree.pyx":796 * which are expected as an (n,2) array of type int. * ''' * if not ids.shape[1] == 2 : # <<<<<<<<<<<<<< @@ -36405,29 +36094,29 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":778 + /* "MuchTree.pyx":800 * ids.shape[0], ids.shape[1] ) * * visited = np.zeros( self.depth, dtype=int ) # <<<<<<<<<<<<<< * result = np.zeros( ids.shape[0], dtype=float ) * self._distances( ids.shape[0], visited, ids, result ) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->depth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->depth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 778, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 800, __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; @@ -36435,29 +36124,29 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much __pyx_v_visited = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":779 + /* "MuchTree.pyx":801 * * visited = np.zeros( self.depth, dtype=int ) * result = np.zeros( ids.shape[0], dtype=float ) # <<<<<<<<<<<<<< * self._distances( ids.shape[0], visited, ids, result ) * return result */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_ids.shape[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t((__pyx_v_ids.shape[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 779, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_5); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -36465,22 +36154,22 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":780 + /* "MuchTree.pyx":802 * visited = np.zeros( self.depth, dtype=int ) * result = np.zeros( ids.shape[0], dtype=float ) * self._distances( ids.shape[0], visited, ids, result ) # <<<<<<<<<<<<<< * return result * */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_visited, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 780, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_result, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 780, __pyx_L1_error) - ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_distances(__pyx_v_self, (__pyx_v_ids.shape[0]), __pyx_t_6, __pyx_v_ids, __pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_visited, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_result, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 802, __pyx_L1_error) + ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_distances(__pyx_v_self, (__pyx_v_ids.shape[0]), __pyx_t_6, __pyx_v_ids, __pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":781 + /* "MuchTree.pyx":803 * result = np.zeros( ids.shape[0], dtype=float ) * self._distances( ids.shape[0], visited, ids, result ) * return result # <<<<<<<<<<<<<< @@ -36492,7 +36181,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "MuchTree.pyx":769 + /* "MuchTree.pyx":791 * return d * * def distances( self, long[:,:] ids ) : # <<<<<<<<<<<<<< @@ -36518,7 +36207,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_44distances(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":784 +/* "MuchTree.pyx":806 * * @cython.boundscheck(False) * cdef void _distances( self, unsigned int length, # <<<<<<<<<<<<<< @@ -36541,7 +36230,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su int __pyx_t_6; int __pyx_t_7; - /* "MuchTree.pyx":802 + /* "MuchTree.pyx":824 * cdef unsigned int i * * for i in xrange( ids.shape[0] ) : # <<<<<<<<<<<<<< @@ -36553,7 +36242,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "MuchTree.pyx":803 + /* "MuchTree.pyx":825 * * for i in xrange( ids.shape[0] ) : * a = ids[i,0] # <<<<<<<<<<<<<< @@ -36565,7 +36254,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_ids.shape[1]; __pyx_v_a = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_ids.data + __pyx_t_4 * __pyx_v_ids.strides[0]) ) + __pyx_t_5 * __pyx_v_ids.strides[1]) ))); - /* "MuchTree.pyx":804 + /* "MuchTree.pyx":826 * for i in xrange( ids.shape[0] ) : * a = ids[i,0] * b = ids[i,1] # <<<<<<<<<<<<<< @@ -36577,7 +36266,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_v_ids.shape[1]; __pyx_v_b = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_ids.data + __pyx_t_4 * __pyx_v_ids.strides[0]) ) + __pyx_t_5 * __pyx_v_ids.strides[1]) ))); - /* "MuchTree.pyx":805 + /* "MuchTree.pyx":827 * a = ids[i,0] * b = ids[i,1] * mrca = self._mrca( visited, a, b ) # <<<<<<<<<<<<<< @@ -36586,7 +36275,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su */ __pyx_v_mrca = ((struct __pyx_vtabstruct_8MuchTree_SuchTree *)__pyx_v_self->__pyx_vtab)->_mrca(__pyx_v_self, __pyx_v_visited, __pyx_v_a, __pyx_v_b); - /* "MuchTree.pyx":806 + /* "MuchTree.pyx":828 * b = ids[i,1] * mrca = self._mrca( visited, a, b ) * n = a # <<<<<<<<<<<<<< @@ -36595,7 +36284,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su */ __pyx_v_n = __pyx_v_a; - /* "MuchTree.pyx":807 + /* "MuchTree.pyx":829 * mrca = self._mrca( visited, a, b ) * n = a * d = 0 # <<<<<<<<<<<<<< @@ -36604,7 +36293,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su */ __pyx_v_d = 0.0; - /* "MuchTree.pyx":808 + /* "MuchTree.pyx":830 * n = a * d = 0 * while n != mrca : # <<<<<<<<<<<<<< @@ -36615,7 +36304,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su __pyx_t_6 = (__pyx_v_n != __pyx_v_mrca); if (!__pyx_t_6) break; - /* "MuchTree.pyx":809 + /* "MuchTree.pyx":831 * d = 0 * while n != mrca : * d += self.data[n].distance # <<<<<<<<<<<<<< @@ -36624,7 +36313,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su */ __pyx_v_d = (__pyx_v_d + (__pyx_v_self->data[__pyx_v_n]).distance); - /* "MuchTree.pyx":810 + /* "MuchTree.pyx":832 * while n != mrca : * d += self.data[n].distance * n = self.data[n].parent # <<<<<<<<<<<<<< @@ -36635,7 +36324,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su __pyx_v_n = __pyx_t_7; } - /* "MuchTree.pyx":811 + /* "MuchTree.pyx":833 * d += self.data[n].distance * n = self.data[n].parent * n = b # <<<<<<<<<<<<<< @@ -36644,7 +36333,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su */ __pyx_v_n = __pyx_v_b; - /* "MuchTree.pyx":812 + /* "MuchTree.pyx":834 * n = self.data[n].parent * n = b * while n != mrca : # <<<<<<<<<<<<<< @@ -36655,7 +36344,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su __pyx_t_6 = (__pyx_v_n != __pyx_v_mrca); if (!__pyx_t_6) break; - /* "MuchTree.pyx":813 + /* "MuchTree.pyx":835 * n = b * while n != mrca : * d += self.data[n].distance # <<<<<<<<<<<<<< @@ -36664,7 +36353,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su */ __pyx_v_d = (__pyx_v_d + (__pyx_v_self->data[__pyx_v_n]).distance); - /* "MuchTree.pyx":814 + /* "MuchTree.pyx":836 * while n != mrca : * d += self.data[n].distance * n = self.data[n].parent # <<<<<<<<<<<<<< @@ -36675,7 +36364,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su __pyx_v_n = __pyx_t_7; } - /* "MuchTree.pyx":815 + /* "MuchTree.pyx":837 * d += self.data[n].distance * n = self.data[n].parent * result[i] = d # <<<<<<<<<<<<<< @@ -36686,7 +36375,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su *((double *) ( /* dim=0 */ (__pyx_v_result.data + __pyx_t_4 * __pyx_v_result.strides[0]) )) = __pyx_v_d; } - /* "MuchTree.pyx":784 + /* "MuchTree.pyx":806 * * @cython.boundscheck(False) * cdef void _distances( self, unsigned int length, # <<<<<<<<<<<<<< @@ -36697,7 +36386,7 @@ static void __pyx_f_8MuchTree_8SuchTree__distances(struct __pyx_obj_8MuchTree_Su /* function exit code */ } -/* "MuchTree.pyx":817 +/* "MuchTree.pyx":839 * result[i] = d * * def distances_by_name( self, id_pairs ) : # <<<<<<<<<<<<<< @@ -36759,12 +36448,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 839, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "distances_by_name") < 0)) __PYX_ERR(0, 817, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "distances_by_name") < 0)) __PYX_ERR(0, 839, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -36775,7 +36464,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("distances_by_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 817, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("distances_by_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 839, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36825,54 +36514,54 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distances_by_name", 1); - /* "MuchTree.pyx":822 + /* "MuchTree.pyx":844 * given (n,2) list of lists. Accepts only leaf names. * ''' * shape = ( len(id_pairs), len(id_pairs[0]) ) # <<<<<<<<<<<<<< * ids = np.zeros( shape, dtype=int ) * for n,(a,b) in enumerate(id_pairs) : */ - __pyx_t_1 = PyObject_Length(__pyx_v_id_pairs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 822, __pyx_L1_error) - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = PyObject_Length(__pyx_v_id_pairs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_id_pairs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_id_pairs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_v_shape = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":823 + /* "MuchTree.pyx":845 * ''' * shape = ( len(id_pairs), len(id_pairs[0]) ) * ids = np.zeros( shape, dtype=int ) # <<<<<<<<<<<<<< * for n,(a,b) in enumerate(id_pairs) : * ids[n][0] = self.leafs[a] */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_shape); __Pyx_GIVEREF(__pyx_v_shape); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(0, 823, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(0, 845, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 823, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 845, __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; @@ -36880,7 +36569,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __pyx_v_ids = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":824 + /* "MuchTree.pyx":846 * shape = ( len(id_pairs), len(id_pairs[0]) ) * ids = np.zeros( shape, dtype=int ) * for n,(a,b) in enumerate(id_pairs) : # <<<<<<<<<<<<<< @@ -36894,9 +36583,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __pyx_t_1 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_id_pairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_id_pairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -36904,28 +36593,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 846, __pyx_L1_error) #endif if (__pyx_t_1 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 846, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 846, __pyx_L1_error) #endif if (__pyx_t_1 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 846, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -36935,7 +36624,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 824, __pyx_L1_error) + else __PYX_ERR(0, 846, __pyx_L1_error) } break; } @@ -36947,7 +36636,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 824, __pyx_L1_error) + __PYX_ERR(0, 846, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -36960,15 +36649,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -36976,7 +36665,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 824, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 846, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -36984,7 +36673,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 824, __pyx_L1_error) + __PYX_ERR(0, 846, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_3); @@ -36993,43 +36682,43 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __pyx_t_7 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":825 + /* "MuchTree.pyx":847 * ids = np.zeros( shape, dtype=int ) * for n,(a,b) in enumerate(id_pairs) : * ids[n][0] = self.leafs[a] # <<<<<<<<<<<<<< * ids[n][1] = self.leafs[b] * return self.distances( ids ) */ - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_ids, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_ids, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely((__Pyx_SetItemInt(__pyx_t_7, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 825, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_7, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":826 + /* "MuchTree.pyx":848 * for n,(a,b) in enumerate(id_pairs) : * ids[n][0] = self.leafs[a] * ids[n][1] = self.leafs[b] # <<<<<<<<<<<<<< * return self.distances( ids ) * */ - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_b); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->leafs, __pyx_v_b); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_ids, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_ids, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely((__Pyx_SetItemInt(__pyx_t_7, 1, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 826, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_t_7, 1, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":824 + /* "MuchTree.pyx":846 * shape = ( len(id_pairs), len(id_pairs[0]) ) * ids = np.zeros( shape, dtype=int ) * for n,(a,b) in enumerate(id_pairs) : # <<<<<<<<<<<<<< @@ -37040,7 +36729,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":827 + /* "MuchTree.pyx":849 * ids[n][0] = self.leafs[a] * ids[n][1] = self.leafs[b] * return self.distances( ids ) # <<<<<<<<<<<<<< @@ -37048,7 +36737,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o * def link_leaf( self, unsigned int leaf_id, unsigned int col_id ) : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distances); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distances); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_10 = 0; @@ -37068,7 +36757,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_ids}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -37076,7 +36765,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o __pyx_t_5 = 0; goto __pyx_L0; - /* "MuchTree.pyx":817 + /* "MuchTree.pyx":839 * result[i] = d * * def distances_by_name( self, id_pairs ) : # <<<<<<<<<<<<<< @@ -37105,7 +36794,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_46distances_by_name(struct __pyx_o return __pyx_r; } -/* "MuchTree.pyx":829 +/* "MuchTree.pyx":851 * return self.distances( ids ) * * def link_leaf( self, unsigned int leaf_id, unsigned int col_id ) : # <<<<<<<<<<<<<< @@ -37170,7 +36859,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -37178,14 +36867,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("link_leaf", 1, 2, 2, 1); __PYX_ERR(0, 829, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("link_leaf", 1, 2, 2, 1); __PYX_ERR(0, 851, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "link_leaf") < 0)) __PYX_ERR(0, 829, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "link_leaf") < 0)) __PYX_ERR(0, 851, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -37193,12 +36882,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_leaf_id = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_leaf_id == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L3_error) - __pyx_v_col_id = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_col_id == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L3_error) + __pyx_v_leaf_id = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_leaf_id == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error) + __pyx_v_col_id = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_col_id == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("link_leaf", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 829, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("link_leaf", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 851, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37239,7 +36928,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("link_leaf", 1); - /* "MuchTree.pyx":833 + /* "MuchTree.pyx":855 * Attaches a leaf node to SuchLinkedTrees link matrix column. * ''' * if not self.data[leaf_id].left_child == -1 : # <<<<<<<<<<<<<< @@ -37249,31 +36938,31 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much __pyx_t_1 = (!((__pyx_v_self->data[__pyx_v_leaf_id]).left_child == -1L)); if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":834 + /* "MuchTree.pyx":856 * ''' * if not self.data[leaf_id].left_child == -1 : * raise Exception( 'Cannot link non-leaf node.', leaf_id ) # <<<<<<<<<<<<<< * if not leaf_id in set( self.leafs.values() ) : * raise Exception( 'Unknown leaf id.', leaf_id ) */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_leaf_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_leaf_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_Cannot_link_non_leaf_node); __Pyx_GIVEREF(__pyx_kp_u_Cannot_link_non_leaf_node); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_link_non_leaf_node)) __PYX_ERR(0, 834, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_link_non_leaf_node)) __PYX_ERR(0, 856, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 834, __pyx_L1_error) + __PYX_ERR(0, 856, __pyx_L1_error) - /* "MuchTree.pyx":833 + /* "MuchTree.pyx":855 * Attaches a leaf node to SuchLinkedTrees link matrix column. * ''' * if not self.data[leaf_id].left_child == -1 : # <<<<<<<<<<<<<< @@ -37282,16 +36971,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":835 + /* "MuchTree.pyx":857 * if not self.data[leaf_id].left_child == -1 : * raise Exception( 'Cannot link non-leaf node.', leaf_id ) * if not leaf_id in set( self.leafs.values() ) : # <<<<<<<<<<<<<< * raise Exception( 'Unknown leaf id.', leaf_id ) * # we only use the left child to identify a node as a leaf, so */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_leaf_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_leaf_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->leafs, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->leafs, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -37311,43 +37000,43 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error) + 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; } - __pyx_t_4 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_4 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":836 + /* "MuchTree.pyx":858 * raise Exception( 'Cannot link non-leaf node.', leaf_id ) * if not leaf_id in set( self.leafs.values() ) : * raise Exception( 'Unknown leaf id.', leaf_id ) # <<<<<<<<<<<<<< * # we only use the left child to identify a node as a leaf, so * # the right child is avalable to store the column index */ - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_leaf_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_leaf_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_Unknown_leaf_id); __Pyx_GIVEREF(__pyx_kp_u_Unknown_leaf_id); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Unknown_leaf_id)) __PYX_ERR(0, 836, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Unknown_leaf_id)) __PYX_ERR(0, 858, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 836, __pyx_L1_error) + __PYX_ERR(0, 858, __pyx_L1_error) - /* "MuchTree.pyx":835 + /* "MuchTree.pyx":857 * if not self.data[leaf_id].left_child == -1 : * raise Exception( 'Cannot link non-leaf node.', leaf_id ) * if not leaf_id in set( self.leafs.values() ) : # <<<<<<<<<<<<<< @@ -37356,7 +37045,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":839 + /* "MuchTree.pyx":861 * # we only use the left child to identify a node as a leaf, so * # the right child is avalable to store the column index * self.data[leaf_id].right_child = col_id # <<<<<<<<<<<<<< @@ -37365,7 +37054,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much */ (__pyx_v_self->data[__pyx_v_leaf_id]).right_child = __pyx_v_col_id; - /* "MuchTree.pyx":829 + /* "MuchTree.pyx":851 * return self.distances( ids ) * * def link_leaf( self, unsigned int leaf_id, unsigned int col_id ) : # <<<<<<<<<<<<<< @@ -37389,7 +37078,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_48link_leaf(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":841 +/* "MuchTree.pyx":863 * self.data[leaf_id].right_child = col_id * * def get_links( self, leaf_ids ) : # <<<<<<<<<<<<<< @@ -37451,12 +37140,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 841, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_links") < 0)) __PYX_ERR(0, 841, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_links") < 0)) __PYX_ERR(0, 863, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -37467,7 +37156,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_links", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 841, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_links", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 863, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37515,16 +37204,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_links", 1); - /* "MuchTree.pyx":845 + /* "MuchTree.pyx":867 * Returns an array of column ids for an array of leaf ids. * ''' * if not set( leaf_ids ) <= set( self.leafs.values() ) : # <<<<<<<<<<<<<< * raise Exception( 'Unknown leaf id(s).', leaf_ids ) * col_ids = np.ndarray( len(leaf_ids), dtype=int ) */ - __pyx_t_1 = PySet_New(__pyx_v_leaf_ids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_1 = PySet_New(__pyx_v_leaf_ids); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->leafs, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->leafs, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -37544,44 +37233,44 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (!__pyx_t_6); if (unlikely(__pyx_t_7)) { - /* "MuchTree.pyx":846 + /* "MuchTree.pyx":868 * ''' * if not set( leaf_ids ) <= set( self.leafs.values() ) : * raise Exception( 'Unknown leaf id(s).', leaf_ids ) # <<<<<<<<<<<<<< * col_ids = np.ndarray( len(leaf_ids), dtype=int ) * for n,leaf in enumerate( leaf_ids ) : */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_Unknown_leaf_id_s); __Pyx_GIVEREF(__pyx_kp_u_Unknown_leaf_id_s); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Unknown_leaf_id_s)) __PYX_ERR(0, 846, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Unknown_leaf_id_s)) __PYX_ERR(0, 868, __pyx_L1_error); __Pyx_INCREF(__pyx_v_leaf_ids); __Pyx_GIVEREF(__pyx_v_leaf_ids); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leaf_ids)) __PYX_ERR(0, 846, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 846, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_leaf_ids)) __PYX_ERR(0, 868, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 846, __pyx_L1_error) + __PYX_ERR(0, 868, __pyx_L1_error) - /* "MuchTree.pyx":845 + /* "MuchTree.pyx":867 * Returns an array of column ids for an array of leaf ids. * ''' * if not set( leaf_ids ) <= set( self.leafs.values() ) : # <<<<<<<<<<<<<< @@ -37590,32 +37279,32 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":847 + /* "MuchTree.pyx":869 * if not set( leaf_ids ) <= set( self.leafs.values() ) : * raise Exception( 'Unknown leaf id(s).', leaf_ids ) * col_ids = np.ndarray( len(leaf_ids), dtype=int ) # <<<<<<<<<<<<<< * for n,leaf in enumerate( leaf_ids ) : * col_ids[n] = self.data[ leaf ].right_child */ - __pyx_t_8 = PyObject_Length(__pyx_v_leaf_ids); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 847, __pyx_L1_error) - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_8 = PyObject_Length(__pyx_v_leaf_ids); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 847, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_col_ids = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":848 + /* "MuchTree.pyx":870 * raise Exception( 'Unknown leaf id(s).', leaf_ids ) * col_ids = np.ndarray( len(leaf_ids), dtype=int ) * for n,leaf in enumerate( leaf_ids ) : # <<<<<<<<<<<<<< @@ -37629,9 +37318,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_leaf_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_leaf_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 870, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { @@ -37639,28 +37328,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 848, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 870, __pyx_L1_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 848, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 870, __pyx_L1_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -37670,7 +37359,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 848, __pyx_L1_error) + else __PYX_ERR(0, 870, __pyx_L1_error) } break; } @@ -37680,26 +37369,26 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":849 + /* "MuchTree.pyx":871 * col_ids = np.ndarray( len(leaf_ids), dtype=int ) * for n,leaf in enumerate( leaf_ids ) : * col_ids[n] = self.data[ leaf ].right_child # <<<<<<<<<<<<<< * return col_ids * */ - __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_leaf); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_10]).right_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_leaf); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_10]).right_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely((PyObject_SetItem(__pyx_v_col_ids, __pyx_v_n, __pyx_t_2) < 0))) __PYX_ERR(0, 849, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_col_ids, __pyx_v_n, __pyx_t_2) < 0))) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":848 + /* "MuchTree.pyx":870 * raise Exception( 'Unknown leaf id(s).', leaf_ids ) * col_ids = np.ndarray( len(leaf_ids), dtype=int ) * for n,leaf in enumerate( leaf_ids ) : # <<<<<<<<<<<<<< @@ -37710,7 +37399,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":850 + /* "MuchTree.pyx":872 * for n,leaf in enumerate( leaf_ids ) : * col_ids[n] = self.data[ leaf ].right_child * return col_ids # <<<<<<<<<<<<<< @@ -37722,7 +37411,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much __pyx_r = __pyx_v_col_ids; goto __pyx_L0; - /* "MuchTree.pyx":841 + /* "MuchTree.pyx":863 * self.data[leaf_id].right_child = col_id * * def get_links( self, leaf_ids ) : # <<<<<<<<<<<<<< @@ -37747,7 +37436,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_50get_links(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":852 +/* "MuchTree.pyx":874 * return col_ids * * def adjacency( self, int node=-1 ) : # <<<<<<<<<<<<<< @@ -37808,12 +37497,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_node); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "adjacency") < 0)) __PYX_ERR(0, 852, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "adjacency") < 0)) __PYX_ERR(0, 874, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -37824,14 +37513,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_node = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L3_error) + __pyx_v_node = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L3_error) } else { __pyx_v_node = ((int)-1); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("adjacency", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 852, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("adjacency", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 874, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37896,7 +37585,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("adjacency", 1); - /* "MuchTree.pyx":866 + /* "MuchTree.pyx":888 * cdef int l * cdef int r * cdef unsigned int n = 0 # <<<<<<<<<<<<<< @@ -37905,7 +37594,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much */ __pyx_v_n = 0; - /* "MuchTree.pyx":869 + /* "MuchTree.pyx":891 * * # by default, start from the root node * if node == -1 : # <<<<<<<<<<<<<< @@ -37915,7 +37604,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_1 = (__pyx_v_node == -1L); if (__pyx_t_1) { - /* "MuchTree.pyx":870 + /* "MuchTree.pyx":892 * # by default, start from the root node * if node == -1 : * node = self.root # <<<<<<<<<<<<<< @@ -37925,7 +37614,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_2 = __pyx_v_self->root; __pyx_v_node = __pyx_t_2; - /* "MuchTree.pyx":869 + /* "MuchTree.pyx":891 * * # by default, start from the root node * if node == -1 : # <<<<<<<<<<<<<< @@ -37934,7 +37623,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":873 + /* "MuchTree.pyx":895 * * # bail if the node isn't in our tree * if node > self.length or node < -1 : # <<<<<<<<<<<<<< @@ -37952,31 +37641,31 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":874 + /* "MuchTree.pyx":896 * # bail if the node isn't in our tree * if node > self.length or node < -1 : * raise Exception( 'Node id out of range.', node ) # <<<<<<<<<<<<<< * * self.np_buffer = np.ndarray( self.length, dtype=int ) */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_kp_u_Node_id_out_of_range); __Pyx_GIVEREF(__pyx_kp_u_Node_id_out_of_range); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Node_id_out_of_range)) __PYX_ERR(0, 874, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Node_id_out_of_range)) __PYX_ERR(0, 896, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 874, __pyx_L1_error) + __PYX_ERR(0, 896, __pyx_L1_error) - /* "MuchTree.pyx":873 + /* "MuchTree.pyx":895 * * # bail if the node isn't in our tree * if node > self.length or node < -1 : # <<<<<<<<<<<<<< @@ -37985,24 +37674,24 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":876 + /* "MuchTree.pyx":898 * raise Exception( 'Node id out of range.', node ) * * self.np_buffer = np.ndarray( self.length, dtype=int ) # <<<<<<<<<<<<<< * * to_visit = [ node ] */ - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 876, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 876, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -38012,24 +37701,24 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_v_self->np_buffer = __pyx_t_6; __pyx_t_6 = 0; - /* "MuchTree.pyx":878 + /* "MuchTree.pyx":900 * self.np_buffer = np.ndarray( self.length, dtype=int ) * * to_visit = [ node ] # <<<<<<<<<<<<<< * for i in to_visit : * self.np_buffer[n] = i */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error); __pyx_t_6 = 0; __pyx_v_to_visit = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":879 + /* "MuchTree.pyx":901 * * to_visit = [ node ] * for i in to_visit : # <<<<<<<<<<<<<< @@ -38042,33 +37731,33 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 879, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 901, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 901, __pyx_L1_error) #else - __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif - __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_t_6); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_i = __pyx_t_2; - /* "MuchTree.pyx":880 + /* "MuchTree.pyx":902 * to_visit = [ node ] * for i in to_visit : * self.np_buffer[n] = i # <<<<<<<<<<<<<< * n += 1 * l,r = self.get_children( i ) */ - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely((__Pyx_SetItemInt(__pyx_v_self->np_buffer, __pyx_v_n, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0))) __PYX_ERR(0, 880, __pyx_L1_error) + if (unlikely((__Pyx_SetItemInt(__pyx_v_self->np_buffer, __pyx_v_n, __pyx_t_6, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1) < 0))) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "MuchTree.pyx":881 + /* "MuchTree.pyx":903 * for i in to_visit : * self.np_buffer[n] = i * n += 1 # <<<<<<<<<<<<<< @@ -38077,16 +37766,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much */ __pyx_v_n = (__pyx_v_n + 1); - /* "MuchTree.pyx":882 + /* "MuchTree.pyx":904 * self.np_buffer[n] = i * n += 1 * l,r = self.get_children( i ) # <<<<<<<<<<<<<< * if l != -1 : * to_visit.append( l ) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_children); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_children); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_2 = 0; @@ -38107,7 +37796,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -38117,7 +37806,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 882, __pyx_L1_error) + __PYX_ERR(0, 904, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -38130,15 +37819,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -38146,7 +37835,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 882, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 904, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L10_unpacking_done; @@ -38154,17 +37843,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 882, __pyx_L1_error) + __PYX_ERR(0, 904, __pyx_L1_error) __pyx_L10_unpacking_done:; } - __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_l = __pyx_t_11; __pyx_v_r = __pyx_t_12; - /* "MuchTree.pyx":883 + /* "MuchTree.pyx":905 * n += 1 * l,r = self.get_children( i ) * if l != -1 : # <<<<<<<<<<<<<< @@ -38174,31 +37863,31 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_1 = (__pyx_v_l != -1L); if (__pyx_t_1) { - /* "MuchTree.pyx":884 + /* "MuchTree.pyx":906 * l,r = self.get_children( i ) * if l != -1 : * to_visit.append( l ) # <<<<<<<<<<<<<< * to_visit.append( r ) * */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_to_visit, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_to_visit, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "MuchTree.pyx":885 + /* "MuchTree.pyx":907 * if l != -1 : * to_visit.append( l ) * to_visit.append( r ) # <<<<<<<<<<<<<< * * ajmatrix = np.zeros( (n,n), dtype=float ) */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_to_visit, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_to_visit, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "MuchTree.pyx":883 + /* "MuchTree.pyx":905 * n += 1 * l,r = self.get_children( i ) * if l != -1 : # <<<<<<<<<<<<<< @@ -38207,7 +37896,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":879 + /* "MuchTree.pyx":901 * * to_visit = [ node ] * for i in to_visit : # <<<<<<<<<<<<<< @@ -38217,39 +37906,39 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":887 + /* "MuchTree.pyx":909 * to_visit.append( r ) * * ajmatrix = np.zeros( (n,n), dtype=float ) # <<<<<<<<<<<<<< * * for i in xrange( n ) : */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 887, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 909, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 887, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 909, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -38257,7 +37946,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_v_ajmatrix = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":889 + /* "MuchTree.pyx":911 * ajmatrix = np.zeros( (n,n), dtype=float ) * * for i in xrange( n ) : # <<<<<<<<<<<<<< @@ -38269,20 +37958,20 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_i = __pyx_t_15; - /* "MuchTree.pyx":890 + /* "MuchTree.pyx":912 * * for i in xrange( n ) : * node_id = self.np_buffer[i] # <<<<<<<<<<<<<< * parent = self.data[node_id].parent * if parent == -1 : continue */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->np_buffer, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->np_buffer, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_16 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_16 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_16 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_node_id = __pyx_t_16; - /* "MuchTree.pyx":891 + /* "MuchTree.pyx":913 * for i in xrange( n ) : * node_id = self.np_buffer[i] * parent = self.data[node_id].parent # <<<<<<<<<<<<<< @@ -38292,7 +37981,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_12 = (__pyx_v_self->data[__pyx_v_node_id]).parent; __pyx_v_parent = __pyx_t_12; - /* "MuchTree.pyx":892 + /* "MuchTree.pyx":914 * node_id = self.np_buffer[i] * parent = self.data[node_id].parent * if parent == -1 : continue # <<<<<<<<<<<<<< @@ -38304,7 +37993,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much goto __pyx_L13_continue; } - /* "MuchTree.pyx":893 + /* "MuchTree.pyx":915 * parent = self.data[node_id].parent * if parent == -1 : continue * distance = self.data[node_id].distance # <<<<<<<<<<<<<< @@ -38314,7 +38003,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_17 = (__pyx_v_self->data[__pyx_v_node_id]).distance; __pyx_v_distance = __pyx_t_17; - /* "MuchTree.pyx":894 + /* "MuchTree.pyx":916 * if parent == -1 : continue * distance = self.data[node_id].distance * if distance == 0 : distance += self.epsilon # <<<<<<<<<<<<<< @@ -38326,7 +38015,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_v_distance = (__pyx_v_distance + __pyx_v_self->epsilon); } - /* "MuchTree.pyx":895 + /* "MuchTree.pyx":917 * distance = self.data[node_id].distance * if distance == 0 : distance += self.epsilon * for j,k in enumerate( self.np_buffer[:n] ) : # <<<<<<<<<<<<<< @@ -38334,16 +38023,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much * ajmatrix[ i,j ] = distance */ __pyx_t_16 = 0; - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_self->np_buffer, 0, __pyx_v_n, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_self->np_buffer, 0, __pyx_v_n, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_18 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 917, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -38352,28 +38041,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 895, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 917, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 895, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 917, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -38383,19 +38072,19 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 895, __pyx_L1_error) + else __PYX_ERR(0, 917, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_19 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_19 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_19 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_k = __pyx_t_19; __pyx_v_j = __pyx_t_16; __pyx_t_16 = (__pyx_t_16 + 1); - /* "MuchTree.pyx":896 + /* "MuchTree.pyx":918 * if distance == 0 : distance += self.epsilon * for j,k in enumerate( self.np_buffer[:n] ) : * if k == parent : # <<<<<<<<<<<<<< @@ -38405,57 +38094,57 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_t_1 = (__pyx_v_k == __pyx_v_parent); if (__pyx_t_1) { - /* "MuchTree.pyx":897 + /* "MuchTree.pyx":919 * for j,k in enumerate( self.np_buffer[:n] ) : * if k == parent : * ajmatrix[ i,j ] = distance # <<<<<<<<<<<<<< * ajmatrix[ j,i ] = distance * */ - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_j); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_j); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8)) __PYX_ERR(0, 919, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error); __pyx_t_8 = 0; __pyx_t_6 = 0; - if (unlikely((PyObject_SetItem(__pyx_v_ajmatrix, __pyx_t_9, __pyx_t_4) < 0))) __PYX_ERR(0, 897, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_ajmatrix, __pyx_t_9, __pyx_t_4) < 0))) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":898 + /* "MuchTree.pyx":920 * if k == parent : * ajmatrix[ i,j ] = distance * ajmatrix[ j,i ] = distance # <<<<<<<<<<<<<< * * return { 'adjacency_matrix' : ajmatrix, */ - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_unsigned_int(__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(0, 920, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error); __pyx_t_9 = 0; __pyx_t_6 = 0; - if (unlikely((PyObject_SetItem(__pyx_v_ajmatrix, __pyx_t_8, __pyx_t_4) < 0))) __PYX_ERR(0, 898, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_ajmatrix, __pyx_t_8, __pyx_t_4) < 0))) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":896 + /* "MuchTree.pyx":918 * if distance == 0 : distance += self.epsilon * for j,k in enumerate( self.np_buffer[:n] ) : * if k == parent : # <<<<<<<<<<<<<< @@ -38464,7 +38153,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":895 + /* "MuchTree.pyx":917 * distance = self.data[node_id].distance * if distance == 0 : distance += self.epsilon * for j,k in enumerate( self.np_buffer[:n] ) : # <<<<<<<<<<<<<< @@ -38476,7 +38165,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much __pyx_L13_continue:; } - /* "MuchTree.pyx":900 + /* "MuchTree.pyx":922 * ajmatrix[ j,i ] = distance * * return { 'adjacency_matrix' : ajmatrix, # <<<<<<<<<<<<<< @@ -38484,26 +38173,26 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_adjacency_matrix, __pyx_v_ajmatrix) < 0) __PYX_ERR(0, 900, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_adjacency_matrix, __pyx_v_ajmatrix) < 0) __PYX_ERR(0, 922, __pyx_L1_error) - /* "MuchTree.pyx":901 + /* "MuchTree.pyx":923 * * return { 'adjacency_matrix' : ajmatrix, * 'node_ids' : self.np_buffer[:n] } # <<<<<<<<<<<<<< * * def laplacian( self, int node=-1 ) : */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_self->np_buffer, 0, __pyx_v_n, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_self->np_buffer, 0, __pyx_v_n, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_node_ids, __pyx_t_4) < 0) __PYX_ERR(0, 900, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_node_ids, __pyx_t_4) < 0) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "MuchTree.pyx":852 + /* "MuchTree.pyx":874 * return col_ids * * def adjacency( self, int node=-1 ) : # <<<<<<<<<<<<<< @@ -38528,7 +38217,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_52adjacency(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":903 +/* "MuchTree.pyx":925 * 'node_ids' : self.np_buffer[:n] } * * def laplacian( self, int node=-1 ) : # <<<<<<<<<<<<<< @@ -38589,12 +38278,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_node); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "laplacian") < 0)) __PYX_ERR(0, 903, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "laplacian") < 0)) __PYX_ERR(0, 925, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -38605,14 +38294,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_node = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L3_error) + __pyx_v_node = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_node == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L3_error) } else { __pyx_v_node = ((int)-1); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("laplacian", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 903, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("laplacian", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 925, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38658,7 +38347,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("laplacian", 1); - /* "MuchTree.pyx":909 + /* "MuchTree.pyx":931 * subtree decendent from node. * ''' * if node == -1 : # <<<<<<<<<<<<<< @@ -38668,7 +38357,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __pyx_t_1 = (__pyx_v_node == -1L); if (__pyx_t_1) { - /* "MuchTree.pyx":910 + /* "MuchTree.pyx":932 * ''' * if node == -1 : * node = self.root # <<<<<<<<<<<<<< @@ -38678,7 +38367,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __pyx_t_2 = __pyx_v_self->root; __pyx_v_node = __pyx_t_2; - /* "MuchTree.pyx":909 + /* "MuchTree.pyx":931 * subtree decendent from node. * ''' * if node == -1 : # <<<<<<<<<<<<<< @@ -38687,26 +38376,26 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":912 + /* "MuchTree.pyx":934 * node = self.root * * aj, node_ids = self.adjacency( node=node ).values() # <<<<<<<<<<<<<< * lp = np.zeros( aj.shape ) * np.fill_diagonal( lp, aj.sum( axis=0 ) ) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjacency); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjacency); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_node, __pyx_t_6) < 0) __PYX_ERR(0, 912, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_node, __pyx_t_6) < 0) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -38727,7 +38416,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_2, 0+__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -38737,7 +38426,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 912, __pyx_L1_error) + __PYX_ERR(0, 934, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -38750,15 +38439,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -38766,7 +38455,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(0, 912, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(0, 934, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5_unpacking_done; @@ -38774,7 +38463,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 912, __pyx_L1_error) + __PYX_ERR(0, 934, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_aj = __pyx_t_5; @@ -38782,19 +38471,19 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __pyx_v_node_ids = __pyx_t_6; __pyx_t_6 = 0; - /* "MuchTree.pyx":913 + /* "MuchTree.pyx":935 * * aj, node_ids = self.adjacency( node=node ).values() * lp = np.zeros( aj.shape ) # <<<<<<<<<<<<<< * np.fill_diagonal( lp, aj.sum( axis=0 ) ) * lp = lp - aj */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 913, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_2 = 0; @@ -38815,31 +38504,31 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2); __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, 913, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_v_lp = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":914 + /* "MuchTree.pyx":936 * aj, node_ids = self.adjacency( node=node ).values() * lp = np.zeros( aj.shape ) * np.fill_diagonal( lp, aj.sum( axis=0 ) ) # <<<<<<<<<<<<<< * lp = lp - aj * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fill_diagonal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fill_diagonal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 914, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -38862,25 +38551,25 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_2, 2+__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __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; - /* "MuchTree.pyx":915 + /* "MuchTree.pyx":937 * lp = np.zeros( aj.shape ) * np.fill_diagonal( lp, aj.sum( axis=0 ) ) * lp = lp - aj # <<<<<<<<<<<<<< * * return { 'laplacian' : lp, */ - __pyx_t_3 = PyNumber_Subtract(__pyx_v_lp, __pyx_v_aj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_v_lp, __pyx_v_aj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_lp, __pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":917 + /* "MuchTree.pyx":939 * lp = lp - aj * * return { 'laplacian' : lp, # <<<<<<<<<<<<<< @@ -38888,23 +38577,23 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_laplacian, __pyx_v_lp) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_laplacian, __pyx_v_lp) < 0) __PYX_ERR(0, 939, __pyx_L1_error) - /* "MuchTree.pyx":918 + /* "MuchTree.pyx":940 * * return { 'laplacian' : lp, * 'node_ids' : node_ids } # <<<<<<<<<<<<<< * * def dump_array( self ) : */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_node_ids, __pyx_v_node_ids) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_node_ids, __pyx_v_node_ids) < 0) __PYX_ERR(0, 939, __pyx_L1_error) __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "MuchTree.pyx":903 + /* "MuchTree.pyx":925 * 'node_ids' : self.np_buffer[:n] } * * def laplacian( self, int node=-1 ) : # <<<<<<<<<<<<<< @@ -38930,7 +38619,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_54laplacian(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":920 +/* "MuchTree.pyx":942 * 'node_ids' : node_ids } * * def dump_array( self ) : # <<<<<<<<<<<<<< @@ -38995,16 +38684,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_array", 1); - /* "MuchTree.pyx":924 + /* "MuchTree.pyx":946 * Print the whole tree. (WARNING : may be huge and useless.) * ''' * for n in range(self.length) : # <<<<<<<<<<<<<< * print( 'id : %d ->' % n ) * print( ' distance : %0.3f' % self.data[n].distance ) */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -39012,9 +38701,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -39023,28 +38712,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 924, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 946, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 946, __pyx_L1_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 924, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 946, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 946, __pyx_L1_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -39054,7 +38743,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 924, __pyx_L1_error) + else __PYX_ERR(0, 946, __pyx_L1_error) } break; } @@ -39063,93 +38752,93 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":925 + /* "MuchTree.pyx":947 * ''' * for n in range(self.length) : * print( 'id : %d ->' % n ) # <<<<<<<<<<<<<< * print( ' distance : %0.3f' % self.data[n].distance ) * print( ' parent : %d' % self.data[n].parent ) */ - __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_id_d, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_id_d, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":926 + /* "MuchTree.pyx":948 * for n in range(self.length) : * print( 'id : %d ->' % n ) * print( ' distance : %0.3f' % self.data[n].distance ) # <<<<<<<<<<<<<< * print( ' parent : %d' % self.data[n].parent ) * print( ' left child : %d' % self.data[n].left_child ) */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L1_error) - __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->data[__pyx_t_6]).distance); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->data[__pyx_t_6]).distance); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_distance_0_3f, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_distance_0_3f, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":927 + /* "MuchTree.pyx":949 * print( 'id : %d ->' % n ) * print( ' distance : %0.3f' % self.data[n].distance ) * print( ' parent : %d' % self.data[n].parent ) # <<<<<<<<<<<<<< * print( ' left child : %d' % self.data[n].left_child ) * print( ' right child : %d' % self.data[n].right_child ) */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 927, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_6]).parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_6]).parent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_parent_d, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_parent_d, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":928 + /* "MuchTree.pyx":950 * print( ' distance : %0.3f' % self.data[n].distance ) * print( ' parent : %d' % self.data[n].parent ) * print( ' left child : %d' % self.data[n].left_child ) # <<<<<<<<<<<<<< * print( ' right child : %d' % self.data[n].right_child ) * */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 928, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_6]).left_child); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_6]).left_child); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_left_child_d, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_left_child_d, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":929 + /* "MuchTree.pyx":951 * print( ' parent : %d' % self.data[n].parent ) * print( ' left child : %d' % self.data[n].left_child ) * print( ' right child : %d' % self.data[n].right_child ) # <<<<<<<<<<<<<< * * def nodes_data( self ) : */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_6]).right_child); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->data[__pyx_t_6]).right_child); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_right_child_d, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_right_child_d, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":924 + /* "MuchTree.pyx":946 * Print the whole tree. (WARNING : may be huge and useless.) * ''' * for n in range(self.length) : # <<<<<<<<<<<<<< @@ -39159,7 +38848,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":920 + /* "MuchTree.pyx":942 * 'node_ids' : node_ids } * * def dump_array( self ) : # <<<<<<<<<<<<<< @@ -39184,7 +38873,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_56dump_array(struct __pyx_obj_8Muc } static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "MuchTree.pyx":931 +/* "MuchTree.pyx":953 * print( ' right child : %d' % self.data[n].right_child ) * * def nodes_data( self ) : # <<<<<<<<<<<<<< @@ -39246,7 +38935,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_58nodes_data(struct __pyx_obj_8Muc if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8MuchTree___pyx_scope_struct_7_nodes_data *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 931, __pyx_L1_error) + __PYX_ERR(0, 953, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -39254,7 +38943,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_58nodes_data(struct __pyx_obj_8Muc __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8MuchTree_8SuchTree_60generator4, __pyx_codeobj__19, (PyObject *) __pyx_cur_scope, __pyx_n_s_nodes_data, __pyx_n_s_SuchTree_nodes_data, __pyx_n_s_MuchTree); if (unlikely(!gen)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8MuchTree_8SuchTree_60generator4, __pyx_codeobj__19, (PyObject *) __pyx_cur_scope, __pyx_n_s_nodes_data, __pyx_n_s_SuchTree_nodes_data, __pyx_n_s_MuchTree); if (unlikely(!gen)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -39294,9 +38983,9 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 931, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 953, __pyx_L1_error) - /* "MuchTree.pyx":935 + /* "MuchTree.pyx":957 * Generator for the node data in the tree, compatible with networkx. * ''' * for n in range(self.length) : # <<<<<<<<<<<<<< @@ -39308,7 +38997,7 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_n = __pyx_t_3; - /* "MuchTree.pyx":936 + /* "MuchTree.pyx":958 * ''' * for n in range(self.length) : * if self.data[n].left_child == -1 : # <<<<<<<<<<<<<< @@ -39318,21 +39007,21 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject __pyx_t_4 = ((__pyx_cur_scope->__pyx_v_self->data[__pyx_cur_scope->__pyx_v_n]).left_child == -1L); if (__pyx_t_4) { - /* "MuchTree.pyx":937 + /* "MuchTree.pyx":959 * for n in range(self.length) : * if self.data[n].left_child == -1 : * leaf_name = self.leafnodes[n] # <<<<<<<<<<<<<< * else : * leaf_name = '' */ - __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_self->leafnodes, __pyx_cur_scope->__pyx_v_n, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_self->leafnodes, __pyx_cur_scope->__pyx_v_n, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_leaf_name); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_leaf_name, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":936 + /* "MuchTree.pyx":958 * ''' * for n in range(self.length) : * if self.data[n].left_child == -1 : # <<<<<<<<<<<<<< @@ -39342,7 +39031,7 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject goto __pyx_L6; } - /* "MuchTree.pyx":939 + /* "MuchTree.pyx":961 * leaf_name = self.leafnodes[n] * else : * leaf_name = '' # <<<<<<<<<<<<<< @@ -39357,24 +39046,24 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject } __pyx_L6:; - /* "MuchTree.pyx":940 + /* "MuchTree.pyx":962 * else : * leaf_name = '' * yield ( n, { 'label' : leaf_name } ) # <<<<<<<<<<<<<< * * def edges_data( self ) : */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 940, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_label, __pyx_cur_scope->__pyx_v_leaf_name) < 0) __PYX_ERR(0, 940, __pyx_L1_error) - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 940, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_label, __pyx_cur_scope->__pyx_v_leaf_name) < 0) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)) __PYX_ERR(0, 940, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_r = __pyx_t_7; @@ -39392,11 +39081,11 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 940, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 962, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "MuchTree.pyx":931 + /* "MuchTree.pyx":953 * print( ' right child : %d' % self.data[n].right_child ) * * def nodes_data( self ) : # <<<<<<<<<<<<<< @@ -39425,7 +39114,7 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_60generator4(__pyx_CoroutineObject } static PyObject *__pyx_gb_8MuchTree_8SuchTree_63generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "MuchTree.pyx":942 +/* "MuchTree.pyx":964 * yield ( n, { 'label' : leaf_name } ) * * def edges_data( self ) : # <<<<<<<<<<<<<< @@ -39487,7 +39176,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_61edges_data(struct __pyx_obj_8Muc if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8MuchTree___pyx_scope_struct_8_edges_data *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 942, __pyx_L1_error) + __PYX_ERR(0, 964, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -39495,7 +39184,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_61edges_data(struct __pyx_obj_8Muc __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8MuchTree_8SuchTree_63generator5, __pyx_codeobj__21, (PyObject *) __pyx_cur_scope, __pyx_n_s_edges_data, __pyx_n_s_SuchTree_edges_data, __pyx_n_s_MuchTree); if (unlikely(!gen)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8MuchTree_8SuchTree_63generator5, __pyx_codeobj__21, (PyObject *) __pyx_cur_scope, __pyx_n_s_edges_data, __pyx_n_s_SuchTree_edges_data, __pyx_n_s_MuchTree); if (unlikely(!gen)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -39536,9 +39225,9 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_63generator5(__pyx_CoroutineObject return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 942, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 964, __pyx_L1_error) - /* "MuchTree.pyx":946 + /* "MuchTree.pyx":968 * Generator for the edge (i.e. branch) data in the tree, compatible with networkx. * ''' * for n in range(self.length) : # <<<<<<<<<<<<<< @@ -39550,7 +39239,7 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_63generator5(__pyx_CoroutineObject for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_n = __pyx_t_3; - /* "MuchTree.pyx":948 + /* "MuchTree.pyx":970 * for n in range(self.length) : * # no edges beyond the root node * if self.data[n].parent == -1 : continue # <<<<<<<<<<<<<< @@ -39562,31 +39251,31 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_63generator5(__pyx_CoroutineObject goto __pyx_L4_continue; } - /* "MuchTree.pyx":949 + /* "MuchTree.pyx":971 * # no edges beyond the root node * if self.data[n].parent == -1 : continue * yield ( n, self.data[n].parent, { 'weight' : self.data[n].distance } ) # <<<<<<<<<<<<<< * * def relationships( self ) : */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_cur_scope->__pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_cur_scope->__pyx_v_self->data[__pyx_cur_scope->__pyx_v_n]).parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_cur_scope->__pyx_v_self->data[__pyx_cur_scope->__pyx_v_n]).parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_self->data[__pyx_cur_scope->__pyx_v_n]).distance); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_self->data[__pyx_cur_scope->__pyx_v_n]).distance); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_weight, __pyx_t_8) < 0) __PYX_ERR(0, 949, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_weight, __pyx_t_8) < 0) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 949, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 949, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 949, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(0, 971, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; @@ -39605,12 +39294,12 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_63generator5(__pyx_CoroutineObject __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 949, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 971, __pyx_L1_error) __pyx_L4_continue:; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "MuchTree.pyx":942 + /* "MuchTree.pyx":964 * yield ( n, { 'label' : leaf_name } ) * * def edges_data( self ) : # <<<<<<<<<<<<<< @@ -39639,7 +39328,7 @@ static PyObject *__pyx_gb_8MuchTree_8SuchTree_63generator5(__pyx_CoroutineObject return __pyx_r; } -/* "MuchTree.pyx":951 +/* "MuchTree.pyx":973 * yield ( n, self.data[n].parent, { 'weight' : self.data[n].distance } ) * * def relationships( self ) : # <<<<<<<<<<<<<< @@ -39726,7 +39415,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("relationships", 1); - /* "MuchTree.pyx":955 + /* "MuchTree.pyx":977 * Return a Pandas DataFrame of describing the relationships among leafs in the tree. * ''' * pairs = [ sample([a,b],2) for a,b, in combinations( self.leafs.keys(), 2 ) ] # <<<<<<<<<<<<<< @@ -39734,11 +39423,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * mrca = [ self.mrca( a, b ) for a,b in pairs ] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_combinations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_combinations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->leafs, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->leafs, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -39758,7 +39447,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -39781,7 +39470,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L5_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -39790,9 +39479,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 977, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -39801,28 +39490,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 955, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 977, __pyx_L5_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 977, __pyx_L5_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 955, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 977, __pyx_L5_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 977, __pyx_L5_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -39832,7 +39521,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 955, __pyx_L5_error) + else __PYX_ERR(0, 977, __pyx_L5_error) } break; } @@ -39844,7 +39533,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 955, __pyx_L5_error) + __PYX_ERR(0, 977, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -39857,15 +39546,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -39873,7 +39562,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 955, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 977, __pyx_L5_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_unpacking_done; @@ -39881,23 +39570,23 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 955, __pyx_L5_error) + __PYX_ERR(0, 977, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_a, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_b, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sample); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sample); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L5_error) + __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_8genexpr8__pyx_v_a); __Pyx_GIVEREF(__pyx_8genexpr8__pyx_v_a); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_8genexpr8__pyx_v_a)) __PYX_ERR(0, 955, __pyx_L5_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_8genexpr8__pyx_v_a)) __PYX_ERR(0, 977, __pyx_L5_error); __Pyx_INCREF(__pyx_8genexpr8__pyx_v_b); __Pyx_GIVEREF(__pyx_8genexpr8__pyx_v_b); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_8genexpr8__pyx_v_b)) __PYX_ERR(0, 955, __pyx_L5_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_8genexpr8__pyx_v_b)) __PYX_ERR(0, 977, __pyx_L5_error); __pyx_t_6 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS @@ -39917,11 +39606,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L5_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 955, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 977, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -39937,14 +39626,14 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_pairs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":956 + /* "MuchTree.pyx":978 * ''' * pairs = [ sample([a,b],2) for a,b, in combinations( self.leafs.keys(), 2 ) ] * distances = self.distances_by_name( pairs ) # <<<<<<<<<<<<<< * mrca = [ self.mrca( a, b ) for a,b in pairs ] * mrca_to_root = [ self.get_distance_to_root(m) for m in mrca ] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distances_by_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_distances_by_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_7 = 0; @@ -39964,14 +39653,14 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_pairs}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_distances = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":957 + /* "MuchTree.pyx":979 * pairs = [ sample([a,b],2) for a,b, in combinations( self.leafs.keys(), 2 ) ] * distances = self.distances_by_name( pairs ) * mrca = [ self.mrca( a, b ) for a,b in pairs ] # <<<<<<<<<<<<<< @@ -39979,7 +39668,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * a_to_root = [ self.get_distance_to_root(a) for a in list( zip( *pairs ) )[0] ] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_pairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; @@ -39987,14 +39676,14 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 957, __pyx_L14_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 979, __pyx_L14_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 979, __pyx_L14_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_2); #endif if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -40003,7 +39692,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 957, __pyx_L14_error) + __PYX_ERR(0, 979, __pyx_L14_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40016,15 +39705,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -40032,7 +39721,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 957, __pyx_L14_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 979, __pyx_L14_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L18_unpacking_done; @@ -40040,14 +39729,14 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 957, __pyx_L14_error) + __PYX_ERR(0, 979, __pyx_L14_error) __pyx_L18_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_a, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_b, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mrca); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L14_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mrca); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -40067,11 +39756,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_8genexpr9__pyx_v_a, __pyx_8genexpr9__pyx_v_b}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L14_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 957, __pyx_L14_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 979, __pyx_L14_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40087,7 +39776,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_mrca = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":958 + /* "MuchTree.pyx":980 * distances = self.distances_by_name( pairs ) * mrca = [ self.mrca( a, b ) for a,b in pairs ] * mrca_to_root = [ self.get_distance_to_root(m) for m in mrca ] # <<<<<<<<<<<<<< @@ -40095,7 +39784,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * b_to_root = [ self.get_distance_to_root(b) for b in list( zip( *pairs ) )[1] ] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L23_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_mrca; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; @@ -40103,19 +39792,19 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 958, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 980, __pyx_L23_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 958, __pyx_L23_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 980, __pyx_L23_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L23_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_m, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_distance_to_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L23_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_distance_to_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -40135,11 +39824,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_9genexpr10__pyx_v_m}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L23_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 958, __pyx_L23_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 980, __pyx_L23_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40153,7 +39842,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_mrca_to_root = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":959 + /* "MuchTree.pyx":981 * mrca = [ self.mrca( a, b ) for a,b in pairs ] * mrca_to_root = [ self.get_distance_to_root(m) for m in mrca ] * a_to_root = [ self.get_distance_to_root(a) for a in list( zip( *pairs ) )[0] ] # <<<<<<<<<<<<<< @@ -40161,17 +39850,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * a_to_mrca = [ a2r-a2m for a2r,a2m in zip( a_to_root, mrca_to_root ) ] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_3 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -40179,9 +39868,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 981, __pyx_L30_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -40190,28 +39879,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 959, __pyx_L30_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 981, __pyx_L30_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 981, __pyx_L30_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 959, __pyx_L30_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 981, __pyx_L30_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 981, __pyx_L30_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -40221,7 +39910,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 959, __pyx_L30_error) + else __PYX_ERR(0, 981, __pyx_L30_error) } break; } @@ -40229,7 +39918,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 } __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_a, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_distance_to_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L30_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_distance_to_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -40249,11 +39938,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_9genexpr11__pyx_v_a}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L30_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 959, __pyx_L30_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 981, __pyx_L30_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40267,7 +39956,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_a_to_root = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":960 + /* "MuchTree.pyx":982 * mrca_to_root = [ self.get_distance_to_root(m) for m in mrca ] * a_to_root = [ self.get_distance_to_root(a) for a in list( zip( *pairs ) )[0] ] * b_to_root = [ self.get_distance_to_root(b) for b in list( zip( *pairs ) )[1] ] # <<<<<<<<<<<<<< @@ -40275,17 +39964,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * b_to_mrca = [ b2r-b2m for b2r,b2m in zip( b_to_root, mrca_to_root ) ] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_3 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -40293,9 +39982,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L37_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -40304,28 +39993,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 960, __pyx_L37_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 982, __pyx_L37_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 982, __pyx_L37_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 960, __pyx_L37_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 982, __pyx_L37_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 982, __pyx_L37_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -40335,7 +40024,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 960, __pyx_L37_error) + else __PYX_ERR(0, 982, __pyx_L37_error) } break; } @@ -40343,7 +40032,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 } __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_b, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_distance_to_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 960, __pyx_L37_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_distance_to_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -40363,11 +40052,11 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_9genexpr12__pyx_v_b}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L37_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 960, __pyx_L37_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 982, __pyx_L37_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40381,7 +40070,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_b_to_root = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":961 + /* "MuchTree.pyx":983 * a_to_root = [ self.get_distance_to_root(a) for a in list( zip( *pairs ) )[0] ] * b_to_root = [ self.get_distance_to_root(b) for b in list( zip( *pairs ) )[1] ] * a_to_mrca = [ a2r-a2m for a2r,a2m in zip( a_to_root, mrca_to_root ) ] # <<<<<<<<<<<<<< @@ -40389,17 +40078,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_a_to_root); __Pyx_GIVEREF(__pyx_v_a_to_root); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_a_to_root)) __PYX_ERR(0, 961, __pyx_L44_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_a_to_root)) __PYX_ERR(0, 983, __pyx_L44_error); __Pyx_INCREF(__pyx_v_mrca_to_root); __Pyx_GIVEREF(__pyx_v_mrca_to_root); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mrca_to_root)) __PYX_ERR(0, 961, __pyx_L44_error); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L44_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mrca_to_root)) __PYX_ERR(0, 983, __pyx_L44_error); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -40407,9 +40096,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 983, __pyx_L44_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -40418,28 +40107,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L44_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 983, __pyx_L44_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 983, __pyx_L44_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L44_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 983, __pyx_L44_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 983, __pyx_L44_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -40449,7 +40138,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 961, __pyx_L44_error) + else __PYX_ERR(0, 983, __pyx_L44_error) } break; } @@ -40461,7 +40150,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 961, __pyx_L44_error) + __PYX_ERR(0, 983, __pyx_L44_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40474,15 +40163,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -40490,7 +40179,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L47_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 961, __pyx_L44_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 983, __pyx_L44_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L48_unpacking_done; @@ -40498,16 +40187,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 961, __pyx_L44_error) + __PYX_ERR(0, 983, __pyx_L44_error) __pyx_L48_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_a2r, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_a2m, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_9genexpr13__pyx_v_a2r, __pyx_9genexpr13__pyx_v_a2m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L44_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_9genexpr13__pyx_v_a2r, __pyx_9genexpr13__pyx_v_a2m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 961, __pyx_L44_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 983, __pyx_L44_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40523,7 +40212,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_a_to_mrca = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":962 + /* "MuchTree.pyx":984 * b_to_root = [ self.get_distance_to_root(b) for b in list( zip( *pairs ) )[1] ] * a_to_mrca = [ a2r-a2m for a2r,a2m in zip( a_to_root, mrca_to_root ) ] * b_to_mrca = [ b2r-b2m for b2r,b2m in zip( b_to_root, mrca_to_root ) ] # <<<<<<<<<<<<<< @@ -40531,17 +40220,17 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * return pd.DataFrame( { 'a' : list( zip( *pairs ) )[0], */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_b_to_root); __Pyx_GIVEREF(__pyx_v_b_to_root); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_b_to_root)) __PYX_ERR(0, 962, __pyx_L53_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_b_to_root)) __PYX_ERR(0, 984, __pyx_L53_error); __Pyx_INCREF(__pyx_v_mrca_to_root); __Pyx_GIVEREF(__pyx_v_mrca_to_root); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mrca_to_root)) __PYX_ERR(0, 962, __pyx_L53_error); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L53_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mrca_to_root)) __PYX_ERR(0, 984, __pyx_L53_error); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -40549,9 +40238,9 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 984, __pyx_L53_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -40560,28 +40249,28 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 962, __pyx_L53_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 984, __pyx_L53_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 984, __pyx_L53_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 962, __pyx_L53_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 984, __pyx_L53_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 984, __pyx_L53_error) #else - __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -40591,7 +40280,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 962, __pyx_L53_error) + else __PYX_ERR(0, 984, __pyx_L53_error) } break; } @@ -40603,7 +40292,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 962, __pyx_L53_error) + __PYX_ERR(0, 984, __pyx_L53_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40616,15 +40305,15 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -40632,7 +40321,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L56_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 962, __pyx_L53_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_6), 2) < 0) __PYX_ERR(0, 984, __pyx_L53_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L57_unpacking_done; @@ -40640,16 +40329,16 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 962, __pyx_L53_error) + __PYX_ERR(0, 984, __pyx_L53_error) __pyx_L57_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_b2r, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_b2m, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_9genexpr14__pyx_v_b2r, __pyx_9genexpr14__pyx_v_b2m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L53_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_9genexpr14__pyx_v_b2r, __pyx_9genexpr14__pyx_v_b2m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 962, __pyx_L53_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 984, __pyx_L53_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -40665,7 +40354,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_v_b_to_mrca = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":964 + /* "MuchTree.pyx":986 * b_to_mrca = [ b2r-b2m for b2r,b2m in zip( b_to_root, mrca_to_root ) ] * * return pd.DataFrame( { 'a' : list( zip( *pairs ) )[0], # <<<<<<<<<<<<<< @@ -40673,110 +40362,110 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 * 'distance' : distances, */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_4 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a, __pyx_t_5) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a, __pyx_t_5) < 0) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":965 + /* "MuchTree.pyx":987 * * return pd.DataFrame( { 'a' : list( zip( *pairs ) )[0], * 'b' : list( zip( *pairs ) )[1], # <<<<<<<<<<<<<< * 'distance' : distances, * 'a_to_root' : a_to_root, */ - __pyx_t_5 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_5 = PySequence_Tuple(__pyx_v_pairs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_b, __pyx_t_4) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_b, __pyx_t_4) < 0) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":966 + /* "MuchTree.pyx":988 * return pd.DataFrame( { 'a' : list( zip( *pairs ) )[0], * 'b' : list( zip( *pairs ) )[1], * 'distance' : distances, # <<<<<<<<<<<<<< * 'a_to_root' : a_to_root, * 'b_to_root' : b_to_root, */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_distance, __pyx_v_distances) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_distance, __pyx_v_distances) < 0) __PYX_ERR(0, 986, __pyx_L1_error) - /* "MuchTree.pyx":967 + /* "MuchTree.pyx":989 * 'b' : list( zip( *pairs ) )[1], * 'distance' : distances, * 'a_to_root' : a_to_root, # <<<<<<<<<<<<<< * 'b_to_root' : b_to_root, * 'mrca' : mrca, */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a_to_root, __pyx_v_a_to_root) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a_to_root, __pyx_v_a_to_root) < 0) __PYX_ERR(0, 986, __pyx_L1_error) - /* "MuchTree.pyx":968 + /* "MuchTree.pyx":990 * 'distance' : distances, * 'a_to_root' : a_to_root, * 'b_to_root' : b_to_root, # <<<<<<<<<<<<<< * 'mrca' : mrca, * 'mrca_to_root' : mrca_to_root, */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_b_to_root, __pyx_v_b_to_root) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_b_to_root, __pyx_v_b_to_root) < 0) __PYX_ERR(0, 986, __pyx_L1_error) - /* "MuchTree.pyx":969 + /* "MuchTree.pyx":991 * 'a_to_root' : a_to_root, * 'b_to_root' : b_to_root, * 'mrca' : mrca, # <<<<<<<<<<<<<< * 'mrca_to_root' : mrca_to_root, * 'a_to_mrca' : a_to_mrca, */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_mrca, __pyx_v_mrca) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_mrca, __pyx_v_mrca) < 0) __PYX_ERR(0, 986, __pyx_L1_error) - /* "MuchTree.pyx":970 + /* "MuchTree.pyx":992 * 'b_to_root' : b_to_root, * 'mrca' : mrca, * 'mrca_to_root' : mrca_to_root, # <<<<<<<<<<<<<< * 'a_to_mrca' : a_to_mrca, * 'b_to_mrca' : b_to_mrca } ) */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_mrca_to_root, __pyx_v_mrca_to_root) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_mrca_to_root, __pyx_v_mrca_to_root) < 0) __PYX_ERR(0, 986, __pyx_L1_error) - /* "MuchTree.pyx":971 + /* "MuchTree.pyx":993 * 'mrca' : mrca, * 'mrca_to_root' : mrca_to_root, * 'a_to_mrca' : a_to_mrca, # <<<<<<<<<<<<<< * 'b_to_mrca' : b_to_mrca } ) * */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a_to_mrca, __pyx_v_a_to_mrca) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_a_to_mrca, __pyx_v_a_to_mrca) < 0) __PYX_ERR(0, 986, __pyx_L1_error) - /* "MuchTree.pyx":972 + /* "MuchTree.pyx":994 * 'mrca_to_root' : mrca_to_root, * 'a_to_mrca' : a_to_mrca, * 'b_to_mrca' : b_to_mrca } ) # <<<<<<<<<<<<<< * * def __dealloc__( self ) : */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_b_to_mrca, __pyx_v_b_to_mrca) < 0) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_b_to_mrca, __pyx_v_b_to_mrca) < 0) __PYX_ERR(0, 986, __pyx_L1_error) __pyx_t_4 = NULL; __pyx_t_7 = 0; #if CYTHON_UNPACK_METHODS @@ -40796,7 +40485,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __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, 964, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -40804,7 +40493,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":951 + /* "MuchTree.pyx":973 * yield ( n, self.data[n].parent, { 'weight' : self.data[n].distance } ) * * def relationships( self ) : # <<<<<<<<<<<<<< @@ -40847,7 +40536,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_64relationships(struct __pyx_obj_8 return __pyx_r; } -/* "MuchTree.pyx":974 +/* "MuchTree.pyx":996 * 'b_to_mrca' : b_to_mrca } ) * * def __dealloc__( self ) : # <<<<<<<<<<<<<< @@ -40870,7 +40559,7 @@ static void __pyx_pw_8MuchTree_8SuchTree_67__dealloc__(PyObject *__pyx_v_self) { static void __pyx_pf_8MuchTree_8SuchTree_66__dealloc__(struct __pyx_obj_8MuchTree_SuchTree *__pyx_v_self) { - /* "MuchTree.pyx":975 + /* "MuchTree.pyx":997 * * def __dealloc__( self ) : * PyMem_Free( self.data ) # no-op if self.data is NULL # <<<<<<<<<<<<<< @@ -40879,7 +40568,7 @@ static void __pyx_pf_8MuchTree_8SuchTree_66__dealloc__(struct __pyx_obj_8MuchTre */ PyMem_Free(__pyx_v_self->data); - /* "MuchTree.pyx":974 + /* "MuchTree.pyx":996 * 'b_to_mrca' : b_to_mrca } ) * * def __dealloc__( self ) : # <<<<<<<<<<<<<< @@ -41104,7 +40793,7 @@ static PyObject *__pyx_pf_8MuchTree_8SuchTree_70__setstate_cython__(CYTHON_UNUSE return __pyx_r; } -/* "MuchTree.pyx":1020 +/* "MuchTree.pyx":1042 * cdef uint64_t modulus * * def __cinit__( self, tree_a, tree_b, link_matrix ) : # <<<<<<<<<<<<<< @@ -41154,7 +40843,7 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_1__cinit__(PyObject *__pyx_v_sel (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -41162,9 +40851,9 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_1__cinit__(PyObject *__pyx_v_sel (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 1020, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 1042, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -41172,14 +40861,14 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_1__cinit__(PyObject *__pyx_v_sel (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 1020, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 1042, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1020, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1042, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -41194,7 +40883,7 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_1__cinit__(PyObject *__pyx_v_sel } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1020, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1042, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41238,23 +40927,23 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 1); - /* "MuchTree.pyx":1022 + /* "MuchTree.pyx":1044 * def __cinit__( self, tree_a, tree_b, link_matrix ) : * cdef unsigned int i * self.table_size = link_matrix.shape[1] # <<<<<<<<<<<<<< * self.table = PyMem_Malloc( self.table_size * sizeof( Column ) ) * for i in xrange( self.table_size ) : */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->table_size = __pyx_t_3; - /* "MuchTree.pyx":1023 + /* "MuchTree.pyx":1045 * cdef unsigned int i * self.table_size = link_matrix.shape[1] * self.table = PyMem_Malloc( self.table_size * sizeof( Column ) ) # <<<<<<<<<<<<<< @@ -41263,7 +40952,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much */ __pyx_v_self->table = ((struct __pyx_t_8MuchTree_Column *)PyMem_Malloc((__pyx_v_self->table_size * (sizeof(struct __pyx_t_8MuchTree_Column))))); - /* "MuchTree.pyx":1024 + /* "MuchTree.pyx":1046 * self.table_size = link_matrix.shape[1] * self.table = PyMem_Malloc( self.table_size * sizeof( Column ) ) * for i in xrange( self.table_size ) : # <<<<<<<<<<<<<< @@ -41275,7 +40964,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "MuchTree.pyx":1025 + /* "MuchTree.pyx":1047 * self.table = PyMem_Malloc( self.table_size * sizeof( Column ) ) * for i in xrange( self.table_size ) : * self.table[i].length = 0 # <<<<<<<<<<<<<< @@ -41284,7 +40973,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much */ (__pyx_v_self->table[__pyx_v_i]).length = 0; - /* "MuchTree.pyx":1026 + /* "MuchTree.pyx":1048 * for i in xrange( self.table_size ) : * self.table[i].length = 0 * self.table[i].leaf_id = 0 # <<<<<<<<<<<<<< @@ -41293,7 +40982,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much */ (__pyx_v_self->table[__pyx_v_i]).leaf_id = 0; - /* "MuchTree.pyx":1027 + /* "MuchTree.pyx":1049 * self.table[i].length = 0 * self.table[i].leaf_id = 0 * self.table[i].links = NULL # <<<<<<<<<<<<<< @@ -41303,22 +40992,22 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much (__pyx_v_self->table[__pyx_v_i]).links = NULL; } - /* "MuchTree.pyx":1030 + /* "MuchTree.pyx":1052 * * # initialize random number generator * self.seed = np.random.randint( UINT64_MAX >> 1 ) # <<<<<<<<<<<<<< * self.modulus = 2685821657736338717 * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_random); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_random); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_randint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_randint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_uint64_t((UINT64_MAX >> 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_uint64_t((UINT64_MAX >> 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; __pyx_t_3 = 0; @@ -41339,15 +41028,15 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->seed = __pyx_t_8; - /* "MuchTree.pyx":1031 + /* "MuchTree.pyx":1053 * # initialize random number generator * self.seed = np.random.randint( UINT64_MAX >> 1 ) * self.modulus = 2685821657736338717 # <<<<<<<<<<<<<< @@ -41356,7 +41045,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much */ __pyx_v_self->modulus = 0x2545F4914F6CDD1D; - /* "MuchTree.pyx":1020 + /* "MuchTree.pyx":1042 * cdef uint64_t modulus * * def __cinit__( self, tree_a, tree_b, link_matrix ) : # <<<<<<<<<<<<<< @@ -41379,7 +41068,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees___cinit__(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":1033 +/* "MuchTree.pyx":1055 * self.modulus = 2685821657736338717 * * def __init__( self, tree_a, tree_b, link_matrix ) : # <<<<<<<<<<<<<< @@ -41429,7 +41118,7 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_3__init__(PyObject *__pyx_v_self (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -41437,9 +41126,9 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_3__init__(PyObject *__pyx_v_self (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1033, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1055, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -41447,14 +41136,14 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_3__init__(PyObject *__pyx_v_self (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1033, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1055, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1033, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1055, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -41469,7 +41158,7 @@ static int __pyx_pw_8MuchTree_15SuchLinkedTrees_3__init__(PyObject *__pyx_v_self } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1033, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1055, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41533,7 +41222,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "MuchTree.pyx":1036 + /* "MuchTree.pyx":1058 * * # these objects are constructed only when first accessed * self.np_table = None # <<<<<<<<<<<<<< @@ -41546,7 +41235,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->np_table); __pyx_v_self->np_table = Py_None; - /* "MuchTree.pyx":1037 + /* "MuchTree.pyx":1059 * # these objects are constructed only when first accessed * self.np_table = None * self.np_linklist = None # <<<<<<<<<<<<<< @@ -41559,7 +41248,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->np_linklist); __pyx_v_self->np_linklist = Py_None; - /* "MuchTree.pyx":1038 + /* "MuchTree.pyx":1060 * self.np_table = None * self.np_linklist = None * self.linked_leafsA = None # <<<<<<<<<<<<<< @@ -41572,7 +41261,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->linked_leafsA); __pyx_v_self->linked_leafsA = Py_None; - /* "MuchTree.pyx":1039 + /* "MuchTree.pyx":1061 * self.np_linklist = None * self.linked_leafsA = None * self.linked_leafsB = None # <<<<<<<<<<<<<< @@ -41585,7 +41274,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->linked_leafsB); __pyx_v_self->linked_leafsB = Py_None; - /* "MuchTree.pyx":1040 + /* "MuchTree.pyx":1062 * self.linked_leafsA = None * self.linked_leafsB = None * self.col_ids = None # <<<<<<<<<<<<<< @@ -41598,7 +41287,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->col_ids); __pyx_v_self->col_ids = Py_None; - /* "MuchTree.pyx":1041 + /* "MuchTree.pyx":1063 * self.linked_leafsB = None * self.col_ids = None * self.row_ids = None # <<<<<<<<<<<<<< @@ -41611,7 +41300,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->row_ids); __pyx_v_self->row_ids = Py_None; - /* "MuchTree.pyx":1042 + /* "MuchTree.pyx":1064 * self.col_ids = None * self.row_ids = None * self.col_names = None # <<<<<<<<<<<<<< @@ -41624,7 +41313,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->col_names); __pyx_v_self->col_names = Py_None; - /* "MuchTree.pyx":1043 + /* "MuchTree.pyx":1065 * self.row_ids = None * self.col_names = None * self.row_names = None # <<<<<<<<<<<<<< @@ -41637,7 +41326,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->row_names); __pyx_v_self->row_names = Py_None; - /* "MuchTree.pyx":1044 + /* "MuchTree.pyx":1066 * self.col_names = None * self.row_names = None * self.subset_columns = None # <<<<<<<<<<<<<< @@ -41650,7 +41339,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->subset_columns); __pyx_v_self->subset_columns = Py_None; - /* "MuchTree.pyx":1045 + /* "MuchTree.pyx":1067 * self.row_names = None * self.subset_columns = None * self.subset_a_leafs = None # <<<<<<<<<<<<<< @@ -41663,7 +41352,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->subset_a_leafs); __pyx_v_self->subset_a_leafs = Py_None; - /* "MuchTree.pyx":1046 + /* "MuchTree.pyx":1068 * self.subset_columns = None * self.subset_a_leafs = None * self.subset_b_leafs = None # <<<<<<<<<<<<<< @@ -41676,7 +41365,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->subset_b_leafs); __pyx_v_self->subset_b_leafs = Py_None; - /* "MuchTree.pyx":1047 + /* "MuchTree.pyx":1069 * self.subset_a_leafs = None * self.subset_b_leafs = None * self.row_map = None # <<<<<<<<<<<<<< @@ -41689,7 +41378,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->row_map); __pyx_v_self->row_map = Py_None; - /* "MuchTree.pyx":1051 + /* "MuchTree.pyx":1073 * # build trees from newick files, URLs to newick files or * # from existing SuchTrees * if isinstance( tree_a, basestring ): # <<<<<<<<<<<<<< @@ -41699,14 +41388,14 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_tree_a); if (__pyx_t_1) { - /* "MuchTree.pyx":1052 + /* "MuchTree.pyx":1074 * # from existing SuchTrees * if isinstance( tree_a, basestring ): * self.TreeA = SuchTree( tree_a ) # <<<<<<<<<<<<<< * elif type( tree_a ) == SuchTree : * self.TreeA = tree_a */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8MuchTree_SuchTree), __pyx_v_tree_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8MuchTree_SuchTree), __pyx_v_tree_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->TreeA); @@ -41714,7 +41403,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->TreeA = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1051 + /* "MuchTree.pyx":1073 * # build trees from newick files, URLs to newick files or * # from existing SuchTrees * if isinstance( tree_a, basestring ): # <<<<<<<<<<<<<< @@ -41724,19 +41413,19 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much goto __pyx_L3; } - /* "MuchTree.pyx":1053 + /* "MuchTree.pyx":1075 * if isinstance( tree_a, basestring ): * self.TreeA = SuchTree( tree_a ) * elif type( tree_a ) == SuchTree : # <<<<<<<<<<<<<< * self.TreeA = tree_a * else : */ - __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_tree_a)), ((PyObject *)__pyx_ptype_8MuchTree_SuchTree), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1053, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_tree_a)), ((PyObject *)__pyx_ptype_8MuchTree_SuchTree), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(__pyx_t_1)) { - /* "MuchTree.pyx":1054 + /* "MuchTree.pyx":1076 * self.TreeA = SuchTree( tree_a ) * elif type( tree_a ) == SuchTree : * self.TreeA = tree_a # <<<<<<<<<<<<<< @@ -41749,7 +41438,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->TreeA); __pyx_v_self->TreeA = __pyx_v_tree_a; - /* "MuchTree.pyx":1053 + /* "MuchTree.pyx":1075 * if isinstance( tree_a, basestring ): * self.TreeA = SuchTree( tree_a ) * elif type( tree_a ) == SuchTree : # <<<<<<<<<<<<<< @@ -41759,7 +41448,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much goto __pyx_L3; } - /* "MuchTree.pyx":1056 + /* "MuchTree.pyx":1078 * self.TreeA = tree_a * else : * raise Exception( 'unknown input for tree', type(tree_a) ) # <<<<<<<<<<<<<< @@ -41767,24 +41456,24 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much * # build trees from newick files, URLs to newick files or */ /*else*/ { - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u_unknown_input_for_tree); __Pyx_GIVEREF(__pyx_kp_u_unknown_input_for_tree); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_unknown_input_for_tree)) __PYX_ERR(0, 1056, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_unknown_input_for_tree)) __PYX_ERR(0, 1078, __pyx_L1_error); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_tree_a))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_tree_a))); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)Py_TYPE(__pyx_v_tree_a)))) __PYX_ERR(0, 1056, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)Py_TYPE(__pyx_v_tree_a)))) __PYX_ERR(0, 1078, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1056, __pyx_L1_error) + __PYX_ERR(0, 1078, __pyx_L1_error) } __pyx_L3:; - /* "MuchTree.pyx":1060 + /* "MuchTree.pyx":1082 * # build trees from newick files, URLs to newick files or * # from existing SuchTrees * if isinstance( tree_b, basestring ): # <<<<<<<<<<<<<< @@ -41794,14 +41483,14 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_tree_b); if (__pyx_t_1) { - /* "MuchTree.pyx":1061 + /* "MuchTree.pyx":1083 * # from existing SuchTrees * if isinstance( tree_b, basestring ): * self.TreeB = SuchTree( tree_b ) # <<<<<<<<<<<<<< * elif type( tree_b ) == SuchTree : * self.TreeB = tree_b */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8MuchTree_SuchTree), __pyx_v_tree_b); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8MuchTree_SuchTree), __pyx_v_tree_b); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->TreeB); @@ -41809,7 +41498,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->TreeB = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1060 + /* "MuchTree.pyx":1082 * # build trees from newick files, URLs to newick files or * # from existing SuchTrees * if isinstance( tree_b, basestring ): # <<<<<<<<<<<<<< @@ -41819,19 +41508,19 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much goto __pyx_L4; } - /* "MuchTree.pyx":1062 + /* "MuchTree.pyx":1084 * if isinstance( tree_b, basestring ): * self.TreeB = SuchTree( tree_b ) * elif type( tree_b ) == SuchTree : # <<<<<<<<<<<<<< * self.TreeB = tree_b * else : */ - __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_tree_b)), ((PyObject *)__pyx_ptype_8MuchTree_SuchTree), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_tree_b)), ((PyObject *)__pyx_ptype_8MuchTree_SuchTree), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_1)) { - /* "MuchTree.pyx":1063 + /* "MuchTree.pyx":1085 * self.TreeB = SuchTree( tree_b ) * elif type( tree_b ) == SuchTree : * self.TreeB = tree_b # <<<<<<<<<<<<<< @@ -41844,7 +41533,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_v_self->TreeB); __pyx_v_self->TreeB = __pyx_v_tree_b; - /* "MuchTree.pyx":1062 + /* "MuchTree.pyx":1084 * if isinstance( tree_b, basestring ): * self.TreeB = SuchTree( tree_b ) * elif type( tree_b ) == SuchTree : # <<<<<<<<<<<<<< @@ -41854,7 +41543,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much goto __pyx_L4; } - /* "MuchTree.pyx":1065 + /* "MuchTree.pyx":1087 * self.TreeB = tree_b * else : * raise Exception( 'unknown input for tree', type(tree_b) ) # <<<<<<<<<<<<<< @@ -41862,66 +41551,66 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much * # make sure the link matrix connects the trees */ /*else*/ { - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_unknown_input_for_tree); __Pyx_GIVEREF(__pyx_kp_u_unknown_input_for_tree); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_unknown_input_for_tree)) __PYX_ERR(0, 1065, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_unknown_input_for_tree)) __PYX_ERR(0, 1087, __pyx_L1_error); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_tree_b))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_tree_b))); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)Py_TYPE(__pyx_v_tree_b)))) __PYX_ERR(0, 1065, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)Py_TYPE(__pyx_v_tree_b)))) __PYX_ERR(0, 1087, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1065, __pyx_L1_error) + __PYX_ERR(0, 1087, __pyx_L1_error) } __pyx_L4:; - /* "MuchTree.pyx":1068 + /* "MuchTree.pyx":1090 * * # make sure the link matrix connects the trees * if not link_matrix.shape == ( self.TreeA.n_leafs, self.TreeB.n_leafs ) : # <<<<<<<<<<<<<< * raise Exception( 'link_matrix shape must match tree leaf counts' ) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __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, 1068, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (!__pyx_t_1); if (unlikely(__pyx_t_6)) { - /* "MuchTree.pyx":1069 + /* "MuchTree.pyx":1091 * # make sure the link matrix connects the trees * if not link_matrix.shape == ( self.TreeA.n_leafs, self.TreeB.n_leafs ) : * raise Exception( 'link_matrix shape must match tree leaf counts' ) # <<<<<<<<<<<<<< * * if not set(link_matrix.axes[0]) == set(self.TreeA.leafs.keys()) : */ - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 1069, __pyx_L1_error) + __PYX_ERR(0, 1091, __pyx_L1_error) - /* "MuchTree.pyx":1068 + /* "MuchTree.pyx":1090 * * # make sure the link matrix connects the trees * if not link_matrix.shape == ( self.TreeA.n_leafs, self.TreeB.n_leafs ) : # <<<<<<<<<<<<<< @@ -41930,24 +41619,24 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":1071 + /* "MuchTree.pyx":1093 * raise Exception( 'link_matrix shape must match tree leaf counts' ) * * if not set(link_matrix.axes[0]) == set(self.TreeA.leafs.keys()) : # <<<<<<<<<<<<<< * raise Exception( 'axis[0] does not match TreeA leaf names' ) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_axes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_axes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __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, 1071, __pyx_L1_error) + __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, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_4 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -41968,35 +41657,35 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1071, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_3 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_3 = PySet_New(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1093, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = (!__pyx_t_6); if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":1072 + /* "MuchTree.pyx":1094 * * if not set(link_matrix.axes[0]) == set(self.TreeA.leafs.keys()) : * raise Exception( 'axis[0] does not match TreeA leaf names' ) # <<<<<<<<<<<<<< * * if not set(link_matrix.axes[1]) == set(self.TreeB.leafs.keys()) : */ - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 1072, __pyx_L1_error) + __PYX_ERR(0, 1094, __pyx_L1_error) - /* "MuchTree.pyx":1071 + /* "MuchTree.pyx":1093 * raise Exception( 'link_matrix shape must match tree leaf counts' ) * * if not set(link_matrix.axes[0]) == set(self.TreeA.leafs.keys()) : # <<<<<<<<<<<<<< @@ -42005,24 +41694,24 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":1074 + /* "MuchTree.pyx":1096 * raise Exception( 'axis[0] does not match TreeA leaf names' ) * * if not set(link_matrix.axes[1]) == set(self.TreeB.leafs.keys()) : # <<<<<<<<<<<<<< * raise Exception( 'axis[1] does not match TreeB leaf names' ) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_axes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_axes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_5 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -42043,35 +41732,35 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_2 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_2 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = (!__pyx_t_1); if (unlikely(__pyx_t_6)) { - /* "MuchTree.pyx":1075 + /* "MuchTree.pyx":1097 * * if not set(link_matrix.axes[1]) == set(self.TreeB.leafs.keys()) : * raise Exception( 'axis[1] does not match TreeB leaf names' ) # <<<<<<<<<<<<<< * * # set row and column indexes */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1075, __pyx_L1_error) + __PYX_ERR(0, 1097, __pyx_L1_error) - /* "MuchTree.pyx":1074 + /* "MuchTree.pyx":1096 * raise Exception( 'axis[0] does not match TreeA leaf names' ) * * if not set(link_matrix.axes[1]) == set(self.TreeB.leafs.keys()) : # <<<<<<<<<<<<<< @@ -42080,21 +41769,21 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":1078 + /* "MuchTree.pyx":1100 * * # set row and column indexes * self.row_ids = np.array( list(self.TreeA.leafs.values()) ) # <<<<<<<<<<<<<< * self.col_ids = np.array( list(self.TreeB.leafs.values()) ) * self.row_names = list(self.TreeA.leafs.keys()) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __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, 1078, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -42115,11 +41804,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -42141,7 +41830,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -42151,21 +41840,21 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->row_ids = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1079 + /* "MuchTree.pyx":1101 * # set row and column indexes * self.row_ids = np.array( list(self.TreeA.leafs.values()) ) * self.col_ids = np.array( list(self.TreeB.leafs.values()) ) # <<<<<<<<<<<<<< * self.row_names = list(self.TreeA.leafs.keys()) * self.col_names = list(self.TreeB.leafs.keys()) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -42186,11 +41875,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -42212,7 +41901,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -42222,16 +41911,16 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->col_ids = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1080 + /* "MuchTree.pyx":1102 * self.row_ids = np.array( list(self.TreeA.leafs.values()) ) * self.col_ids = np.array( list(self.TreeB.leafs.values()) ) * self.row_names = list(self.TreeA.leafs.keys()) # <<<<<<<<<<<<<< * self.col_names = list(self.TreeB.leafs.keys()) * */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -42252,11 +41941,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -42265,16 +41954,16 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->row_names = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":1081 + /* "MuchTree.pyx":1103 * self.col_ids = np.array( list(self.TreeB.leafs.values()) ) * self.row_names = list(self.TreeA.leafs.keys()) * self.col_names = list(self.TreeB.leafs.keys()) # <<<<<<<<<<<<<< * * self.n_rows = self.TreeA.n_leafs */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -42295,11 +41984,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_8); @@ -42308,55 +41997,55 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->col_names = __pyx_t_8; __pyx_t_8 = 0; - /* "MuchTree.pyx":1083 + /* "MuchTree.pyx":1105 * self.col_names = list(self.TreeB.leafs.keys()) * * self.n_rows = self.TreeA.n_leafs # <<<<<<<<<<<<<< * self.n_cols = self.TreeB.n_leafs * */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_self->n_rows = __pyx_t_7; - /* "MuchTree.pyx":1084 + /* "MuchTree.pyx":1106 * * self.n_rows = self.TreeA.n_leafs * self.n_cols = self.TreeB.n_leafs # <<<<<<<<<<<<<< * * # reverse map for row ids */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_n_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_self->n_cols = __pyx_t_7; - /* "MuchTree.pyx":1087 + /* "MuchTree.pyx":1109 * * # reverse map for row ids * self.row_map = np.zeros( self.TreeA.length, dtype=int ) # <<<<<<<<<<<<<< * for n,i in enumerate(self.row_ids) : * self.row_map[i] = n */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1087, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __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; @@ -42367,7 +42056,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->row_map = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":1088 + /* "MuchTree.pyx":1110 * # reverse map for row ids * self.row_map = np.zeros( self.TreeA.length, dtype=int ) * for n,i in enumerate(self.row_ids) : # <<<<<<<<<<<<<< @@ -42381,9 +42070,9 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_self->row_ids); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_self->row_ids); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1110, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_10)) { @@ -42391,28 +42080,28 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1088, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1088, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -42422,7 +42111,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1088, __pyx_L1_error) + else __PYX_ERR(0, 1110, __pyx_L1_error) } break; } @@ -42432,22 +42121,22 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1089 + /* "MuchTree.pyx":1111 * self.row_map = np.zeros( self.TreeA.length, dtype=int ) * for n,i in enumerate(self.row_ids) : * self.row_map[i] = n # <<<<<<<<<<<<<< * * # populate the link table */ - if (unlikely((PyObject_SetItem(__pyx_v_self->row_map, __pyx_v_i, __pyx_v_n) < 0))) __PYX_ERR(0, 1089, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_self->row_map, __pyx_v_i, __pyx_v_n) < 0))) __PYX_ERR(0, 1111, __pyx_L1_error) - /* "MuchTree.pyx":1088 + /* "MuchTree.pyx":1110 * # reverse map for row ids * self.row_map = np.zeros( self.TreeA.length, dtype=int ) * for n,i in enumerate(self.row_ids) : # <<<<<<<<<<<<<< @@ -42458,7 +42147,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1093 + /* "MuchTree.pyx":1115 * # populate the link table * #print id(self), 'allocating columns in', &self.table * self.n_links = 0 # <<<<<<<<<<<<<< @@ -42467,7 +42156,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ __pyx_v_self->n_links = 0; - /* "MuchTree.pyx":1094 + /* "MuchTree.pyx":1116 * #print id(self), 'allocating columns in', &self.table * self.n_links = 0 * for i,(colname,s) in enumerate( link_matrix.T.reindex( self.col_names ).iterrows() ) : # <<<<<<<<<<<<<< @@ -42476,9 +42165,9 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ __Pyx_INCREF(__pyx_int_0); __pyx_t_5 = __pyx_int_0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_T); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_link_matrix, __pyx_n_s_T); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reindex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -42499,11 +42188,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_self->col_names}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -42524,7 +42213,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -42533,9 +42222,9 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1116, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -42544,28 +42233,28 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1116, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1116, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1116, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1116, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -42575,7 +42264,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1094, __pyx_L1_error) + else __PYX_ERR(0, 1116, __pyx_L1_error) } break; } @@ -42587,7 +42276,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1094, __pyx_L1_error) + __PYX_ERR(0, 1116, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -42600,15 +42289,15 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); @@ -42616,7 +42305,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1094, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1116, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_unpacking_done; @@ -42624,7 +42313,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1094, __pyx_L1_error) + __PYX_ERR(0, 1116, __pyx_L1_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_colname, __pyx_t_3); @@ -42633,22 +42322,22 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); - __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_8; __pyx_t_8 = 0; - /* "MuchTree.pyx":1097 + /* "MuchTree.pyx":1119 * # attach leaf nodes in TreeB to corresponding column in * # the link table * self.TreeB.link_leaf( self.col_ids[i], i ) # <<<<<<<<<<<<<< * l = [] * for rowname, value in s.items() : */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_link_leaf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_link_leaf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->col_ids, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->col_ids, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; __pyx_t_7 = 0; @@ -42669,25 +42358,25 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1098 + /* "MuchTree.pyx":1120 * # the link table * self.TreeB.link_leaf( self.col_ids[i], i ) * l = [] # <<<<<<<<<<<<<< * for rowname, value in s.items() : * if value > 0 : l.append( self.TreeA.leafs[rowname] ) */ - __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_l, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "MuchTree.pyx":1099 + /* "MuchTree.pyx":1121 * self.TreeB.link_leaf( self.col_ids[i], i ) * l = [] * for rowname, value in s.items() : # <<<<<<<<<<<<<< @@ -42697,9 +42386,9 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_13 = 0; if (unlikely(__pyx_v_s == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1099, __pyx_L1_error) + __PYX_ERR(0, 1121, __pyx_L1_error) } - __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_s, 0, __pyx_n_s_items, (&__pyx_t_14), (&__pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error) + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_s, 0, __pyx_n_s_items, (&__pyx_t_14), (&__pyx_t_15)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = __pyx_t_4; @@ -42707,7 +42396,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much while (1) { __pyx_t_16 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_14, &__pyx_t_13, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_15); if (unlikely(__pyx_t_16 == 0)) break; - if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 1099, __pyx_L1_error) + if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_rowname, __pyx_t_4); @@ -42715,127 +42404,127 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1100 + /* "MuchTree.pyx":1122 * l = [] * for rowname, value in s.items() : * if value > 0 : l.append( self.TreeA.leafs[rowname] ) # <<<<<<<<<<<<<< * col_size = len(l) * if self.table[i].links == NULL : */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_rowname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_rowname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_4); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_4); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1101 + /* "MuchTree.pyx":1123 * for rowname, value in s.items() : * if value > 0 : l.append( self.TreeA.leafs[rowname] ) * col_size = len(l) # <<<<<<<<<<<<<< * if self.table[i].links == NULL : * self.table[i].leaf_id = self.col_ids[i] */ - __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_l); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1101, __pyx_L1_error) - __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1101, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_l); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1123, __pyx_L1_error) + __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_col_size, __pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1102 + /* "MuchTree.pyx":1124 * if value > 0 : l.append( self.TreeA.leafs[rowname] ) * col_size = len(l) * if self.table[i].links == NULL : # <<<<<<<<<<<<<< * self.table[i].leaf_id = self.col_ids[i] * self.n_links += col_size */ - __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L1_error) __pyx_t_6 = ((__pyx_v_self->table[__pyx_t_14]).links == NULL); if (__pyx_t_6) { - /* "MuchTree.pyx":1103 + /* "MuchTree.pyx":1125 * col_size = len(l) * if self.table[i].links == NULL : * self.table[i].leaf_id = self.col_ids[i] # <<<<<<<<<<<<<< * self.n_links += col_size * self.table[i].length = col_size */ - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->col_ids, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_self->col_ids, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error) (__pyx_v_self->table[__pyx_t_14]).leaf_id = __pyx_t_7; - /* "MuchTree.pyx":1104 + /* "MuchTree.pyx":1126 * if self.table[i].links == NULL : * self.table[i].leaf_id = self.col_ids[i] * self.n_links += col_size # <<<<<<<<<<<<<< * self.table[i].length = col_size * self.table[i].links = PyMem_Malloc( col_size * sizeof( unsigned int ) ) */ - __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_links); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_links); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_col_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_col_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->n_links = __pyx_t_7; - /* "MuchTree.pyx":1105 + /* "MuchTree.pyx":1127 * self.table[i].leaf_id = self.col_ids[i] * self.n_links += col_size * self.table[i].length = col_size # <<<<<<<<<<<<<< * self.table[i].links = PyMem_Malloc( col_size * sizeof( unsigned int ) ) * for j in xrange( col_size ) : */ - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_col_size); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error) - __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_col_size); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1127, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1127, __pyx_L1_error) (__pyx_v_self->table[__pyx_t_14]).length = __pyx_t_7; - /* "MuchTree.pyx":1106 + /* "MuchTree.pyx":1128 * self.n_links += col_size * self.table[i].length = col_size * self.table[i].links = PyMem_Malloc( col_size * sizeof( unsigned int ) ) # <<<<<<<<<<<<<< * for j in xrange( col_size ) : * self.table[i].links[j] = l[j] */ - __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(unsigned int))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(unsigned int))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyNumber_Multiply(__pyx_v_col_size, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_v_col_size, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_18 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_18 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_18 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1128, __pyx_L1_error) (__pyx_v_self->table[__pyx_t_14]).links = ((unsigned int *)PyMem_Malloc(__pyx_t_18)); - /* "MuchTree.pyx":1107 + /* "MuchTree.pyx":1129 * self.table[i].length = col_size * self.table[i].links = PyMem_Malloc( col_size * sizeof( unsigned int ) ) * for j in xrange( col_size ) : # <<<<<<<<<<<<<< * self.table[i].links[j] = l[j] * */ - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_col_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_col_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4); __pyx_t_14 = 0; __pyx_t_19 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1129, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -42844,28 +42533,28 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1107, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1129, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_8); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_8); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 1129, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1107, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1129, __pyx_L1_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_8); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_8); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 1129, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -42875,7 +42564,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1107, __pyx_L1_error) + else __PYX_ERR(0, 1129, __pyx_L1_error) } break; } @@ -42884,22 +42573,22 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1108 + /* "MuchTree.pyx":1130 * self.table[i].links = PyMem_Malloc( col_size * sizeof( unsigned int ) ) * for j in xrange( col_size ) : * self.table[i].links[j] = l[j] # <<<<<<<<<<<<<< * * # by default, the subset is the whole table */ - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_l, __pyx_v_j); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_l, __pyx_v_j); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error) - __pyx_t_20 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_20 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_20 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L1_error) ((__pyx_v_self->table[__pyx_t_13]).links[__pyx_t_20]) = __pyx_t_7; - /* "MuchTree.pyx":1107 + /* "MuchTree.pyx":1129 * self.table[i].length = col_size * self.table[i].links = PyMem_Malloc( col_size * sizeof( unsigned int ) ) * for j in xrange( col_size ) : # <<<<<<<<<<<<<< @@ -42909,7 +42598,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":1102 + /* "MuchTree.pyx":1124 * if value > 0 : l.append( self.TreeA.leafs[rowname] ) * col_size = len(l) * if self.table[i].links == NULL : # <<<<<<<<<<<<<< @@ -42918,7 +42607,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ } - /* "MuchTree.pyx":1094 + /* "MuchTree.pyx":1116 * #print id(self), 'allocating columns in', &self.table * self.n_links = 0 * for i,(colname,s) in enumerate( link_matrix.T.reindex( self.col_names ).iterrows() ) : # <<<<<<<<<<<<<< @@ -42929,33 +42618,33 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1112 + /* "MuchTree.pyx":1134 * # by default, the subset is the whole table * #print 'bulding default subset.' * self.subset_a_root = self.TreeA.root # <<<<<<<<<<<<<< * self.subset_b_root = self.TreeB.root * self.subset_a_size = len( self.row_ids ) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_root); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_root); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->subset_a_root = __pyx_t_7; - /* "MuchTree.pyx":1113 + /* "MuchTree.pyx":1135 * #print 'bulding default subset.' * self.subset_a_root = self.TreeA.root * self.subset_b_root = self.TreeB.root # <<<<<<<<<<<<<< * self.subset_a_size = len( self.row_ids ) * self.subset_b_size = len( self.col_ids ) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_root); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_root); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->subset_b_root = __pyx_t_7; - /* "MuchTree.pyx":1114 + /* "MuchTree.pyx":1136 * self.subset_a_root = self.TreeA.root * self.subset_b_root = self.TreeB.root * self.subset_a_size = len( self.row_ids ) # <<<<<<<<<<<<<< @@ -42964,11 +42653,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ __pyx_t_5 = __pyx_v_self->row_ids; __Pyx_INCREF(__pyx_t_5); - __pyx_t_9 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1114, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->subset_a_size = __pyx_t_9; - /* "MuchTree.pyx":1115 + /* "MuchTree.pyx":1137 * self.subset_b_root = self.TreeB.root * self.subset_a_size = len( self.row_ids ) * self.subset_b_size = len( self.col_ids ) # <<<<<<<<<<<<<< @@ -42977,11 +42666,11 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much */ __pyx_t_5 = __pyx_v_self->col_ids; __Pyx_INCREF(__pyx_t_5); - __pyx_t_9 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1115, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_self->subset_b_size = __pyx_t_9; - /* "MuchTree.pyx":1116 + /* "MuchTree.pyx":1138 * self.subset_a_size = len( self.row_ids ) * self.subset_b_size = len( self.col_ids ) * self.subset_n_links = self.n_links # <<<<<<<<<<<<<< @@ -42991,21 +42680,21 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_7 = __pyx_v_self->n_links; __pyx_v_self->subset_n_links = __pyx_t_7; - /* "MuchTree.pyx":1117 + /* "MuchTree.pyx":1139 * self.subset_b_size = len( self.col_ids ) * self.subset_n_links = self.n_links * self.subset_rows = np.array( range( self.subset_a_size ) ) # <<<<<<<<<<<<<< * self.subset_columns = np.array( range( self.subset_b_size ) ) * self.subset_a_leafs = self.row_ids */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -43027,7 +42716,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -43037,21 +42726,21 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->subset_rows = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":1118 + /* "MuchTree.pyx":1140 * self.subset_n_links = self.n_links * self.subset_rows = np.array( range( self.subset_a_size ) ) * self.subset_columns = np.array( range( self.subset_b_size ) ) # <<<<<<<<<<<<<< * self.subset_a_leafs = self.row_ids * self.subset_b_leafs = self.col_ids */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1118, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -43073,7 +42762,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1118, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -43083,7 +42772,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->subset_columns = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":1119 + /* "MuchTree.pyx":1141 * self.subset_rows = np.array( range( self.subset_a_size ) ) * self.subset_columns = np.array( range( self.subset_b_size ) ) * self.subset_a_leafs = self.row_ids # <<<<<<<<<<<<<< @@ -43098,7 +42787,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->subset_a_leafs = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":1120 + /* "MuchTree.pyx":1142 * self.subset_columns = np.array( range( self.subset_b_size ) ) * self.subset_a_leafs = self.row_ids * self.subset_b_leafs = self.col_ids # <<<<<<<<<<<<<< @@ -43113,32 +42802,32 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->subset_b_leafs = __pyx_t_5; __pyx_t_5 = 0; - /* "MuchTree.pyx":1124 + /* "MuchTree.pyx":1146 * # make np_linklist * #print 'bulding default link list.' * self.np_linklist = np.ndarray( ( self.n_links, 2 ), dtype=int ) # <<<<<<<<<<<<<< * self._build_linklist() * */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_links); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_links); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_2)) __PYX_ERR(0, 1124, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_2)) __PYX_ERR(0, 1146, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)) __PYX_ERR(0, 1124, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)) __PYX_ERR(0, 1146, __pyx_L1_error); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1124, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -43148,16 +42837,16 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much __pyx_v_self->np_linklist = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1125 + /* "MuchTree.pyx":1147 * #print 'bulding default link list.' * self.np_linklist = np.ndarray( ( self.n_links, 2 ), dtype=int ) * self._build_linklist() # <<<<<<<<<<<<<< * * def __dealloc__( self ) : */ - ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linklist(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L1_error) + ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linklist(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1147, __pyx_L1_error) - /* "MuchTree.pyx":1033 + /* "MuchTree.pyx":1055 * self.modulus = 2685821657736338717 * * def __init__( self, tree_a, tree_b, link_matrix ) : # <<<<<<<<<<<<<< @@ -43191,7 +42880,7 @@ static int __pyx_pf_8MuchTree_15SuchLinkedTrees_2__init__(struct __pyx_obj_8Much return __pyx_r; } -/* "MuchTree.pyx":1127 +/* "MuchTree.pyx":1149 * self._build_linklist() * * def __dealloc__( self ) : # <<<<<<<<<<<<<< @@ -43219,7 +42908,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 unsigned int __pyx_t_3; int __pyx_t_4; - /* "MuchTree.pyx":1131 + /* "MuchTree.pyx":1153 * #print id(self), 'freeing columns in', &self.table * * for i in xrange( self.table_size ) : # <<<<<<<<<<<<<< @@ -43231,7 +42920,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "MuchTree.pyx":1132 + /* "MuchTree.pyx":1154 * * for i in xrange( self.table_size ) : * if not self.table[i].links == NULL : # <<<<<<<<<<<<<< @@ -43241,7 +42930,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 __pyx_t_4 = (!((__pyx_v_self->table[__pyx_v_i]).links == NULL)); if (__pyx_t_4) { - /* "MuchTree.pyx":1133 + /* "MuchTree.pyx":1155 * for i in xrange( self.table_size ) : * if not self.table[i].links == NULL : * PyMem_Free( self.table[i].links ) # <<<<<<<<<<<<<< @@ -43250,7 +42939,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 */ PyMem_Free((__pyx_v_self->table[__pyx_v_i]).links); - /* "MuchTree.pyx":1132 + /* "MuchTree.pyx":1154 * * for i in xrange( self.table_size ) : * if not self.table[i].links == NULL : # <<<<<<<<<<<<<< @@ -43260,7 +42949,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 } } - /* "MuchTree.pyx":1137 + /* "MuchTree.pyx":1159 * #print id(self), 'freeing table', &self.table * * PyMem_Free( self.table ) # <<<<<<<<<<<<<< @@ -43269,7 +42958,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 */ PyMem_Free(__pyx_v_self->table); - /* "MuchTree.pyx":1127 + /* "MuchTree.pyx":1149 * self._build_linklist() * * def __dealloc__( self ) : # <<<<<<<<<<<<<< @@ -43280,7 +42969,7 @@ static void __pyx_pf_8MuchTree_15SuchLinkedTrees_4__dealloc__(struct __pyx_obj_8 /* function exit code */ } -/* "MuchTree.pyx":1141 +/* "MuchTree.pyx":1163 * property TreeA : * 'first tree initialized by SuchLinkedTrees( TreeA, TreeB )' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43308,7 +42997,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_5TreeA___get__(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1142 + /* "MuchTree.pyx":1164 * 'first tree initialized by SuchLinkedTrees( TreeA, TreeB )' * def __get__( self ) : * return self.TreeA # <<<<<<<<<<<<<< @@ -43320,7 +43009,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_5TreeA___get__(struct __py __pyx_r = __pyx_v_self->TreeA; goto __pyx_L0; - /* "MuchTree.pyx":1141 + /* "MuchTree.pyx":1163 * property TreeA : * 'first tree initialized by SuchLinkedTrees( TreeA, TreeB )' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43335,7 +43024,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_5TreeA___get__(struct __py return __pyx_r; } -/* "MuchTree.pyx":1146 +/* "MuchTree.pyx":1168 * property TreeB : * 'second tree initialized by SuchLinkedTrees( TreeA, TreeB )' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43363,7 +43052,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_5TreeB___get__(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1147 + /* "MuchTree.pyx":1169 * 'second tree initialized by SuchLinkedTrees( TreeA, TreeB )' * def __get__( self ) : * return self.TreeB # <<<<<<<<<<<<<< @@ -43375,7 +43064,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_5TreeB___get__(struct __py __pyx_r = __pyx_v_self->TreeB; goto __pyx_L0; - /* "MuchTree.pyx":1146 + /* "MuchTree.pyx":1168 * property TreeB : * 'second tree initialized by SuchLinkedTrees( TreeA, TreeB )' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43390,7 +43079,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_5TreeB___get__(struct __py return __pyx_r; } -/* "MuchTree.pyx":1151 +/* "MuchTree.pyx":1173 * property n_links : * 'size of the link list' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43422,7 +43111,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7n_links___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1152 + /* "MuchTree.pyx":1174 * 'size of the link list' * def __get__( self ) : * return self.n_links # <<<<<<<<<<<<<< @@ -43430,13 +43119,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7n_links___get__(struct __ * property n_cols : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1151 + /* "MuchTree.pyx":1173 * property n_links : * 'size of the link list' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43455,7 +43144,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7n_links___get__(struct __ return __pyx_r; } -/* "MuchTree.pyx":1156 +/* "MuchTree.pyx":1178 * property n_cols : * 'Number of columns in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43487,7 +43176,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6n_cols___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1157 + /* "MuchTree.pyx":1179 * 'Number of columns in the link matrix.' * def __get__( self ) : * return self.n_cols # <<<<<<<<<<<<<< @@ -43495,13 +43184,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6n_cols___get__(struct __p * property n_rows : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1156 + /* "MuchTree.pyx":1178 * property n_cols : * 'Number of columns in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43520,7 +43209,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6n_cols___get__(struct __p return __pyx_r; } -/* "MuchTree.pyx":1161 +/* "MuchTree.pyx":1183 * property n_rows : * 'Number of rows in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43552,7 +43241,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6n_rows___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1162 + /* "MuchTree.pyx":1184 * 'Number of rows in the link matrix.' * def __get__( self ) : * return self.n_rows # <<<<<<<<<<<<<< @@ -43560,13 +43249,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6n_rows___get__(struct __p * property col_ids : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1161 + /* "MuchTree.pyx":1183 * property n_rows : * 'Number of rows in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43585,7 +43274,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6n_rows___get__(struct __p return __pyx_r; } -/* "MuchTree.pyx":1166 +/* "MuchTree.pyx":1188 * property col_ids : * 'ids of the columns (TreeB) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43621,7 +43310,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1167 + /* "MuchTree.pyx":1189 * 'ids of the columns (TreeB) in the link matrix.' * def __get__( self ) : * if self.col_ids is None : # <<<<<<<<<<<<<< @@ -43631,16 +43320,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ __pyx_t_1 = (__pyx_v_self->col_ids == Py_None); if (__pyx_t_1) { - /* "MuchTree.pyx":1168 + /* "MuchTree.pyx":1190 * def __get__( self ) : * if self.col_ids is None : * self.col_ids = self.TreeB.leafs.values() # <<<<<<<<<<<<<< * return self.col_ids * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43661,7 +43350,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -43671,7 +43360,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ __pyx_v_self->col_ids = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1167 + /* "MuchTree.pyx":1189 * 'ids of the columns (TreeB) in the link matrix.' * def __get__( self ) : * if self.col_ids is None : # <<<<<<<<<<<<<< @@ -43680,7 +43369,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ */ } - /* "MuchTree.pyx":1169 + /* "MuchTree.pyx":1191 * if self.col_ids is None : * self.col_ids = self.TreeB.leafs.values() * return self.col_ids # <<<<<<<<<<<<<< @@ -43692,7 +43381,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ __pyx_r = __pyx_v_self->col_ids; goto __pyx_L0; - /* "MuchTree.pyx":1166 + /* "MuchTree.pyx":1188 * property col_ids : * 'ids of the columns (TreeB) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43713,7 +43402,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7col_ids___get__(struct __ return __pyx_r; } -/* "MuchTree.pyx":1173 +/* "MuchTree.pyx":1195 * property row_ids : * 'ids of the rows (TreeA) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43749,7 +43438,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1174 + /* "MuchTree.pyx":1196 * 'ids of the rows (TreeA) in the link matrix.' * def __get__( self ) : * if self.row_ids is None : # <<<<<<<<<<<<<< @@ -43759,16 +43448,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ __pyx_t_1 = (__pyx_v_self->row_ids == Py_None); if (__pyx_t_1) { - /* "MuchTree.pyx":1175 + /* "MuchTree.pyx":1197 * def __get__( self ) : * if self.row_ids is None : * self.row_ids = self.TreeA.leafs.values() # <<<<<<<<<<<<<< * return self.row_ids * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43789,7 +43478,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -43799,7 +43488,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ __pyx_v_self->row_ids = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1174 + /* "MuchTree.pyx":1196 * 'ids of the rows (TreeA) in the link matrix.' * def __get__( self ) : * if self.row_ids is None : # <<<<<<<<<<<<<< @@ -43808,7 +43497,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ */ } - /* "MuchTree.pyx":1176 + /* "MuchTree.pyx":1198 * if self.row_ids is None : * self.row_ids = self.TreeA.leafs.values() * return self.row_ids # <<<<<<<<<<<<<< @@ -43820,7 +43509,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ __pyx_r = __pyx_v_self->row_ids; goto __pyx_L0; - /* "MuchTree.pyx":1173 + /* "MuchTree.pyx":1195 * property row_ids : * 'ids of the rows (TreeA) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43841,7 +43530,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_7row_ids___get__(struct __ return __pyx_r; } -/* "MuchTree.pyx":1180 +/* "MuchTree.pyx":1202 * property col_names : * 'Names of the columns (TreeB) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43877,7 +43566,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1181 + /* "MuchTree.pyx":1203 * 'Names of the columns (TreeB) in the link matrix.' * def __get__( self ) : * if self.col_names is None : # <<<<<<<<<<<<<< @@ -43887,16 +43576,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct __pyx_t_1 = (__pyx_v_self->col_names == Py_None); if (__pyx_t_1) { - /* "MuchTree.pyx":1182 + /* "MuchTree.pyx":1204 * def __get__( self ) : * if self.col_names is None : * self.col_names = self.TreeB.leafs.keys() # <<<<<<<<<<<<<< * return self.col_names * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43917,7 +43606,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -43927,7 +43616,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct __pyx_v_self->col_names = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1181 + /* "MuchTree.pyx":1203 * 'Names of the columns (TreeB) in the link matrix.' * def __get__( self ) : * if self.col_names is None : # <<<<<<<<<<<<<< @@ -43936,7 +43625,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct */ } - /* "MuchTree.pyx":1183 + /* "MuchTree.pyx":1205 * if self.col_names is None : * self.col_names = self.TreeB.leafs.keys() * return self.col_names # <<<<<<<<<<<<<< @@ -43948,7 +43637,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct __pyx_r = __pyx_v_self->col_names; goto __pyx_L0; - /* "MuchTree.pyx":1180 + /* "MuchTree.pyx":1202 * property col_names : * 'Names of the columns (TreeB) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -43969,7 +43658,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9col_names___get__(struct return __pyx_r; } -/* "MuchTree.pyx":1187 +/* "MuchTree.pyx":1209 * property row_names : * 'Names of the rows (TreeA) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44005,7 +43694,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1188 + /* "MuchTree.pyx":1210 * 'Names of the rows (TreeA) in the link matrix.' * def __get__( self ) : * if self.col_ids is None : # <<<<<<<<<<<<<< @@ -44015,16 +43704,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct __pyx_t_1 = (__pyx_v_self->col_ids == Py_None); if (__pyx_t_1) { - /* "MuchTree.pyx":1189 + /* "MuchTree.pyx":1211 * def __get__( self ) : * if self.col_ids is None : * self.row_names = self.TreeA.leafs.keys() # <<<<<<<<<<<<<< * return self.row_names * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -44045,7 +43734,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1189, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -44055,7 +43744,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct __pyx_v_self->row_names = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1188 + /* "MuchTree.pyx":1210 * 'Names of the rows (TreeA) in the link matrix.' * def __get__( self ) : * if self.col_ids is None : # <<<<<<<<<<<<<< @@ -44064,7 +43753,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct */ } - /* "MuchTree.pyx":1190 + /* "MuchTree.pyx":1212 * if self.col_ids is None : * self.row_names = self.TreeA.leafs.keys() * return self.row_names # <<<<<<<<<<<<<< @@ -44076,7 +43765,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct __pyx_r = __pyx_v_self->row_names; goto __pyx_L0; - /* "MuchTree.pyx":1187 + /* "MuchTree.pyx":1209 * property row_names : * 'Names of the rows (TreeA) in the link matrix.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44097,7 +43786,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_9row_names___get__(struct return __pyx_r; } -/* "MuchTree.pyx":1194 +/* "MuchTree.pyx":1216 * property subset_columns : * 'ids of the current subset columns.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44125,7 +43814,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_columns___get__(s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1195 + /* "MuchTree.pyx":1217 * 'ids of the current subset columns.' * def __get__( self ) : * return self.subset_columns # <<<<<<<<<<<<<< @@ -44137,7 +43826,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_columns___get__(s __pyx_r = __pyx_v_self->subset_columns; goto __pyx_L0; - /* "MuchTree.pyx":1194 + /* "MuchTree.pyx":1216 * property subset_columns : * 'ids of the current subset columns.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44152,7 +43841,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_columns___get__(s return __pyx_r; } -/* "MuchTree.pyx":1199 +/* "MuchTree.pyx":1221 * property subset_a_leafs : * 'ids of the current subset rows.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44180,7 +43869,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_a_leafs___get__(s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1200 + /* "MuchTree.pyx":1222 * 'ids of the current subset rows.' * def __get__( self ) : * return self.subset_a_leafs # <<<<<<<<<<<<<< @@ -44192,7 +43881,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_a_leafs___get__(s __pyx_r = __pyx_v_self->subset_a_leafs; goto __pyx_L0; - /* "MuchTree.pyx":1199 + /* "MuchTree.pyx":1221 * property subset_a_leafs : * 'ids of the current subset rows.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44207,7 +43896,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_a_leafs___get__(s return __pyx_r; } -/* "MuchTree.pyx":1204 +/* "MuchTree.pyx":1226 * property subset_b_leafs : * 'ids of the current subset columns.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44235,7 +43924,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_b_leafs___get__(s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1205 + /* "MuchTree.pyx":1227 * 'ids of the current subset columns.' * def __get__( self ) : * return self.subset_b_leafs # <<<<<<<<<<<<<< @@ -44247,7 +43936,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_b_leafs___get__(s __pyx_r = __pyx_v_self->subset_b_leafs; goto __pyx_L0; - /* "MuchTree.pyx":1204 + /* "MuchTree.pyx":1226 * property subset_b_leafs : * 'ids of the current subset columns.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44262,7 +43951,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_b_leafs___get__(s return __pyx_r; } -/* "MuchTree.pyx":1209 +/* "MuchTree.pyx":1231 * property subset_a_size : * 'Number of rows in the current subset.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44294,7 +43983,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_a_size___get__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1210 + /* "MuchTree.pyx":1232 * 'Number of rows in the current subset.' * def __get__( self ) : * return self.subset_a_size # <<<<<<<<<<<<<< @@ -44302,13 +43991,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_a_size___get__(st * property subset_b_size : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1209 + /* "MuchTree.pyx":1231 * property subset_a_size : * 'Number of rows in the current subset.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44327,7 +44016,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_a_size___get__(st return __pyx_r; } -/* "MuchTree.pyx":1214 +/* "MuchTree.pyx":1236 * property subset_b_size : * 'Number of columns in the current subset.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44359,7 +44048,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_b_size___get__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1215 + /* "MuchTree.pyx":1237 * 'Number of columns in the current subset.' * def __get__( self ) : * return self.subset_b_size # <<<<<<<<<<<<<< @@ -44367,13 +44056,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_b_size___get__(st * property subset_a_root : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1214 + /* "MuchTree.pyx":1236 * property subset_b_size : * 'Number of columns in the current subset.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44392,7 +44081,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_b_size___get__(st return __pyx_r; } -/* "MuchTree.pyx":1219 +/* "MuchTree.pyx":1241 * property subset_a_root : * 'ID of the current subset root in TreeA.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44424,7 +44113,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_a_root___get__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1220 + /* "MuchTree.pyx":1242 * 'ID of the current subset root in TreeA.' * def __get__( self ) : * return self.subset_a_root # <<<<<<<<<<<<<< @@ -44432,13 +44121,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_a_root___get__(st * property subset_b_root : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1219 + /* "MuchTree.pyx":1241 * property subset_a_root : * 'ID of the current subset root in TreeA.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44457,7 +44146,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_a_root___get__(st return __pyx_r; } -/* "MuchTree.pyx":1224 +/* "MuchTree.pyx":1246 * property subset_b_root : * 'ID of the current subset root in TreeB.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44489,7 +44178,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_b_root___get__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1225 + /* "MuchTree.pyx":1247 * 'ID of the current subset root in TreeB.' * def __get__( self ) : * return self.subset_b_root # <<<<<<<<<<<<<< @@ -44497,13 +44186,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_b_root___get__(st * property subset_n_links : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1224 + /* "MuchTree.pyx":1246 * property subset_b_root : * 'ID of the current subset root in TreeB.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44522,7 +44211,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_13subset_b_root___get__(st return __pyx_r; } -/* "MuchTree.pyx":1229 +/* "MuchTree.pyx":1251 * property subset_n_links : * 'Number of links in the current subset.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44554,7 +44243,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_n_links___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1230 + /* "MuchTree.pyx":1252 * 'Number of links in the current subset.' * def __get__( self ) : * return self.subset_n_links # <<<<<<<<<<<<<< @@ -44562,13 +44251,13 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_n_links___get__(s * def get_column_leafs( self, col, as_row_ids=False ) : */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_n_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_n_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1229 + /* "MuchTree.pyx":1251 * property subset_n_links : * 'Number of links in the current subset.' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -44587,7 +44276,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14subset_n_links___get__(s return __pyx_r; } -/* "MuchTree.pyx":1232 +/* "MuchTree.pyx":1254 * return self.subset_n_links * * def get_column_leafs( self, col, as_row_ids=False ) : # <<<<<<<<<<<<<< @@ -44652,19 +44341,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_as_row_ids); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1232, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1254, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_column_leafs") < 0)) __PYX_ERR(0, 1232, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_column_leafs") < 0)) __PYX_ERR(0, 1254, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -44680,7 +44369,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_column_leafs", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1232, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_column_leafs", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1254, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -44728,7 +44417,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_column_leafs", 1); - /* "MuchTree.pyx":1234 + /* "MuchTree.pyx":1256 * def get_column_leafs( self, col, as_row_ids=False ) : * * if isinstance(col, basestring) : # <<<<<<<<<<<<<< @@ -44738,14 +44427,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_col); if (__pyx_t_1) { - /* "MuchTree.pyx":1235 + /* "MuchTree.pyx":1257 * * if isinstance(col, basestring) : * col_id = self.col_names.index( col ) # <<<<<<<<<<<<<< * else : * col_id = col */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->col_names, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->col_names, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -44765,14 +44454,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_col}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_col_id = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1234 + /* "MuchTree.pyx":1256 * def get_column_leafs( self, col, as_row_ids=False ) : * * if isinstance(col, basestring) : # <<<<<<<<<<<<<< @@ -44782,7 +44471,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ goto __pyx_L3; } - /* "MuchTree.pyx":1237 + /* "MuchTree.pyx":1259 * col_id = self.col_names.index( col ) * else : * col_id = col # <<<<<<<<<<<<<< @@ -44795,44 +44484,44 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ } __pyx_L3:; - /* "MuchTree.pyx":1239 + /* "MuchTree.pyx":1261 * col_id = col * * if col_id > self.n_cols : # <<<<<<<<<<<<<< * raise Exception( 'col_id out of bounds', col_id ) * */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_col_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_col_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":1240 + /* "MuchTree.pyx":1262 * * if col_id > self.n_cols : * raise Exception( 'col_id out of bounds', col_id ) # <<<<<<<<<<<<<< * * length = self.table[ col_id ].length */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_col_id_out_of_bounds); __Pyx_GIVEREF(__pyx_kp_u_col_id_out_of_bounds); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_col_id_out_of_bounds)) __PYX_ERR(0, 1240, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_col_id_out_of_bounds)) __PYX_ERR(0, 1262, __pyx_L1_error); __Pyx_INCREF(__pyx_v_col_id); __Pyx_GIVEREF(__pyx_v_col_id); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_col_id)) __PYX_ERR(0, 1240, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_col_id)) __PYX_ERR(0, 1262, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1240, __pyx_L1_error) + __PYX_ERR(0, 1262, __pyx_L1_error) - /* "MuchTree.pyx":1239 + /* "MuchTree.pyx":1261 * col_id = col * * if col_id > self.n_cols : # <<<<<<<<<<<<<< @@ -44841,61 +44530,61 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ */ } - /* "MuchTree.pyx":1242 + /* "MuchTree.pyx":1264 * raise Exception( 'col_id out of bounds', col_id ) * * length = self.table[ col_id ].length # <<<<<<<<<<<<<< * column = np.ndarray( self.table[ col_id ].length, dtype=int ) * for i in xrange( length ) : */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1242, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->table[__pyx_t_6]).length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->table[__pyx_t_6]).length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_length = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1243 + /* "MuchTree.pyx":1265 * * length = self.table[ col_id ].length * column = np.ndarray( self.table[ col_id ].length, dtype=int ) # <<<<<<<<<<<<<< * for i in xrange( length ) : * if as_row_ids : */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->table[__pyx_t_6]).length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->table[__pyx_t_6]).length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1243, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_column = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":1244 + /* "MuchTree.pyx":1266 * length = self.table[ col_id ].length * column = np.ndarray( self.table[ col_id ].length, dtype=int ) * for i in xrange( length ) : # <<<<<<<<<<<<<< * if as_row_ids : * column[i] = self.row_map[ self.table[ col_id ].links[i] ] */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -44904,28 +44593,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1244, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1266, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1266, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1244, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1266, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1266, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -44935,7 +44624,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1244, __pyx_L1_error) + else __PYX_ERR(0, 1266, __pyx_L1_error) } break; } @@ -44944,31 +44633,31 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":1245 + /* "MuchTree.pyx":1267 * column = np.ndarray( self.table[ col_id ].length, dtype=int ) * for i in xrange( length ) : * if as_row_ids : # <<<<<<<<<<<<<< * column[i] = self.row_map[ self.table[ col_id ].links[i] ] * else : */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_as_row_ids); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_as_row_ids); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1267, __pyx_L1_error) if (__pyx_t_1) { - /* "MuchTree.pyx":1246 + /* "MuchTree.pyx":1268 * for i in xrange( length ) : * if as_row_ids : * column[i] = self.row_map[ self.table[ col_id ].links[i] ] # <<<<<<<<<<<<<< * else : * column[i] = self.table[ col_id ].links[i] */ - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1246, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1246, __pyx_L1_error) - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->row_map, ((__pyx_v_self->table[__pyx_t_8]).links[__pyx_t_9]), unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1246, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->row_map, ((__pyx_v_self->table[__pyx_t_8]).links[__pyx_t_9]), unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyObject_SetItem(__pyx_v_column, __pyx_v_i, __pyx_t_4) < 0))) __PYX_ERR(0, 1246, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_column, __pyx_v_i, __pyx_t_4) < 0))) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":1245 + /* "MuchTree.pyx":1267 * column = np.ndarray( self.table[ col_id ].length, dtype=int ) * for i in xrange( length ) : * if as_row_ids : # <<<<<<<<<<<<<< @@ -44978,7 +44667,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ goto __pyx_L7; } - /* "MuchTree.pyx":1248 + /* "MuchTree.pyx":1270 * column[i] = self.row_map[ self.table[ col_id ].links[i] ] * else : * column[i] = self.table[ col_id ].links[i] # <<<<<<<<<<<<<< @@ -44986,16 +44675,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ * return column */ /*else*/ { - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1248, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1248, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_self->table[__pyx_t_9]).links[__pyx_t_8])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_self->table[__pyx_t_9]).links[__pyx_t_8])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyObject_SetItem(__pyx_v_column, __pyx_v_i, __pyx_t_4) < 0))) __PYX_ERR(0, 1248, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_column, __pyx_v_i, __pyx_t_4) < 0))) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L7:; - /* "MuchTree.pyx":1244 + /* "MuchTree.pyx":1266 * length = self.table[ col_id ].length * column = np.ndarray( self.table[ col_id ].length, dtype=int ) * for i in xrange( length ) : # <<<<<<<<<<<<<< @@ -45005,7 +44694,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1250 + /* "MuchTree.pyx":1272 * column[i] = self.table[ col_id ].links[i] * * return column # <<<<<<<<<<<<<< @@ -45017,7 +44706,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ __pyx_r = __pyx_v_column; goto __pyx_L0; - /* "MuchTree.pyx":1232 + /* "MuchTree.pyx":1254 * return self.subset_n_links * * def get_column_leafs( self, col, as_row_ids=False ) : # <<<<<<<<<<<<<< @@ -45042,7 +44731,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_6get_column_leafs(struct _ return __pyx_r; } -/* "MuchTree.pyx":1252 +/* "MuchTree.pyx":1274 * return column * * def get_column_links( self, col ) : # <<<<<<<<<<<<<< @@ -45103,12 +44792,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_column_links") < 0)) __PYX_ERR(0, 1252, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_column_links") < 0)) __PYX_ERR(0, 1274, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -45119,7 +44808,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_column_links", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1252, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_column_links", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1274, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -45168,7 +44857,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_column_links", 1); - /* "MuchTree.pyx":1254 + /* "MuchTree.pyx":1276 * def get_column_links( self, col ) : * * if isinstance(col, basestring) : # <<<<<<<<<<<<<< @@ -45178,14 +44867,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_col); if (__pyx_t_1) { - /* "MuchTree.pyx":1255 + /* "MuchTree.pyx":1277 * * if isinstance(col, basestring) : * col_id = self.col_names.index( col ) # <<<<<<<<<<<<<< * else : * col_id = col */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->col_names, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->col_names, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -45205,14 +44894,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_col}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_col_id = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1254 + /* "MuchTree.pyx":1276 * def get_column_links( self, col ) : * * if isinstance(col, basestring) : # <<<<<<<<<<<<<< @@ -45222,7 +44911,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ goto __pyx_L3; } - /* "MuchTree.pyx":1257 + /* "MuchTree.pyx":1279 * col_id = self.col_names.index( col ) * else : * col_id = col # <<<<<<<<<<<<<< @@ -45235,44 +44924,44 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ } __pyx_L3:; - /* "MuchTree.pyx":1259 + /* "MuchTree.pyx":1281 * col_id = col * * if col_id > self.n_cols : # <<<<<<<<<<<<<< * raise Exception( 'col_id out of bounds', col_id ) * */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_col_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_col_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":1260 + /* "MuchTree.pyx":1282 * * if col_id > self.n_cols : * raise Exception( 'col_id out of bounds', col_id ) # <<<<<<<<<<<<<< * * length = self.table[ col_id ].length */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_col_id_out_of_bounds); __Pyx_GIVEREF(__pyx_kp_u_col_id_out_of_bounds); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_col_id_out_of_bounds)) __PYX_ERR(0, 1260, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_col_id_out_of_bounds)) __PYX_ERR(0, 1282, __pyx_L1_error); __Pyx_INCREF(__pyx_v_col_id); __Pyx_GIVEREF(__pyx_v_col_id); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_col_id)) __PYX_ERR(0, 1260, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_col_id)) __PYX_ERR(0, 1282, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1260, __pyx_L1_error) + __PYX_ERR(0, 1282, __pyx_L1_error) - /* "MuchTree.pyx":1259 + /* "MuchTree.pyx":1281 * col_id = col * * if col_id > self.n_cols : # <<<<<<<<<<<<<< @@ -45281,42 +44970,42 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ */ } - /* "MuchTree.pyx":1262 + /* "MuchTree.pyx":1284 * raise Exception( 'col_id out of bounds', col_id ) * * length = self.table[ col_id ].length # <<<<<<<<<<<<<< * column = np.zeros( self.n_rows, dtype=bool ) * for i in xrange( length ) : */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->table[__pyx_t_6]).length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->table[__pyx_t_6]).length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_length = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1263 + /* "MuchTree.pyx":1285 * * length = self.table[ col_id ].length * column = np.zeros( self.n_rows, dtype=bool ) # <<<<<<<<<<<<<< * for i in xrange( length ) : * column[ self.row_map[ self.table[ col_id ].links[i] ] ] = True */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->n_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1263, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1263, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -45324,23 +45013,23 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ __pyx_v_column = __pyx_t_7; __pyx_t_7 = 0; - /* "MuchTree.pyx":1264 + /* "MuchTree.pyx":1286 * length = self.table[ col_id ].length * column = np.zeros( self.n_rows, dtype=bool ) * for i in xrange( length ) : # <<<<<<<<<<<<<< * column[ self.row_map[ self.table[ col_id ].links[i] ] ] = True * */ - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_v_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1286, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -45349,28 +45038,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1286, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1286, __pyx_L1_error) #else - __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1286, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1286, __pyx_L1_error) #else - __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -45380,7 +45069,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1264, __pyx_L1_error) + else __PYX_ERR(0, 1286, __pyx_L1_error) } break; } @@ -45389,21 +45078,21 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7); __pyx_t_7 = 0; - /* "MuchTree.pyx":1265 + /* "MuchTree.pyx":1287 * column = np.zeros( self.n_rows, dtype=bool ) * for i in xrange( length ) : * column[ self.row_map[ self.table[ col_id ].links[i] ] ] = True # <<<<<<<<<<<<<< * * return column */ - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error) - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_self->row_map, ((__pyx_v_self->table[__pyx_t_9]).links[__pyx_t_10]), unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col_id); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_self->row_map, ((__pyx_v_self->table[__pyx_t_9]).links[__pyx_t_10]), unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely((PyObject_SetItem(__pyx_v_column, __pyx_t_7, Py_True) < 0))) __PYX_ERR(0, 1265, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_column, __pyx_t_7, Py_True) < 0))) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "MuchTree.pyx":1264 + /* "MuchTree.pyx":1286 * length = self.table[ col_id ].length * column = np.zeros( self.n_rows, dtype=bool ) * for i in xrange( length ) : # <<<<<<<<<<<<<< @@ -45413,7 +45102,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1267 + /* "MuchTree.pyx":1289 * column[ self.row_map[ self.table[ col_id ].links[i] ] ] = True * * return column # <<<<<<<<<<<<<< @@ -45425,7 +45114,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ __pyx_r = __pyx_v_column; goto __pyx_L0; - /* "MuchTree.pyx":1252 + /* "MuchTree.pyx":1274 * return column * * def get_column_links( self, col ) : # <<<<<<<<<<<<<< @@ -45451,7 +45140,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8get_column_links(struct _ return __pyx_r; } -/* "MuchTree.pyx":1271 +/* "MuchTree.pyx":1293 * property linkmatrix : * 'numpy representation of link matrix (generated only on access)' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -45483,18 +45172,18 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10linkmatrix___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1272 + /* "MuchTree.pyx":1294 * 'numpy representation of link matrix (generated only on access)' * def __get__( self ) : * self._build_linkmatrix() # <<<<<<<<<<<<<< * return self.np_table * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linkmatrix(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linkmatrix(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":1273 + /* "MuchTree.pyx":1295 * def __get__( self ) : * self._build_linkmatrix() * return self.np_table # <<<<<<<<<<<<<< @@ -45506,7 +45195,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10linkmatrix___get__(struc __pyx_r = __pyx_v_self->np_table; goto __pyx_L0; - /* "MuchTree.pyx":1271 + /* "MuchTree.pyx":1293 * property linkmatrix : * 'numpy representation of link matrix (generated only on access)' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -45525,7 +45214,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10linkmatrix___get__(struc return __pyx_r; } -/* "MuchTree.pyx":1276 +/* "MuchTree.pyx":1298 * * @cython.boundscheck(False) * cdef _build_linkmatrix( self ) : # <<<<<<<<<<<<<< @@ -45559,39 +45248,39 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_build_linkmatrix", 1); - /* "MuchTree.pyx":1286 + /* "MuchTree.pyx":1308 * cdef unsigned int row_id * * self.np_table = np.zeros( (self.subset_a_size, self.subset_b_size), dtype=bool ) # <<<<<<<<<<<<<< * * for col in self.subset_columns : */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1286, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -45602,7 +45291,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ __pyx_v_self->np_table = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1288 + /* "MuchTree.pyx":1310 * self.np_table = np.zeros( (self.subset_a_size, self.subset_b_size), dtype=bool ) * * for col in self.subset_columns : # <<<<<<<<<<<<<< @@ -45614,9 +45303,9 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->subset_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->subset_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -45624,28 +45313,28 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -45655,7 +45344,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1288, __pyx_L1_error) + else __PYX_ERR(0, 1310, __pyx_L1_error) } break; } @@ -45664,30 +45353,30 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ __Pyx_XDECREF_SET(__pyx_v_col, __pyx_t_4); __pyx_t_4 = 0; - /* "MuchTree.pyx":1289 + /* "MuchTree.pyx":1311 * * for col in self.subset_columns : * for j in xrange( self.table[col].length ) : # <<<<<<<<<<<<<< * m = self.table[col].links[j] * for l in self.subset_a_leafs : */ - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L1_error) __pyx_t_8 = (__pyx_v_self->table[__pyx_t_7]).length; __pyx_t_9 = __pyx_t_8; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; - /* "MuchTree.pyx":1290 + /* "MuchTree.pyx":1312 * for col in self.subset_columns : * for j in xrange( self.table[col].length ) : * m = self.table[col].links[j] # <<<<<<<<<<<<<< * for l in self.subset_a_leafs : * if l == m : */ - __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1290, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_col); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L1_error) __pyx_v_m = ((__pyx_v_self->table[__pyx_t_7]).links[__pyx_v_j]); - /* "MuchTree.pyx":1291 + /* "MuchTree.pyx":1313 * for j in xrange( self.table[col].length ) : * m = self.table[col].links[j] * for l in self.subset_a_leafs : # <<<<<<<<<<<<<< @@ -45699,9 +45388,9 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ __pyx_t_7 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_self->subset_a_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_self->subset_a_leafs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1313, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { @@ -45709,28 +45398,28 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1291, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1313, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1313, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1291, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1313, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1313, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -45740,17 +45429,17 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1291, __pyx_L1_error) + else __PYX_ERR(0, 1313, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_l = __pyx_t_12; - /* "MuchTree.pyx":1292 + /* "MuchTree.pyx":1314 * m = self.table[col].links[j] * for l in self.subset_a_leafs : * if l == m : # <<<<<<<<<<<<<< @@ -45760,40 +45449,40 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ __pyx_t_13 = (__pyx_v_l == __pyx_v_m); if (__pyx_t_13) { - /* "MuchTree.pyx":1293 + /* "MuchTree.pyx":1315 * for l in self.subset_a_leafs : * if l == m : * row_id = self.row_map[ m ] # <<<<<<<<<<<<<< * self.np_table[ row_id, col ] = True * continue */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->row_map, __pyx_v_m, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->row_map, __pyx_v_m, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_row_id = __pyx_t_12; - /* "MuchTree.pyx":1294 + /* "MuchTree.pyx":1316 * if l == m : * row_id = self.row_map[ m ] * self.np_table[ row_id, col ] = True # <<<<<<<<<<<<<< * continue * */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_row_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_row_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1316, __pyx_L1_error); __Pyx_INCREF(__pyx_v_col); __Pyx_GIVEREF(__pyx_v_col); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_col)) __PYX_ERR(0, 1294, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_col)) __PYX_ERR(0, 1316, __pyx_L1_error); __pyx_t_3 = 0; - if (unlikely((PyObject_SetItem(__pyx_v_self->np_table, __pyx_t_2, Py_True) < 0))) __PYX_ERR(0, 1294, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_self->np_table, __pyx_t_2, Py_True) < 0))) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1295 + /* "MuchTree.pyx":1317 * row_id = self.row_map[ m ] * self.np_table[ row_id, col ] = True * continue # <<<<<<<<<<<<<< @@ -45802,7 +45491,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ */ goto __pyx_L7_continue; - /* "MuchTree.pyx":1292 + /* "MuchTree.pyx":1314 * m = self.table[col].links[j] * for l in self.subset_a_leafs : * if l == m : # <<<<<<<<<<<<<< @@ -45811,7 +45500,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ */ } - /* "MuchTree.pyx":1291 + /* "MuchTree.pyx":1313 * for j in xrange( self.table[col].length ) : * m = self.table[col].links[j] * for l in self.subset_a_leafs : # <<<<<<<<<<<<<< @@ -45823,7 +45512,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "MuchTree.pyx":1288 + /* "MuchTree.pyx":1310 * self.np_table = np.zeros( (self.subset_a_size, self.subset_b_size), dtype=bool ) * * for col in self.subset_columns : # <<<<<<<<<<<<<< @@ -45833,7 +45522,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":1276 + /* "MuchTree.pyx":1298 * * @cython.boundscheck(False) * cdef _build_linkmatrix( self ) : # <<<<<<<<<<<<<< @@ -45858,7 +45547,7 @@ static PyObject *__pyx_f_8MuchTree_15SuchLinkedTrees__build_linkmatrix(struct __ return __pyx_r; } -/* "MuchTree.pyx":1299 +/* "MuchTree.pyx":1321 * property linklist : * 'numpy representation of link list' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -45891,7 +45580,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8linklist___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "MuchTree.pyx":1301 + /* "MuchTree.pyx":1323 * def __get__( self ) : * # length will be shorter with subsetted link matrixes * return self.np_linklist[:self.subset_n_links,:] # <<<<<<<<<<<<<< @@ -45899,27 +45588,27 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8linklist___get__(struct _ * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_n_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_n_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySlice_New(Py_None, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_2 = PySlice_New(Py_None, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error); __Pyx_INCREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__5)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__5)) __PYX_ERR(0, 1323, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->np_linklist, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->np_linklist, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1299 + /* "MuchTree.pyx":1321 * property linklist : * 'numpy representation of link list' * def __get__( self ) : # <<<<<<<<<<<<<< @@ -45939,7 +45628,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_8linklist___get__(struct _ return __pyx_r; } -/* "MuchTree.pyx":1304 +/* "MuchTree.pyx":1326 * * @cython.boundscheck(False) * cdef void _build_linklist( self ) : # <<<<<<<<<<<<<< @@ -45979,7 +45668,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "MuchTree.pyx":1311 + /* "MuchTree.pyx":1333 * cdef unsigned int n * cdef unsigned int col * cdef unsigned int k = 0 # <<<<<<<<<<<<<< @@ -45988,67 +45677,67 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj */ __pyx_v_k = 0; - /* "MuchTree.pyx":1314 + /* "MuchTree.pyx":1336 * * # Memoryviews into numpy arrays * cdef long [:] col_ids = self.col_ids # <<<<<<<<<<<<<< * cdef long [:] subset_columns = self.subset_columns * cdef long [:] subset_a_leafs = self.subset_a_leafs */ - __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->col_ids, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->col_ids, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1336, __pyx_L1_error) __pyx_v_col_ids = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "MuchTree.pyx":1315 + /* "MuchTree.pyx":1337 * # Memoryviews into numpy arrays * cdef long [:] col_ids = self.col_ids * cdef long [:] subset_columns = self.subset_columns # <<<<<<<<<<<<<< * cdef long [:] subset_a_leafs = self.subset_a_leafs * cdef long [:] subset_b_leafs = self.subset_b_leafs */ - __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->subset_columns, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->subset_columns, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1337, __pyx_L1_error) __pyx_v_subset_columns = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "MuchTree.pyx":1316 + /* "MuchTree.pyx":1338 * cdef long [:] col_ids = self.col_ids * cdef long [:] subset_columns = self.subset_columns * cdef long [:] subset_a_leafs = self.subset_a_leafs # <<<<<<<<<<<<<< * cdef long [:] subset_b_leafs = self.subset_b_leafs * cdef long [:,:] np_linklist = self.np_linklist */ - __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->subset_a_leafs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->subset_a_leafs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1338, __pyx_L1_error) __pyx_v_subset_a_leafs = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "MuchTree.pyx":1317 + /* "MuchTree.pyx":1339 * cdef long [:] subset_columns = self.subset_columns * cdef long [:] subset_a_leafs = self.subset_a_leafs * cdef long [:] subset_b_leafs = self.subset_b_leafs # <<<<<<<<<<<<<< * cdef long [:,:] np_linklist = self.np_linklist * */ - __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->subset_b_leafs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_self->subset_b_leafs, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(0, 1339, __pyx_L1_error) __pyx_v_subset_b_leafs = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "MuchTree.pyx":1318 + /* "MuchTree.pyx":1340 * cdef long [:] subset_a_leafs = self.subset_a_leafs * cdef long [:] subset_b_leafs = self.subset_b_leafs * cdef long [:,:] np_linklist = self.np_linklist # <<<<<<<<<<<<<< * * for i in xrange( self.subset_b_size ) : */ - __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_self->np_linklist, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_self->np_linklist, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1340, __pyx_L1_error) __pyx_v_np_linklist = __pyx_t_2; __pyx_t_2.memview = NULL; __pyx_t_2.data = NULL; - /* "MuchTree.pyx":1320 + /* "MuchTree.pyx":1342 * cdef long [:,:] np_linklist = self.np_linklist * * for i in xrange( self.subset_b_size ) : # <<<<<<<<<<<<<< @@ -46060,7 +45749,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "MuchTree.pyx":1321 + /* "MuchTree.pyx":1343 * * for i in xrange( self.subset_b_size ) : * col = subset_columns[i] # <<<<<<<<<<<<<< @@ -46070,7 +45759,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj __pyx_t_6 = __pyx_v_i; __pyx_v_col = (*((long *) ( /* dim=0 */ (__pyx_v_subset_columns.data + __pyx_t_6 * __pyx_v_subset_columns.strides[0]) ))); - /* "MuchTree.pyx":1322 + /* "MuchTree.pyx":1344 * for i in xrange( self.subset_b_size ) : * col = subset_columns[i] * for j in xrange( self.table[col].length ) : # <<<<<<<<<<<<<< @@ -46082,7 +45771,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_j = __pyx_t_9; - /* "MuchTree.pyx":1323 + /* "MuchTree.pyx":1345 * col = subset_columns[i] * for j in xrange( self.table[col].length ) : * m = self.table[col].links[j] # <<<<<<<<<<<<<< @@ -46091,7 +45780,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj */ __pyx_v_m = ((__pyx_v_self->table[__pyx_v_col]).links[__pyx_v_j]); - /* "MuchTree.pyx":1324 + /* "MuchTree.pyx":1346 * for j in xrange( self.table[col].length ) : * m = self.table[col].links[j] * for l in xrange( self.subset_a_size ) : # <<<<<<<<<<<<<< @@ -46103,7 +45792,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_l = __pyx_t_12; - /* "MuchTree.pyx":1325 + /* "MuchTree.pyx":1347 * m = self.table[col].links[j] * for l in xrange( self.subset_a_size ) : * n = subset_a_leafs[l] # <<<<<<<<<<<<<< @@ -46113,7 +45802,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj __pyx_t_6 = __pyx_v_l; __pyx_v_n = (*((long *) ( /* dim=0 */ (__pyx_v_subset_a_leafs.data + __pyx_t_6 * __pyx_v_subset_a_leafs.strides[0]) ))); - /* "MuchTree.pyx":1326 + /* "MuchTree.pyx":1348 * for l in xrange( self.subset_a_size ) : * n = subset_a_leafs[l] * if n == m : # <<<<<<<<<<<<<< @@ -46123,7 +45812,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj __pyx_t_13 = (__pyx_v_n == __pyx_v_m); if (__pyx_t_13) { - /* "MuchTree.pyx":1327 + /* "MuchTree.pyx":1349 * n = subset_a_leafs[l] * if n == m : * np_linklist[ k, 0 ] = col_ids[col] # <<<<<<<<<<<<<< @@ -46136,7 +45825,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_np_linklist.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_np_linklist.data + __pyx_t_14 * __pyx_v_np_linklist.strides[0]) ) + __pyx_t_15 * __pyx_v_np_linklist.strides[1]) )) = (*((long *) ( /* dim=0 */ (__pyx_v_col_ids.data + __pyx_t_6 * __pyx_v_col_ids.strides[0]) ))); - /* "MuchTree.pyx":1328 + /* "MuchTree.pyx":1350 * if n == m : * np_linklist[ k, 0 ] = col_ids[col] * np_linklist[ k, 1 ] = m # <<<<<<<<<<<<<< @@ -46148,7 +45837,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_v_np_linklist.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_np_linklist.data + __pyx_t_6 * __pyx_v_np_linklist.strides[0]) ) + __pyx_t_15 * __pyx_v_np_linklist.strides[1]) )) = __pyx_v_m; - /* "MuchTree.pyx":1329 + /* "MuchTree.pyx":1351 * np_linklist[ k, 0 ] = col_ids[col] * np_linklist[ k, 1 ] = m * k += 1 # <<<<<<<<<<<<<< @@ -46157,7 +45846,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj */ __pyx_v_k = (__pyx_v_k + 1); - /* "MuchTree.pyx":1330 + /* "MuchTree.pyx":1352 * np_linklist[ k, 1 ] = m * k += 1 * continue # <<<<<<<<<<<<<< @@ -46166,7 +45855,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj */ goto __pyx_L7_continue; - /* "MuchTree.pyx":1326 + /* "MuchTree.pyx":1348 * for l in xrange( self.subset_a_size ) : * n = subset_a_leafs[l] * if n == m : # <<<<<<<<<<<<<< @@ -46179,7 +45868,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj } } - /* "MuchTree.pyx":1332 + /* "MuchTree.pyx":1354 * continue * * self.subset_n_links = k # <<<<<<<<<<<<<< @@ -46188,7 +45877,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj */ __pyx_v_self->subset_n_links = __pyx_v_k; - /* "MuchTree.pyx":1304 + /* "MuchTree.pyx":1326 * * @cython.boundscheck(False) * cdef void _build_linklist( self ) : # <<<<<<<<<<<<<< @@ -46210,7 +45899,7 @@ static void __pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist(struct __pyx_obj __PYX_XCLEAR_MEMVIEW(&__pyx_v_np_linklist, 1); } -/* "MuchTree.pyx":1334 +/* "MuchTree.pyx":1356 * self.subset_n_links = k * * def subset_b( self, node_id ) : # <<<<<<<<<<<<<< @@ -46272,12 +45961,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1334, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "subset_b") < 0)) __PYX_ERR(0, 1334, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "subset_b") < 0)) __PYX_ERR(0, 1356, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -46288,7 +45977,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("subset_b", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1334, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("subset_b", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1356, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -46330,54 +46019,54 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("subset_b", 1); - /* "MuchTree.pyx":1337 + /* "MuchTree.pyx":1359 * 'subset the link matrix to leafs desended from node_id in TreeB' * * if node_id > self.TreeB.length or node_id < 0 : # <<<<<<<<<<<<<< * raise Exception( 'Node ID out of bounds.', node_id ) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":1338 + /* "MuchTree.pyx":1360 * * if node_id > self.TreeB.length or node_id < 0 : * raise Exception( 'Node ID out of bounds.', node_id ) # <<<<<<<<<<<<<< * * self.subset_b_leafs = self.TreeB.get_leafs( node_id ) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_Node_ID_out_of_bounds); __Pyx_GIVEREF(__pyx_kp_u_Node_ID_out_of_bounds); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Node_ID_out_of_bounds)) __PYX_ERR(0, 1338, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Node_ID_out_of_bounds)) __PYX_ERR(0, 1360, __pyx_L1_error); __Pyx_INCREF(__pyx_v_node_id); __Pyx_GIVEREF(__pyx_v_node_id); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_node_id)) __PYX_ERR(0, 1338, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_node_id)) __PYX_ERR(0, 1360, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1338, __pyx_L1_error) + __PYX_ERR(0, 1360, __pyx_L1_error) - /* "MuchTree.pyx":1337 + /* "MuchTree.pyx":1359 * 'subset the link matrix to leafs desended from node_id in TreeB' * * if node_id > self.TreeB.length or node_id < 0 : # <<<<<<<<<<<<<< @@ -46386,14 +46075,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob */ } - /* "MuchTree.pyx":1340 + /* "MuchTree.pyx":1362 * raise Exception( 'Node ID out of bounds.', node_id ) * * self.subset_b_leafs = self.TreeB.get_leafs( node_id ) # <<<<<<<<<<<<<< * self.subset_columns = self.TreeB.get_links( self.subset_b_leafs ) * self.subset_b_size = len( self.subset_columns ) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_get_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_get_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -46413,7 +46102,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_node_id}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -46423,14 +46112,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob __pyx_v_self->subset_b_leafs = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1341 + /* "MuchTree.pyx":1363 * * self.subset_b_leafs = self.TreeB.get_leafs( node_id ) * self.subset_columns = self.TreeB.get_links( self.subset_b_leafs ) # <<<<<<<<<<<<<< * self.subset_b_size = len( self.subset_columns ) * self.subset_b_root = node_id */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_get_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_get_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -46450,7 +46139,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->subset_b_leafs}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -46460,7 +46149,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob __pyx_v_self->subset_columns = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1342 + /* "MuchTree.pyx":1364 * self.subset_b_leafs = self.TreeB.get_leafs( node_id ) * self.subset_columns = self.TreeB.get_links( self.subset_b_leafs ) * self.subset_b_size = len( self.subset_columns ) # <<<<<<<<<<<<<< @@ -46469,30 +46158,30 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob */ __pyx_t_2 = __pyx_v_self->subset_columns; __Pyx_INCREF(__pyx_t_2); - __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->subset_b_size = __pyx_t_7; - /* "MuchTree.pyx":1343 + /* "MuchTree.pyx":1365 * self.subset_columns = self.TreeB.get_links( self.subset_b_leafs ) * self.subset_b_size = len( self.subset_columns ) * self.subset_b_root = node_id # <<<<<<<<<<<<<< * self._build_linklist() * */ - __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_node_id); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_node_id); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1365, __pyx_L1_error) __pyx_v_self->subset_b_root = __pyx_t_6; - /* "MuchTree.pyx":1344 + /* "MuchTree.pyx":1366 * self.subset_b_size = len( self.subset_columns ) * self.subset_b_root = node_id * self._build_linklist() # <<<<<<<<<<<<<< * * def subset_a( self, node_id ) : */ - ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linklist(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error) + ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linklist(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L1_error) - /* "MuchTree.pyx":1334 + /* "MuchTree.pyx":1356 * self.subset_n_links = k * * def subset_b( self, node_id ) : # <<<<<<<<<<<<<< @@ -46515,7 +46204,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_10subset_b(struct __pyx_ob return __pyx_r; } -/* "MuchTree.pyx":1346 +/* "MuchTree.pyx":1368 * self._build_linklist() * * def subset_a( self, node_id ) : # <<<<<<<<<<<<<< @@ -46577,12 +46266,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1346, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "subset_a") < 0)) __PYX_ERR(0, 1346, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "subset_a") < 0)) __PYX_ERR(0, 1368, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -46593,7 +46282,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("subset_a", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1346, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("subset_a", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1368, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -46635,54 +46324,54 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("subset_a", 1); - /* "MuchTree.pyx":1349 + /* "MuchTree.pyx":1371 * 'subset the link matrix to leafs desended from node_id in TreeA' * * if node_id > self.TreeA.length or node_id < 0 : # <<<<<<<<<<<<<< * raise Exception( 'Node ID out of bounds.', node_id ) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1349, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_node_id, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "MuchTree.pyx":1350 + /* "MuchTree.pyx":1372 * * if node_id > self.TreeA.length or node_id < 0 : * raise Exception( 'Node ID out of bounds.', node_id ) # <<<<<<<<<<<<<< * * self.subset_a_leafs = self.TreeA.get_leafs( node_id ) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_Node_ID_out_of_bounds); __Pyx_GIVEREF(__pyx_kp_u_Node_ID_out_of_bounds); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Node_ID_out_of_bounds)) __PYX_ERR(0, 1350, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Node_ID_out_of_bounds)) __PYX_ERR(0, 1372, __pyx_L1_error); __Pyx_INCREF(__pyx_v_node_id); __Pyx_GIVEREF(__pyx_v_node_id); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_node_id)) __PYX_ERR(0, 1350, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_node_id)) __PYX_ERR(0, 1372, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1350, __pyx_L1_error) + __PYX_ERR(0, 1372, __pyx_L1_error) - /* "MuchTree.pyx":1349 + /* "MuchTree.pyx":1371 * 'subset the link matrix to leafs desended from node_id in TreeA' * * if node_id > self.TreeA.length or node_id < 0 : # <<<<<<<<<<<<<< @@ -46691,14 +46380,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob */ } - /* "MuchTree.pyx":1352 + /* "MuchTree.pyx":1374 * raise Exception( 'Node ID out of bounds.', node_id ) * * self.subset_a_leafs = self.TreeA.get_leafs( node_id ) # <<<<<<<<<<<<<< * self.subset_rows = self.TreeA.get_links( self.subset_a_leafs ) * self.subset_a_size = len( self.subset_rows ) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_get_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_get_leafs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -46718,7 +46407,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_node_id}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -46728,14 +46417,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob __pyx_v_self->subset_a_leafs = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1353 + /* "MuchTree.pyx":1375 * * self.subset_a_leafs = self.TreeA.get_leafs( node_id ) * self.subset_rows = self.TreeA.get_links( self.subset_a_leafs ) # <<<<<<<<<<<<<< * self.subset_a_size = len( self.subset_rows ) * self.subset_a_root = node_id */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_get_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_get_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -46755,7 +46444,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->subset_a_leafs}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -46765,7 +46454,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob __pyx_v_self->subset_rows = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1354 + /* "MuchTree.pyx":1376 * self.subset_a_leafs = self.TreeA.get_leafs( node_id ) * self.subset_rows = self.TreeA.get_links( self.subset_a_leafs ) * self.subset_a_size = len( self.subset_rows ) # <<<<<<<<<<<<<< @@ -46774,30 +46463,30 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob */ __pyx_t_2 = __pyx_v_self->subset_rows; __Pyx_INCREF(__pyx_t_2); - __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->subset_a_size = __pyx_t_7; - /* "MuchTree.pyx":1355 + /* "MuchTree.pyx":1377 * self.subset_rows = self.TreeA.get_links( self.subset_a_leafs ) * self.subset_a_size = len( self.subset_rows ) * self.subset_a_root = node_id # <<<<<<<<<<<<<< * self._build_linklist() * */ - __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_node_id); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_node_id); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L1_error) __pyx_v_self->subset_a_root = __pyx_t_6; - /* "MuchTree.pyx":1356 + /* "MuchTree.pyx":1378 * self.subset_a_size = len( self.subset_rows ) * self.subset_a_root = node_id * self._build_linklist() # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ - ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linklist(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L1_error) + ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_build_linklist(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1378, __pyx_L1_error) - /* "MuchTree.pyx":1346 + /* "MuchTree.pyx":1368 * self._build_linklist() * * def subset_a( self, node_id ) : # <<<<<<<<<<<<<< @@ -46820,7 +46509,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_12subset_a(struct __pyx_ob return __pyx_r; } -/* "MuchTree.pyx":1358 +/* "MuchTree.pyx":1380 * self._build_linklist() * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -46902,7 +46591,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("linked_distances", 1); - /* "MuchTree.pyx":1366 + /* "MuchTree.pyx":1388 * cdef unsigned int i * cdef unsigned int j * cdef unsigned int k = 0 # <<<<<<<<<<<<<< @@ -46911,7 +46600,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct */ __pyx_v_k = 0; - /* "MuchTree.pyx":1367 + /* "MuchTree.pyx":1389 * cdef unsigned int j * cdef unsigned int k = 0 * cdef unsigned int size = ( self.subset_n_links * (self.subset_n_links-1) ) // 2 # <<<<<<<<<<<<<< @@ -46920,107 +46609,107 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct */ __pyx_v_size = __Pyx_div_long((__pyx_v_self->subset_n_links * (__pyx_v_self->subset_n_links - 1)), 2); - /* "MuchTree.pyx":1369 + /* "MuchTree.pyx":1391 * cdef unsigned int size = ( self.subset_n_links * (self.subset_n_links-1) ) // 2 * * ids_a = np.ndarray( ( size, 2 ), dtype=int ) # <<<<<<<<<<<<<< * ids_b = np.ndarray( ( size, 2 ), dtype=int ) * */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1369, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1391, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1369, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ids_a = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1370 + /* "MuchTree.pyx":1392 * * ids_a = np.ndarray( ( size, 2 ), dtype=int ) * ids_b = np.ndarray( ( size, 2 ), dtype=int ) # <<<<<<<<<<<<<< * * cdef long [:,:] linklist = self.np_linklist */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1392, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1370, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1392, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1370, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1392, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __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; __pyx_v_ids_b = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1372 + /* "MuchTree.pyx":1394 * ids_b = np.ndarray( ( size, 2 ), dtype=int ) * * cdef long [:,:] linklist = self.np_linklist # <<<<<<<<<<<<<< * cdef long [:,:] IDs_a = ids_a * cdef long [:,:] IDs_b = ids_b */ - __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_self->np_linklist, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1372, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_self->np_linklist, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1394, __pyx_L1_error) __pyx_v_linklist = __pyx_t_4; __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; - /* "MuchTree.pyx":1373 + /* "MuchTree.pyx":1395 * * cdef long [:,:] linklist = self.np_linklist * cdef long [:,:] IDs_a = ids_a # <<<<<<<<<<<<<< * cdef long [:,:] IDs_b = ids_b * */ - __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_ids_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_ids_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1395, __pyx_L1_error) __pyx_v_IDs_a = __pyx_t_4; __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; - /* "MuchTree.pyx":1374 + /* "MuchTree.pyx":1396 * cdef long [:,:] linklist = self.np_linklist * cdef long [:,:] IDs_a = ids_a * cdef long [:,:] IDs_b = ids_b # <<<<<<<<<<<<<< * * with nogil : */ - __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_ids_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_ids_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 1396, __pyx_L1_error) __pyx_v_IDs_b = __pyx_t_4; __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL; - /* "MuchTree.pyx":1376 + /* "MuchTree.pyx":1398 * cdef long [:,:] IDs_b = ids_b * * with nogil : # <<<<<<<<<<<<<< @@ -47036,7 +46725,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct #endif /*try:*/ { - /* "MuchTree.pyx":1377 + /* "MuchTree.pyx":1399 * * with nogil : * for i in xrange( self.subset_n_links ) : # <<<<<<<<<<<<<< @@ -47048,7 +46737,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; - /* "MuchTree.pyx":1378 + /* "MuchTree.pyx":1400 * with nogil : * for i in xrange( self.subset_n_links ) : * for j in xrange( i ) : # <<<<<<<<<<<<<< @@ -47060,7 +46749,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { __pyx_v_j = __pyx_t_10; - /* "MuchTree.pyx":1379 + /* "MuchTree.pyx":1401 * for i in xrange( self.subset_n_links ) : * for j in xrange( i ) : * IDs_a[ k, 1 ] = linklist[ i, 1 ] # <<<<<<<<<<<<<< @@ -47075,7 +46764,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_IDs_a.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_IDs_a.data + __pyx_t_13 * __pyx_v_IDs_a.strides[0]) ) + __pyx_t_14 * __pyx_v_IDs_a.strides[1]) )) = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_11 * __pyx_v_linklist.strides[0]) ) + __pyx_t_12 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1380 + /* "MuchTree.pyx":1402 * for j in xrange( i ) : * IDs_a[ k, 1 ] = linklist[ i, 1 ] * IDs_a[ k, 0 ] = linklist[ j, 1 ] # <<<<<<<<<<<<<< @@ -47090,7 +46779,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_IDs_a.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_IDs_a.data + __pyx_t_13 * __pyx_v_IDs_a.strides[0]) ) + __pyx_t_14 * __pyx_v_IDs_a.strides[1]) )) = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_11 * __pyx_v_linklist.strides[0]) ) + __pyx_t_12 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1381 + /* "MuchTree.pyx":1403 * IDs_a[ k, 1 ] = linklist[ i, 1 ] * IDs_a[ k, 0 ] = linklist[ j, 1 ] * IDs_b[ k, 1 ] = linklist[ i, 0 ] # <<<<<<<<<<<<<< @@ -47105,7 +46794,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_IDs_b.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_IDs_b.data + __pyx_t_13 * __pyx_v_IDs_b.strides[0]) ) + __pyx_t_14 * __pyx_v_IDs_b.strides[1]) )) = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_11 * __pyx_v_linklist.strides[0]) ) + __pyx_t_12 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1382 + /* "MuchTree.pyx":1404 * IDs_a[ k, 0 ] = linklist[ j, 1 ] * IDs_b[ k, 1 ] = linklist[ i, 0 ] * IDs_b[ k, 0 ] = linklist[ j, 0 ] # <<<<<<<<<<<<<< @@ -47120,7 +46809,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_v_IDs_b.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_IDs_b.data + __pyx_t_13 * __pyx_v_IDs_b.strides[0]) ) + __pyx_t_14 * __pyx_v_IDs_b.strides[1]) )) = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_11 * __pyx_v_linklist.strides[0]) ) + __pyx_t_12 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1383 + /* "MuchTree.pyx":1405 * IDs_b[ k, 1 ] = linklist[ i, 0 ] * IDs_b[ k, 0 ] = linklist[ j, 0 ] * k += 1 # <<<<<<<<<<<<<< @@ -47132,7 +46821,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct } } - /* "MuchTree.pyx":1376 + /* "MuchTree.pyx":1398 * cdef long [:,:] IDs_b = ids_b * * with nogil : # <<<<<<<<<<<<<< @@ -47151,7 +46840,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct } } - /* "MuchTree.pyx":1385 + /* "MuchTree.pyx":1407 * k += 1 * * return { 'TreeA' : self.TreeA.distances( ids_a ), # <<<<<<<<<<<<<< @@ -47159,9 +46848,9 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct * 'ids_A' : ids_a, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_distances); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_distances); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = NULL; __pyx_t_5 = 0; @@ -47181,21 +46870,21 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_ids_a}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeA, __pyx_t_2) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeA, __pyx_t_2) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1386 + /* "MuchTree.pyx":1408 * * return { 'TreeA' : self.TreeA.distances( ids_a ), * 'TreeB' : self.TreeB.distances( ids_b ), # <<<<<<<<<<<<<< * 'ids_A' : ids_a, * 'ids_B' : ids_b, */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_distances); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_distances); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = NULL; __pyx_t_5 = 0; @@ -47215,77 +46904,77 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_ids_b}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeB, __pyx_t_2) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeB, __pyx_t_2) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1387 + /* "MuchTree.pyx":1409 * return { 'TreeA' : self.TreeA.distances( ids_a ), * 'TreeB' : self.TreeB.distances( ids_b ), * 'ids_A' : ids_a, # <<<<<<<<<<<<<< * 'ids_B' : ids_b, * 'n_pairs' : size, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ids_A, __pyx_v_ids_a) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ids_A, __pyx_v_ids_a) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) - /* "MuchTree.pyx":1388 + /* "MuchTree.pyx":1410 * 'TreeB' : self.TreeB.distances( ids_b ), * 'ids_A' : ids_a, * 'ids_B' : ids_b, # <<<<<<<<<<<<<< * 'n_pairs' : size, * 'n_samples' : size, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ids_B, __pyx_v_ids_b) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ids_B, __pyx_v_ids_b) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) - /* "MuchTree.pyx":1389 + /* "MuchTree.pyx":1411 * 'ids_A' : ids_a, * 'ids_B' : ids_b, * 'n_pairs' : size, # <<<<<<<<<<<<<< * 'n_samples' : size, * 'deviation_a' : None, */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_pairs, __pyx_t_2) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_pairs, __pyx_t_2) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1390 + /* "MuchTree.pyx":1412 * 'ids_B' : ids_b, * 'n_pairs' : size, * 'n_samples' : size, # <<<<<<<<<<<<<< * 'deviation_a' : None, * 'deviation_b' : None } */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_samples, __pyx_t_2) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_samples, __pyx_t_2) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1391 + /* "MuchTree.pyx":1413 * 'n_pairs' : size, * 'n_samples' : size, * 'deviation_a' : None, # <<<<<<<<<<<<<< * 'deviation_b' : None } * */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_a, Py_None) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_a, Py_None) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) - /* "MuchTree.pyx":1392 + /* "MuchTree.pyx":1414 * 'n_samples' : size, * 'deviation_a' : None, * 'deviation_b' : None } # <<<<<<<<<<<<<< * * @cython.boundscheck(False) */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_b, Py_None) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_b, Py_None) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1358 + /* "MuchTree.pyx":1380 * self._build_linklist() * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -47313,7 +47002,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_14linked_distances(struct return __pyx_r; } -/* "MuchTree.pyx":1395 +/* "MuchTree.pyx":1417 * * @cython.boundscheck(False) * cdef uint64_t _random_int( self, uint64_t n ) nogil : # <<<<<<<<<<<<<< @@ -47331,7 +47020,7 @@ static uint64_t __pyx_f_8MuchTree_15SuchLinkedTrees__random_int(struct __pyx_obj PyGILState_STATE __pyx_gilstate_save; #endif - /* "MuchTree.pyx":1404 + /* "MuchTree.pyx":1426 * http://dx.doi.org/10.18637/jss.v008.i14 * ''' * self.seed ^= self.seed >> 12 # a # <<<<<<<<<<<<<< @@ -47340,7 +47029,7 @@ static uint64_t __pyx_f_8MuchTree_15SuchLinkedTrees__random_int(struct __pyx_obj */ __pyx_v_self->seed = (__pyx_v_self->seed ^ (__pyx_v_self->seed >> 12)); - /* "MuchTree.pyx":1405 + /* "MuchTree.pyx":1427 * ''' * self.seed ^= self.seed >> 12 # a * self.seed ^= self.seed << 25 # b # <<<<<<<<<<<<<< @@ -47349,7 +47038,7 @@ static uint64_t __pyx_f_8MuchTree_15SuchLinkedTrees__random_int(struct __pyx_obj */ __pyx_v_self->seed = (__pyx_v_self->seed ^ (__pyx_v_self->seed << 25)); - /* "MuchTree.pyx":1406 + /* "MuchTree.pyx":1428 * self.seed ^= self.seed >> 12 # a * self.seed ^= self.seed << 25 # b * self.seed ^= self.seed >> 27 # c # <<<<<<<<<<<<<< @@ -47358,7 +47047,7 @@ static uint64_t __pyx_f_8MuchTree_15SuchLinkedTrees__random_int(struct __pyx_obj */ __pyx_v_self->seed = (__pyx_v_self->seed ^ (__pyx_v_self->seed >> 27)); - /* "MuchTree.pyx":1407 + /* "MuchTree.pyx":1429 * self.seed ^= self.seed << 25 # b * self.seed ^= self.seed >> 27 # c * return ( self.seed * self.modulus ) % n # <<<<<<<<<<<<<< @@ -47374,12 +47063,12 @@ static uint64_t __pyx_f_8MuchTree_15SuchLinkedTrees__random_int(struct __pyx_obj #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif - __PYX_ERR(0, 1407, __pyx_L1_error) + __PYX_ERR(0, 1429, __pyx_L1_error) } __pyx_r = (__pyx_t_1 % __pyx_v_n); goto __pyx_L0; - /* "MuchTree.pyx":1395 + /* "MuchTree.pyx":1417 * * @cython.boundscheck(False) * cdef uint64_t _random_int( self, uint64_t n ) nogil : # <<<<<<<<<<<<<< @@ -47401,7 +47090,7 @@ static uint64_t __pyx_f_8MuchTree_15SuchLinkedTrees__random_int(struct __pyx_obj return __pyx_r; } -/* "MuchTree.pyx":1409 +/* "MuchTree.pyx":1431 * return ( self.seed * self.modulus ) % n * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -47470,33 +47159,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sigma); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buckets); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxcycles); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sample_linked_distances") < 0)) __PYX_ERR(0, 1409, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sample_linked_distances") < 0)) __PYX_ERR(0, 1431, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -47513,29 +47202,29 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_sigma = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_sigma == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1410, __pyx_L3_error) + __pyx_v_sigma = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_sigma == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1432, __pyx_L3_error) } else { __pyx_v_sigma = ((float)0.001); } if (values[1]) { - __pyx_v_buckets = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_buckets == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1411, __pyx_L3_error) + __pyx_v_buckets = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_buckets == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1433, __pyx_L3_error) } else { __pyx_v_buckets = ((unsigned int)64); } if (values[2]) { - __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1412, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1434, __pyx_L3_error) } else { __pyx_v_n = ((unsigned int)0x1000); } if (values[3]) { - __pyx_v_maxcycles = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_maxcycles == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1413, __pyx_L3_error) + __pyx_v_maxcycles = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_maxcycles == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1435, __pyx_L3_error) } else { __pyx_v_maxcycles = ((unsigned int)0x64); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("sample_linked_distances", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 1409, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("sample_linked_distances", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 1431, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -47640,209 +47329,209 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sample_linked_distances", 1); - /* "MuchTree.pyx":1415 + /* "MuchTree.pyx":1437 * unsigned int maxcycles=100 ) : * * np_query_a = np.ndarray( ( n, 2 ), dtype=int ) # <<<<<<<<<<<<<< * np_query_b = np.ndarray( ( n, 2 ), dtype=int ) * */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1415, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1437, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1415, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_np_query_a = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1416 + /* "MuchTree.pyx":1438 * * np_query_a = np.ndarray( ( n, 2 ), dtype=int ) * np_query_b = np.ndarray( ( n, 2 ), dtype=int ) # <<<<<<<<<<<<<< * * np_distances_a = np.ndarray( ( buckets, n ), dtype=float ) */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1416, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1438, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1416, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __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; __pyx_v_np_query_b = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1418 + /* "MuchTree.pyx":1440 * np_query_b = np.ndarray( ( n, 2 ), dtype=int ) * * np_distances_a = np.ndarray( ( buckets, n ), dtype=float ) # <<<<<<<<<<<<<< * np_distances_b = np.ndarray( ( buckets, n ), dtype=float ) * */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1418, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_np_distances_a = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1419 + /* "MuchTree.pyx":1441 * * np_distances_a = np.ndarray( ( buckets, n ), dtype=float ) * np_distances_b = np.ndarray( ( buckets, n ), dtype=float ) # <<<<<<<<<<<<<< * * np_dbuffer_a = np.ndarray( n, dtype=float ) */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1419, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1441, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __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; __pyx_v_np_distances_b = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1421 + /* "MuchTree.pyx":1443 * np_distances_b = np.ndarray( ( buckets, n ), dtype=float ) * * np_dbuffer_a = np.ndarray( n, dtype=float ) # <<<<<<<<<<<<<< * np_dbuffer_b = np.ndarray( n, dtype=float ) * */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1421, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_np_dbuffer_a = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1422 + /* "MuchTree.pyx":1444 * * np_dbuffer_a = np.ndarray( n, dtype=float ) * np_dbuffer_b = np.ndarray( n, dtype=float ) # <<<<<<<<<<<<<< * * np_sums_a = np.zeros( buckets, dtype=float ) */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1422, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_np_dbuffer_b = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1424 + /* "MuchTree.pyx":1446 * np_dbuffer_b = np.ndarray( n, dtype=float ) * * np_sums_a = np.zeros( buckets, dtype=float ) # <<<<<<<<<<<<<< * np_sums_b = np.zeros( buckets, dtype=float ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1446, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -47850,29 +47539,29 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_v_np_sums_a = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":1425 + /* "MuchTree.pyx":1447 * * np_sums_a = np.zeros( buckets, dtype=float ) * np_sums_b = np.zeros( buckets, dtype=float ) # <<<<<<<<<<<<<< * * np_sumsq_a = np.zeros( buckets, dtype=float ) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1425, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -47880,29 +47569,29 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_v_np_sums_b = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1427 + /* "MuchTree.pyx":1449 * np_sums_b = np.zeros( buckets, dtype=float ) * * np_sumsq_a = np.zeros( buckets, dtype=float ) # <<<<<<<<<<<<<< * np_sumsq_b = np.zeros( buckets, dtype=float ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1449, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -47910,29 +47599,29 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_v_np_sumsq_a = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1428 + /* "MuchTree.pyx":1450 * * np_sumsq_a = np.zeros( buckets, dtype=float ) * np_sumsq_b = np.zeros( buckets, dtype=float ) # <<<<<<<<<<<<<< * * np_samples_a = np.zeros( buckets, dtype=int ) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1428, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1450, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -47940,29 +47629,29 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_v_np_sumsq_b = __pyx_t_4; __pyx_t_4 = 0; - /* "MuchTree.pyx":1430 + /* "MuchTree.pyx":1452 * np_sumsq_b = np.zeros( buckets, dtype=float ) * * np_samples_a = np.zeros( buckets, dtype=int ) # <<<<<<<<<<<<<< * np_samples_b = np.zeros( buckets, dtype=int ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1430, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1430, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -47970,29 +47659,29 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_v_np_samples_a = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1431 + /* "MuchTree.pyx":1453 * * np_samples_a = np.zeros( buckets, dtype=int ) * np_samples_b = np.zeros( buckets, dtype=int ) # <<<<<<<<<<<<<< * * np_deviations_a = np.ndarray( buckets, dtype=float ) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1431, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1431, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1431, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1431, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1453, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -48000,307 +47689,307 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_v_np_samples_b = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1433 + /* "MuchTree.pyx":1455 * np_samples_b = np.zeros( buckets, dtype=int ) * * np_deviations_a = np.ndarray( buckets, dtype=float ) # <<<<<<<<<<<<<< * np_deviations_b = np.ndarray( buckets, dtype=float ) * */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __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; __pyx_v_np_deviations_a = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1434 + /* "MuchTree.pyx":1456 * * np_deviations_a = np.ndarray( buckets, dtype=float ) * np_deviations_b = np.ndarray( buckets, dtype=float ) # <<<<<<<<<<<<<< * * np_all_distances_a = np.ndarray( buckets * n * maxcycles, dtype=float ) */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_buckets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1434, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_np_deviations_b = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1436 + /* "MuchTree.pyx":1458 * np_deviations_b = np.ndarray( buckets, dtype=float ) * * np_all_distances_a = np.ndarray( buckets * n * maxcycles, dtype=float ) # <<<<<<<<<<<<<< * np_all_distances_b = np.ndarray( buckets * n * maxcycles, dtype=float ) * */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_buckets * __pyx_v_n) * __pyx_v_maxcycles)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_buckets * __pyx_v_n) * __pyx_v_maxcycles)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 1458, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1436, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1458, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_np_all_distances_a = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1437 + /* "MuchTree.pyx":1459 * * np_all_distances_a = np.ndarray( buckets * n * maxcycles, dtype=float ) * np_all_distances_b = np.ndarray( buckets * n * maxcycles, dtype=float ) # <<<<<<<<<<<<<< * * cdef long [:,:] query_a = np_query_a */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_buckets * __pyx_v_n) * __pyx_v_maxcycles)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_buckets * __pyx_v_n) * __pyx_v_maxcycles)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1437, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __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; __pyx_v_np_all_distances_b = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1439 + /* "MuchTree.pyx":1461 * np_all_distances_b = np.ndarray( buckets * n * maxcycles, dtype=float ) * * cdef long [:,:] query_a = np_query_a # <<<<<<<<<<<<<< * cdef long [:,:] query_b = np_query_b * */ - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_np_query_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1439, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_np_query_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1461, __pyx_L1_error) __pyx_v_query_a = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "MuchTree.pyx":1440 + /* "MuchTree.pyx":1462 * * cdef long [:,:] query_a = np_query_a * cdef long [:,:] query_b = np_query_b # <<<<<<<<<<<<<< * * cdef double [:,:] distances_a = np_distances_a */ - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_np_query_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_np_query_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1462, __pyx_L1_error) __pyx_v_query_b = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "MuchTree.pyx":1442 + /* "MuchTree.pyx":1464 * cdef long [:,:] query_b = np_query_b * * cdef double [:,:] distances_a = np_distances_a # <<<<<<<<<<<<<< * cdef double [:,:] distances_b = np_distances_b * */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_v_np_distances_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1442, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_v_np_distances_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1464, __pyx_L1_error) __pyx_v_distances_a = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "MuchTree.pyx":1443 + /* "MuchTree.pyx":1465 * * cdef double [:,:] distances_a = np_distances_a * cdef double [:,:] distances_b = np_distances_b # <<<<<<<<<<<<<< * * cdef double [:] distances_a_mv = np_dbuffer_a */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_v_np_distances_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_v_np_distances_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1465, __pyx_L1_error) __pyx_v_distances_b = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "MuchTree.pyx":1445 + /* "MuchTree.pyx":1467 * cdef double [:,:] distances_b = np_distances_b * * cdef double [:] distances_a_mv = np_dbuffer_a # <<<<<<<<<<<<<< * cdef double [:] distances_b_mv = np_dbuffer_b * */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_dbuffer_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_dbuffer_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1467, __pyx_L1_error) __pyx_v_distances_a_mv = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1446 + /* "MuchTree.pyx":1468 * * cdef double [:] distances_a_mv = np_dbuffer_a * cdef double [:] distances_b_mv = np_dbuffer_b # <<<<<<<<<<<<<< * * cdef double [:] sums_a = np_sums_a */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_dbuffer_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_dbuffer_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1468, __pyx_L1_error) __pyx_v_distances_b_mv = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1448 + /* "MuchTree.pyx":1470 * cdef double [:] distances_b_mv = np_dbuffer_b * * cdef double [:] sums_a = np_sums_a # <<<<<<<<<<<<<< * cdef double [:] sums_b = np_sums_b * */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sums_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sums_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1470, __pyx_L1_error) __pyx_v_sums_a = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1449 + /* "MuchTree.pyx":1471 * * cdef double [:] sums_a = np_sums_a * cdef double [:] sums_b = np_sums_b # <<<<<<<<<<<<<< * * cdef double [:] sumsq_a = np_sumsq_a */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sums_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1449, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sums_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1471, __pyx_L1_error) __pyx_v_sums_b = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1451 + /* "MuchTree.pyx":1473 * cdef double [:] sums_b = np_sums_b * * cdef double [:] sumsq_a = np_sumsq_a # <<<<<<<<<<<<<< * cdef double [:] sumsq_b = np_sumsq_b * */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sumsq_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sumsq_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1473, __pyx_L1_error) __pyx_v_sumsq_a = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1452 + /* "MuchTree.pyx":1474 * * cdef double [:] sumsq_a = np_sumsq_a * cdef double [:] sumsq_b = np_sumsq_b # <<<<<<<<<<<<<< * * cdef long [:] samples_a = np_samples_a */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sumsq_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_sumsq_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1474, __pyx_L1_error) __pyx_v_sumsq_b = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1454 + /* "MuchTree.pyx":1476 * cdef double [:] sumsq_b = np_sumsq_b * * cdef long [:] samples_a = np_samples_a # <<<<<<<<<<<<<< * cdef long [:] samples_b = np_samples_b * */ - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_np_samples_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_np_samples_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1476, __pyx_L1_error) __pyx_v_samples_a = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "MuchTree.pyx":1455 + /* "MuchTree.pyx":1477 * * cdef long [:] samples_a = np_samples_a * cdef long [:] samples_b = np_samples_b # <<<<<<<<<<<<<< * * cdef double [:] deviations_a = np_deviations_a */ - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_np_samples_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_v_np_samples_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1477, __pyx_L1_error) __pyx_v_samples_b = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "MuchTree.pyx":1457 + /* "MuchTree.pyx":1479 * cdef long [:] samples_b = np_samples_b * * cdef double [:] deviations_a = np_deviations_a # <<<<<<<<<<<<<< * cdef double [:] deviations_b = np_deviations_b * */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_deviations_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_deviations_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1479, __pyx_L1_error) __pyx_v_deviations_a = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1458 + /* "MuchTree.pyx":1480 * * cdef double [:] deviations_a = np_deviations_a * cdef double [:] deviations_b = np_deviations_b # <<<<<<<<<<<<<< * * cdef double [:] all_distances_a = np_all_distances_a */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_deviations_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1458, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_deviations_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1480, __pyx_L1_error) __pyx_v_deviations_b = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1460 + /* "MuchTree.pyx":1482 * cdef double [:] deviations_b = np_deviations_b * * cdef double [:] all_distances_a = np_all_distances_a # <<<<<<<<<<<<<< * cdef double [:] all_distances_b = np_all_distances_b * */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_all_distances_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_all_distances_a, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1482, __pyx_L1_error) __pyx_v_all_distances_a = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1461 + /* "MuchTree.pyx":1483 * * cdef double [:] all_distances_a = np_all_distances_a * cdef double [:] all_distances_b = np_all_distances_b # <<<<<<<<<<<<<< * * cdef long [:,:] linklist = self.np_linklist */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_all_distances_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_all_distances_b, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1483, __pyx_L1_error) __pyx_v_all_distances_b = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1463 + /* "MuchTree.pyx":1485 * cdef double [:] all_distances_b = np_all_distances_b * * cdef long [:,:] linklist = self.np_linklist # <<<<<<<<<<<<<< * * cdef int i */ - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_self->np_linklist, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(__pyx_v_self->np_linklist, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1485, __pyx_L1_error) __pyx_v_linklist = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "MuchTree.pyx":1479 + /* "MuchTree.pyx":1501 * cdef float sumsq_bucket_b * * cdef unsigned int cycles = 0 # <<<<<<<<<<<<<< @@ -48309,7 +47998,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( */ __pyx_v_cycles = 0; - /* "MuchTree.pyx":1481 + /* "MuchTree.pyx":1503 * cdef unsigned int cycles = 0 * * while True : # <<<<<<<<<<<<<< @@ -48318,7 +48007,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( */ while (1) { - /* "MuchTree.pyx":1482 + /* "MuchTree.pyx":1504 * * while True : * for i in xrange( buckets ) : # <<<<<<<<<<<<<< @@ -48330,7 +48019,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; - /* "MuchTree.pyx":1483 + /* "MuchTree.pyx":1505 * while True : * for i in xrange( buckets ) : * with nogil : # <<<<<<<<<<<<<< @@ -48346,7 +48035,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( #endif /*try:*/ { - /* "MuchTree.pyx":1484 + /* "MuchTree.pyx":1506 * for i in xrange( buckets ) : * with nogil : * for j in xrange( n ) : # <<<<<<<<<<<<<< @@ -48358,27 +48047,27 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_j = __pyx_t_14; - /* "MuchTree.pyx":1485 + /* "MuchTree.pyx":1507 * with nogil : * for j in xrange( n ) : * l1 = self._random_int( self.subset_n_links ) # <<<<<<<<<<<<<< * l2 = self._random_int( self.subset_n_links ) * #l1 = np.random.randint( self.subset_n_links ) */ - __pyx_t_15 = ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_random_int(__pyx_v_self, __pyx_v_self->subset_n_links); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1485, __pyx_L10_error) + __pyx_t_15 = ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_random_int(__pyx_v_self, __pyx_v_self->subset_n_links); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1507, __pyx_L10_error) __pyx_v_l1 = __pyx_t_15; - /* "MuchTree.pyx":1486 + /* "MuchTree.pyx":1508 * for j in xrange( n ) : * l1 = self._random_int( self.subset_n_links ) * l2 = self._random_int( self.subset_n_links ) # <<<<<<<<<<<<<< * #l1 = np.random.randint( self.subset_n_links ) * #l2 = np.random.randint( self.subset_n_links ) */ - __pyx_t_15 = ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_random_int(__pyx_v_self, __pyx_v_self->subset_n_links); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1486, __pyx_L10_error) + __pyx_t_15 = ((struct __pyx_vtabstruct_8MuchTree_SuchLinkedTrees *)__pyx_v_self->__pyx_vtab)->_random_int(__pyx_v_self, __pyx_v_self->subset_n_links); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1508, __pyx_L10_error) __pyx_v_l2 = __pyx_t_15; - /* "MuchTree.pyx":1489 + /* "MuchTree.pyx":1511 * #l1 = np.random.randint( self.subset_n_links ) * #l2 = np.random.randint( self.subset_n_links ) * a1 = linklist[ l1, 1 ] # <<<<<<<<<<<<<< @@ -48391,7 +48080,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_linklist.shape[1]; __pyx_v_a1 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_16 * __pyx_v_linklist.strides[0]) ) + __pyx_t_17 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1490 + /* "MuchTree.pyx":1512 * #l2 = np.random.randint( self.subset_n_links ) * a1 = linklist[ l1, 1 ] * b1 = linklist[ l1, 0 ] # <<<<<<<<<<<<<< @@ -48404,7 +48093,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_linklist.shape[1]; __pyx_v_b1 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_17 * __pyx_v_linklist.strides[0]) ) + __pyx_t_16 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1491 + /* "MuchTree.pyx":1513 * a1 = linklist[ l1, 1 ] * b1 = linklist[ l1, 0 ] * a2 = linklist[ l2, 1 ] # <<<<<<<<<<<<<< @@ -48417,7 +48106,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_linklist.shape[1]; __pyx_v_a2 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_16 * __pyx_v_linklist.strides[0]) ) + __pyx_t_17 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1492 + /* "MuchTree.pyx":1514 * b1 = linklist[ l1, 0 ] * a2 = linklist[ l2, 1 ] * b2 = linklist[ l2, 0 ] # <<<<<<<<<<<<<< @@ -48430,7 +48119,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_linklist.shape[1]; __pyx_v_b2 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_linklist.data + __pyx_t_17 * __pyx_v_linklist.strides[0]) ) + __pyx_t_16 * __pyx_v_linklist.strides[1]) ))); - /* "MuchTree.pyx":1493 + /* "MuchTree.pyx":1515 * a2 = linklist[ l2, 1 ] * b2 = linklist[ l2, 0 ] * query_a[ j, 0 ] = a1 # <<<<<<<<<<<<<< @@ -48443,7 +48132,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_query_a.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_query_a.data + __pyx_t_16 * __pyx_v_query_a.strides[0]) ) + __pyx_t_17 * __pyx_v_query_a.strides[1]) )) = __pyx_v_a1; - /* "MuchTree.pyx":1494 + /* "MuchTree.pyx":1516 * b2 = linklist[ l2, 0 ] * query_a[ j, 0 ] = a1 * query_a[ j, 1 ] = a2 # <<<<<<<<<<<<<< @@ -48456,7 +48145,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_query_a.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_query_a.data + __pyx_t_17 * __pyx_v_query_a.strides[0]) ) + __pyx_t_16 * __pyx_v_query_a.strides[1]) )) = __pyx_v_a2; - /* "MuchTree.pyx":1495 + /* "MuchTree.pyx":1517 * query_a[ j, 0 ] = a1 * query_a[ j, 1 ] = a2 * query_b[ j, 0 ] = b1 # <<<<<<<<<<<<<< @@ -48469,7 +48158,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_v_query_b.shape[1]; *((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_query_b.data + __pyx_t_16 * __pyx_v_query_b.strides[0]) ) + __pyx_t_17 * __pyx_v_query_b.strides[1]) )) = __pyx_v_b1; - /* "MuchTree.pyx":1496 + /* "MuchTree.pyx":1518 * query_a[ j, 1 ] = a2 * query_b[ j, 0 ] = b1 * query_b[ j, 1 ] = b2 # <<<<<<<<<<<<<< @@ -48484,7 +48173,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( } } - /* "MuchTree.pyx":1483 + /* "MuchTree.pyx":1505 * while True : * for i in xrange( buckets ) : * with nogil : # <<<<<<<<<<<<<< @@ -48510,16 +48199,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( } } - /* "MuchTree.pyx":1497 + /* "MuchTree.pyx":1519 * query_b[ j, 0 ] = b1 * query_b[ j, 1 ] = b2 * distances_a_mv = self.TreeA.distances( query_a ) # <<<<<<<<<<<<<< * distances_b_mv = self.TreeB.distances( query_b ) * distances_a[ i, : ] = distances_a_mv */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_distances); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_distances); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_query_a, 2, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_query_a, 2, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_12 = 0; @@ -48540,27 +48229,27 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __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, 1497, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_XCLEAR_MEMVIEW(&__pyx_v_distances_a_mv, 1); __pyx_v_distances_a_mv = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1498 + /* "MuchTree.pyx":1520 * query_b[ j, 1 ] = b2 * distances_a_mv = self.TreeA.distances( query_a ) * distances_b_mv = self.TreeB.distances( query_b ) # <<<<<<<<<<<<<< * distances_a[ i, : ] = distances_a_mv * distances_b[ i, : ] = distances_b_mv */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_distances); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_distances); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_query_b, 2, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_query_b, 2, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_12 = 0; @@ -48581,18 +48270,18 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_16sample_linked_distances( __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); __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, 1498, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_XCLEAR_MEMVIEW(&__pyx_v_distances_b_mv, 1); __pyx_v_distances_b_mv = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1499 + /* "MuchTree.pyx":1521 * distances_a_mv = self.TreeA.distances( query_a ) * distances_b_mv = self.TreeB.distances( query_b ) * distances_a[ i, : ] = distances_a_mv # <<<<<<<<<<<<<< @@ -48615,11 +48304,11 @@ __pyx_t_7.shape[0] = __pyx_v_distances_a.shape[1]; __pyx_t_7.strides[0] = __pyx_v_distances_a.strides[1]; __pyx_t_7.suboffsets[0] = -1; -if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_a_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1499, __pyx_L1_error) +if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_a_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1521, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1500 + /* "MuchTree.pyx":1522 * distances_b_mv = self.TreeB.distances( query_b ) * distances_a[ i, : ] = distances_a_mv * distances_b[ i, : ] = distances_b_mv # <<<<<<<<<<<<<< @@ -48642,11 +48331,11 @@ __pyx_t_7.shape[0] = __pyx_v_distances_b.shape[1]; __pyx_t_7.strides[0] = __pyx_v_distances_b.strides[1]; __pyx_t_7.suboffsets[0] = -1; -if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1500, __pyx_L1_error) +if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1522, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1501 + /* "MuchTree.pyx":1523 * distances_a[ i, : ] = distances_a_mv * distances_b[ i, : ] = distances_b_mv * all_distances_a[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_a_mv # <<<<<<<<<<<<<< @@ -48671,14 +48360,14 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, 0, 1) < 0)) { - __PYX_ERR(0, 1501, __pyx_L1_error) + __PYX_ERR(0, 1523, __pyx_L1_error) } -if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_a_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1501, __pyx_L1_error) +if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_a_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1523, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1502 + /* "MuchTree.pyx":1524 * distances_b[ i, : ] = distances_b_mv * all_distances_a[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_a_mv * all_distances_b[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_b_mv # <<<<<<<<<<<<<< @@ -48703,14 +48392,14 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_a_mv, __pyx_t_7, 0, 1) < 0)) { - __PYX_ERR(0, 1502, __pyx_L1_error) + __PYX_ERR(0, 1524, __pyx_L1_error) } -if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1502, __pyx_L1_error) +if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, 1, 1, 0) < 0))) __PYX_ERR(0, 1524, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1503 + /* "MuchTree.pyx":1525 * all_distances_a[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_a_mv * all_distances_b[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_b_mv * with nogil : # <<<<<<<<<<<<<< @@ -48726,7 +48415,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, #endif /*try:*/ { - /* "MuchTree.pyx":1504 + /* "MuchTree.pyx":1526 * all_distances_b[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_b_mv * with nogil : * for j in xrange( n ) : # <<<<<<<<<<<<<< @@ -48738,7 +48427,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_j = __pyx_t_14; - /* "MuchTree.pyx":1505 + /* "MuchTree.pyx":1527 * with nogil : * for j in xrange( n ) : * sums_a[i] += distances_a[ i, j ] # <<<<<<<<<<<<<< @@ -48753,7 +48442,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_v_sums_a.shape[0]; *((double *) ( /* dim=0 */ (__pyx_v_sums_a.data + __pyx_t_18 * __pyx_v_sums_a.strides[0]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_distances_a.data + __pyx_t_16 * __pyx_v_distances_a.strides[0]) ) + __pyx_t_17 * __pyx_v_distances_a.strides[1]) ))); - /* "MuchTree.pyx":1506 + /* "MuchTree.pyx":1528 * for j in xrange( n ) : * sums_a[i] += distances_a[ i, j ] * sums_b[i] += distances_b[ i, j ] # <<<<<<<<<<<<<< @@ -48768,7 +48457,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_v_sums_b.shape[0]; *((double *) ( /* dim=0 */ (__pyx_v_sums_b.data + __pyx_t_18 * __pyx_v_sums_b.strides[0]) )) += (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_distances_b.data + __pyx_t_17 * __pyx_v_distances_b.strides[0]) ) + __pyx_t_16 * __pyx_v_distances_b.strides[1]) ))); - /* "MuchTree.pyx":1507 + /* "MuchTree.pyx":1529 * sums_a[i] += distances_a[ i, j ] * sums_b[i] += distances_b[ i, j ] * sumsq_a[i] += distances_a[ i, j ]**2 # <<<<<<<<<<<<<< @@ -48783,7 +48472,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_v_sumsq_a.shape[0]; *((double *) ( /* dim=0 */ (__pyx_v_sumsq_a.data + __pyx_t_18 * __pyx_v_sumsq_a.strides[0]) )) += pow((*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_distances_a.data + __pyx_t_16 * __pyx_v_distances_a.strides[0]) ) + __pyx_t_17 * __pyx_v_distances_a.strides[1]) ))), 2.0); - /* "MuchTree.pyx":1508 + /* "MuchTree.pyx":1530 * sums_b[i] += distances_b[ i, j ] * sumsq_a[i] += distances_a[ i, j ]**2 * sumsq_b[i] += distances_b[ i, j ]**2 # <<<<<<<<<<<<<< @@ -48800,7 +48489,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, } } - /* "MuchTree.pyx":1503 + /* "MuchTree.pyx":1525 * all_distances_a[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_a_mv * all_distances_b[ n * i + cycles * n * buckets : n * i + cycles * n * buckets + n ] = distances_b_mv * with nogil : # <<<<<<<<<<<<<< @@ -48819,7 +48508,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, } } - /* "MuchTree.pyx":1509 + /* "MuchTree.pyx":1531 * sumsq_a[i] += distances_a[ i, j ]**2 * sumsq_b[i] += distances_b[ i, j ]**2 * samples_a[i] += n # <<<<<<<<<<<<<< @@ -48830,7 +48519,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_samples_a.shape[0]; *((long *) ( /* dim=0 */ (__pyx_v_samples_a.data + __pyx_t_16 * __pyx_v_samples_a.strides[0]) )) += __pyx_v_n; - /* "MuchTree.pyx":1510 + /* "MuchTree.pyx":1532 * sumsq_b[i] += distances_b[ i, j ]**2 * samples_a[i] += n * samples_b[i] += n # <<<<<<<<<<<<<< @@ -48841,7 +48530,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_samples_b.shape[0]; *((long *) ( /* dim=0 */ (__pyx_v_samples_b.data + __pyx_t_16 * __pyx_v_samples_b.strides[0]) )) += __pyx_v_n; - /* "MuchTree.pyx":1511 + /* "MuchTree.pyx":1533 * samples_a[i] += n * samples_b[i] += n * deviations_a[i] = ( sumsq_a[i] / samples_a[i] # <<<<<<<<<<<<<< @@ -48856,10 +48545,10 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, __pyx_t_20 = (*((long *) ( /* dim=0 */ (__pyx_v_samples_a.data + __pyx_t_16 * __pyx_v_samples_a.strides[0]) ))); if (unlikely(__pyx_t_20 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1511, __pyx_L1_error) + __PYX_ERR(0, 1533, __pyx_L1_error) } - /* "MuchTree.pyx":1512 + /* "MuchTree.pyx":1534 * samples_b[i] += n * deviations_a[i] = ( sumsq_a[i] / samples_a[i] * - ( sums_a[i] / samples_a[i] )**2 )**(0.5) # <<<<<<<<<<<<<< @@ -48874,10 +48563,10 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, __pyx_t_22 = (*((long *) ( /* dim=0 */ (__pyx_v_samples_a.data + __pyx_t_16 * __pyx_v_samples_a.strides[0]) ))); if (unlikely(__pyx_t_22 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1512, __pyx_L1_error) + __PYX_ERR(0, 1534, __pyx_L1_error) } - /* "MuchTree.pyx":1511 + /* "MuchTree.pyx":1533 * samples_a[i] += n * samples_b[i] += n * deviations_a[i] = ( sumsq_a[i] / samples_a[i] # <<<<<<<<<<<<<< @@ -48888,7 +48577,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_deviations_a.shape[0]; *((double *) ( /* dim=0 */ (__pyx_v_deviations_a.data + __pyx_t_16 * __pyx_v_deviations_a.strides[0]) )) = pow(((__pyx_t_19 / ((double)__pyx_t_20)) - pow((__pyx_t_21 / ((double)__pyx_t_22)), 2.0)), 0.5); - /* "MuchTree.pyx":1513 + /* "MuchTree.pyx":1535 * deviations_a[i] = ( sumsq_a[i] / samples_a[i] * - ( sums_a[i] / samples_a[i] )**2 )**(0.5) * deviations_b[i] = ( sumsq_b[i] / samples_b[i] # <<<<<<<<<<<<<< @@ -48903,10 +48592,10 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, __pyx_t_22 = (*((long *) ( /* dim=0 */ (__pyx_v_samples_b.data + __pyx_t_16 * __pyx_v_samples_b.strides[0]) ))); if (unlikely(__pyx_t_22 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1513, __pyx_L1_error) + __PYX_ERR(0, 1535, __pyx_L1_error) } - /* "MuchTree.pyx":1514 + /* "MuchTree.pyx":1536 * - ( sums_a[i] / samples_a[i] )**2 )**(0.5) * deviations_b[i] = ( sumsq_b[i] / samples_b[i] * - ( sums_b[i] / samples_b[i] )**2 )**(0.5) # <<<<<<<<<<<<<< @@ -48921,10 +48610,10 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, __pyx_t_20 = (*((long *) ( /* dim=0 */ (__pyx_v_samples_b.data + __pyx_t_16 * __pyx_v_samples_b.strides[0]) ))); if (unlikely(__pyx_t_20 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1514, __pyx_L1_error) + __PYX_ERR(0, 1536, __pyx_L1_error) } - /* "MuchTree.pyx":1513 + /* "MuchTree.pyx":1535 * deviations_a[i] = ( sumsq_a[i] / samples_a[i] * - ( sums_a[i] / samples_a[i] )**2 )**(0.5) * deviations_b[i] = ( sumsq_b[i] / samples_b[i] # <<<<<<<<<<<<<< @@ -48936,7 +48625,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, *((double *) ( /* dim=0 */ (__pyx_v_deviations_b.data + __pyx_t_16 * __pyx_v_deviations_b.strides[0]) )) = pow(((__pyx_t_21 / ((double)__pyx_t_22)) - pow((__pyx_t_19 / ((double)__pyx_t_20)), 2.0)), 0.5); } - /* "MuchTree.pyx":1515 + /* "MuchTree.pyx":1537 * deviations_b[i] = ( sumsq_b[i] / samples_b[i] * - ( sums_b[i] / samples_b[i] )**2 )**(0.5) * deviation_a = 0 # <<<<<<<<<<<<<< @@ -48945,7 +48634,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ __pyx_v_deviation_a = 0.0; - /* "MuchTree.pyx":1516 + /* "MuchTree.pyx":1538 * - ( sums_b[i] / samples_b[i] )**2 )**(0.5) * deviation_a = 0 * deviation_b = 0 # <<<<<<<<<<<<<< @@ -48954,7 +48643,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ __pyx_v_deviation_b = 0.0; - /* "MuchTree.pyx":1517 + /* "MuchTree.pyx":1539 * deviation_a = 0 * deviation_b = 0 * sumsq_bucket_a = 0 # <<<<<<<<<<<<<< @@ -48963,7 +48652,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ __pyx_v_sumsq_bucket_a = 0.0; - /* "MuchTree.pyx":1518 + /* "MuchTree.pyx":1540 * deviation_b = 0 * sumsq_bucket_a = 0 * sumsq_bucket_b = 0 # <<<<<<<<<<<<<< @@ -48972,7 +48661,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ __pyx_v_sumsq_bucket_b = 0.0; - /* "MuchTree.pyx":1519 + /* "MuchTree.pyx":1541 * sumsq_bucket_a = 0 * sumsq_bucket_b = 0 * for i in xrange( buckets ) : # <<<<<<<<<<<<<< @@ -48984,7 +48673,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; - /* "MuchTree.pyx":1520 + /* "MuchTree.pyx":1542 * sumsq_bucket_b = 0 * for i in xrange( buckets ) : * deviation_a += deviations_a[i] # <<<<<<<<<<<<<< @@ -48995,7 +48684,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_deviations_a.shape[0]; __pyx_v_deviation_a = (__pyx_v_deviation_a + (*((double *) ( /* dim=0 */ (__pyx_v_deviations_a.data + __pyx_t_16 * __pyx_v_deviations_a.strides[0]) )))); - /* "MuchTree.pyx":1521 + /* "MuchTree.pyx":1543 * for i in xrange( buckets ) : * deviation_a += deviations_a[i] * deviation_b += deviations_b[i] # <<<<<<<<<<<<<< @@ -49006,7 +48695,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_deviations_b.shape[0]; __pyx_v_deviation_b = (__pyx_v_deviation_b + (*((double *) ( /* dim=0 */ (__pyx_v_deviations_b.data + __pyx_t_16 * __pyx_v_deviations_b.strides[0]) )))); - /* "MuchTree.pyx":1522 + /* "MuchTree.pyx":1544 * deviation_a += deviations_a[i] * deviation_b += deviations_b[i] * sumsq_bucket_a += deviations_a[i]**2 # <<<<<<<<<<<<<< @@ -49017,7 +48706,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_v_deviations_a.shape[0]; __pyx_v_sumsq_bucket_a = (__pyx_v_sumsq_bucket_a + pow((*((double *) ( /* dim=0 */ (__pyx_v_deviations_a.data + __pyx_t_16 * __pyx_v_deviations_a.strides[0]) ))), 2.0)); - /* "MuchTree.pyx":1523 + /* "MuchTree.pyx":1545 * deviation_b += deviations_b[i] * sumsq_bucket_a += deviations_a[i]**2 * sumsq_bucket_b += deviations_b[i]**2 # <<<<<<<<<<<<<< @@ -49029,7 +48718,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, __pyx_v_sumsq_bucket_b = (__pyx_v_sumsq_bucket_b + pow((*((double *) ( /* dim=0 */ (__pyx_v_deviations_b.data + __pyx_t_16 * __pyx_v_deviations_b.strides[0]) ))), 2.0)); } - /* "MuchTree.pyx":1524 + /* "MuchTree.pyx":1546 * sumsq_bucket_a += deviations_a[i]**2 * sumsq_bucket_b += deviations_b[i]**2 * deviation_a = ( sumsq_bucket_a / buckets - ( deviation_a / buckets )**2 )**(0.5) # <<<<<<<<<<<<<< @@ -49038,15 +48727,15 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ if (unlikely(__pyx_v_buckets == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1524, __pyx_L1_error) + __PYX_ERR(0, 1546, __pyx_L1_error) } if (unlikely(__pyx_v_buckets == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1524, __pyx_L1_error) + __PYX_ERR(0, 1546, __pyx_L1_error) } __pyx_v_deviation_a = pow(((double)((__pyx_v_sumsq_bucket_a / ((float)__pyx_v_buckets)) - powf((__pyx_v_deviation_a / ((float)__pyx_v_buckets)), 2.0))), 0.5); - /* "MuchTree.pyx":1525 + /* "MuchTree.pyx":1547 * sumsq_bucket_b += deviations_b[i]**2 * deviation_a = ( sumsq_bucket_a / buckets - ( deviation_a / buckets )**2 )**(0.5) * deviation_b = ( sumsq_bucket_b / buckets - ( deviation_b / buckets )**2 )**(0.5) # <<<<<<<<<<<<<< @@ -49055,15 +48744,15 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ if (unlikely(__pyx_v_buckets == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1525, __pyx_L1_error) + __PYX_ERR(0, 1547, __pyx_L1_error) } if (unlikely(__pyx_v_buckets == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1525, __pyx_L1_error) + __PYX_ERR(0, 1547, __pyx_L1_error) } __pyx_v_deviation_b = pow(((double)((__pyx_v_sumsq_bucket_b / ((float)__pyx_v_buckets)) - powf((__pyx_v_deviation_b / ((float)__pyx_v_buckets)), 2.0))), 0.5); - /* "MuchTree.pyx":1527 + /* "MuchTree.pyx":1549 * deviation_b = ( sumsq_bucket_b / buckets - ( deviation_b / buckets )**2 )**(0.5) * * cycles += 1 # <<<<<<<<<<<<<< @@ -49072,7 +48761,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, */ __pyx_v_cycles = (__pyx_v_cycles + 1); - /* "MuchTree.pyx":1529 + /* "MuchTree.pyx":1551 * cycles += 1 * * if deviation_a < sigma and deviation_b < sigma : break # <<<<<<<<<<<<<< @@ -49092,7 +48781,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, goto __pyx_L4_break; } - /* "MuchTree.pyx":1530 + /* "MuchTree.pyx":1552 * * if deviation_a < sigma and deviation_b < sigma : break * if cycles >= maxcycles : return None # <<<<<<<<<<<<<< @@ -49108,7 +48797,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, } __pyx_L4_break:; - /* "MuchTree.pyx":1532 + /* "MuchTree.pyx":1554 * if cycles >= maxcycles : return None * * return { 'TreeA' : np_all_distances_a[ : n * buckets * cycles ], # <<<<<<<<<<<<<< @@ -49116,77 +48805,77 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, * 'n_pairs' : ( self.subset_n_links * ( self.subset_n_links - 1 ) ) / 2, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_np_all_distances_a, 0, ((__pyx_v_n * __pyx_v_buckets) * __pyx_v_cycles), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_np_all_distances_a, 0, ((__pyx_v_n * __pyx_v_buckets) * __pyx_v_cycles), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeA, __pyx_t_2) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeA, __pyx_t_2) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1533 + /* "MuchTree.pyx":1555 * * return { 'TreeA' : np_all_distances_a[ : n * buckets * cycles ], * 'TreeB' : np_all_distances_b[ : n * buckets * cycles ], # <<<<<<<<<<<<<< * 'n_pairs' : ( self.subset_n_links * ( self.subset_n_links - 1 ) ) / 2, * 'n_samples' : n * buckets * cycles, */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_np_all_distances_b, 0, ((__pyx_v_n * __pyx_v_buckets) * __pyx_v_cycles), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_np_all_distances_b, 0, ((__pyx_v_n * __pyx_v_buckets) * __pyx_v_cycles), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeB, __pyx_t_2) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TreeB, __pyx_t_2) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1534 + /* "MuchTree.pyx":1556 * return { 'TreeA' : np_all_distances_a[ : n * buckets * cycles ], * 'TreeB' : np_all_distances_b[ : n * buckets * cycles ], * 'n_pairs' : ( self.subset_n_links * ( self.subset_n_links - 1 ) ) / 2, # <<<<<<<<<<<<<< * 'n_samples' : n * buckets * cycles, * 'deviation_a' : deviation_a, */ - __pyx_t_2 = PyFloat_FromDouble((((double)(__pyx_v_self->subset_n_links * (__pyx_v_self->subset_n_links - 1))) / 2.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((((double)(__pyx_v_self->subset_n_links * (__pyx_v_self->subset_n_links - 1))) / 2.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_pairs, __pyx_t_2) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_pairs, __pyx_t_2) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1535 + /* "MuchTree.pyx":1557 * 'TreeB' : np_all_distances_b[ : n * buckets * cycles ], * 'n_pairs' : ( self.subset_n_links * ( self.subset_n_links - 1 ) ) / 2, * 'n_samples' : n * buckets * cycles, # <<<<<<<<<<<<<< * 'deviation_a' : deviation_a, * 'deviation_b' : deviation_b } */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_n * __pyx_v_buckets) * __pyx_v_cycles)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1535, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((__pyx_v_n * __pyx_v_buckets) * __pyx_v_cycles)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_samples, __pyx_t_2) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_n_samples, __pyx_t_2) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1536 + /* "MuchTree.pyx":1558 * 'n_pairs' : ( self.subset_n_links * ( self.subset_n_links - 1 ) ) / 2, * 'n_samples' : n * buckets * cycles, * 'deviation_a' : deviation_a, # <<<<<<<<<<<<<< * 'deviation_b' : deviation_b } * */ - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_deviation_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_deviation_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_a, __pyx_t_2) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_a, __pyx_t_2) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "MuchTree.pyx":1537 + /* "MuchTree.pyx":1559 * 'n_samples' : n * buckets * cycles, * 'deviation_a' : deviation_a, * 'deviation_b' : deviation_b } # <<<<<<<<<<<<<< * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : */ - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_deviation_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_deviation_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_b, __pyx_t_2) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_deviation_b, __pyx_t_2) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "MuchTree.pyx":1409 + /* "MuchTree.pyx":1431 * return ( self.seed * self.modulus ) % n * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -49245,7 +48934,7 @@ if (unlikely((__pyx_memoryview_copy_contents(__pyx_v_distances_b_mv, __pyx_t_7, return __pyx_r; } -/* "MuchTree.pyx":1539 +/* "MuchTree.pyx":1561 * 'deviation_b' : deviation_b } * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -49315,26 +49004,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_deletions); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_additions); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_swaps); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "adjacency") < 0)) __PYX_ERR(0, 1539, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "adjacency") < 0)) __PYX_ERR(0, 1561, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -49354,7 +49043,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("adjacency", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("adjacency", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1561, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -49381,7 +49070,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "MuchTree.pyx":1566 +/* "MuchTree.pyx":1588 * * # map node ids to matrix coordinates * ta_links = map( lambda x : ta_node_ids.index(x), ll[:,1] ) # <<<<<<<<<<<<<< @@ -49442,12 +49131,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1566, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1588, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda2") < 0)) __PYX_ERR(0, 1566, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda2") < 0)) __PYX_ERR(0, 1588, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -49458,7 +49147,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1566, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1588, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -49501,8 +49190,8 @@ static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__ __pyx_outer_scope = (struct __pyx_obj_8MuchTree___pyx_scope_struct_9_adjacency *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_ta_node_ids)) { __Pyx_RaiseClosureNameError("ta_node_ids"); __PYX_ERR(0, 1566, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_node_ids, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1566, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_ta_node_ids)) { __Pyx_RaiseClosureNameError("ta_node_ids"); __PYX_ERR(0, 1588, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_node_ids, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -49522,7 +49211,7 @@ static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_x}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -49543,7 +49232,7 @@ static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__ return __pyx_r; } -/* "MuchTree.pyx":1567 +/* "MuchTree.pyx":1589 * # map node ids to matrix coordinates * ta_links = map( lambda x : ta_node_ids.index(x), ll[:,1] ) * tb_links = map( lambda x : tb_node_ids.index(x) + ta_aj.shape[0], ll[:,0] ) # <<<<<<<<<<<<<< @@ -49604,12 +49293,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1589, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda3") < 0)) __PYX_ERR(0, 1567, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda3") < 0)) __PYX_ERR(0, 1589, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -49620,7 +49309,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1567, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1589, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -49663,8 +49352,8 @@ static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__ __pyx_outer_scope = (struct __pyx_obj_8MuchTree___pyx_scope_struct_9_adjacency *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_tb_node_ids)) { __Pyx_RaiseClosureNameError("tb_node_ids"); __PYX_ERR(0, 1567, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_tb_node_ids, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_tb_node_ids)) { __Pyx_RaiseClosureNameError("tb_node_ids"); __PYX_ERR(0, 1589, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_tb_node_ids, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -49684,17 +49373,17 @@ static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_x}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - if (unlikely(!__pyx_cur_scope->__pyx_v_ta_aj)) { __Pyx_RaiseClosureNameError("ta_aj"); __PYX_ERR(0, 1567, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_ta_aj)) { __Pyx_RaiseClosureNameError("ta_aj"); __PYX_ERR(0, 1589, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __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, 1567, __pyx_L1_error) + __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, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -49715,7 +49404,7 @@ static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__ return __pyx_r; } -/* "MuchTree.pyx":1539 +/* "MuchTree.pyx":1561 * 'deviation_b' : deviation_b } * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -49764,90 +49453,90 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_8MuchTree___pyx_scope_struct_9_adjacency *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1539, __pyx_L1_error) + __PYX_ERR(0, 1561, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "MuchTree.pyx":1544 + /* "MuchTree.pyx":1566 * trees, applying the specified random permutaitons. * ''' * TA = self.TreeA.adjacency( node = self.subset_a_root ) # <<<<<<<<<<<<<< * TB = self.TreeB.adjacency( node = self.subset_b_root ) * ta_aj = TA['adjacency_matrix'] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_adjacency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_adjacency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_node, __pyx_t_3) < 0) __PYX_ERR(0, 1544, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_node, __pyx_t_3) < 0) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_TA = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1545 + /* "MuchTree.pyx":1567 * ''' * TA = self.TreeA.adjacency( node = self.subset_a_root ) * TB = self.TreeB.adjacency( node = self.subset_b_root ) # <<<<<<<<<<<<<< * ta_aj = TA['adjacency_matrix'] * tb_aj = TB['adjacency_matrix'] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_adjacency); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_adjacency); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_node, __pyx_t_1) < 0) __PYX_ERR(0, 1545, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_node, __pyx_t_1) < 0) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __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; __pyx_v_TB = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1546 + /* "MuchTree.pyx":1568 * TA = self.TreeA.adjacency( node = self.subset_a_root ) * TB = self.TreeB.adjacency( node = self.subset_b_root ) * ta_aj = TA['adjacency_matrix'] # <<<<<<<<<<<<<< * tb_aj = TB['adjacency_matrix'] * ta_node_ids = TA['node_ids'].tolist() */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TA, __pyx_n_u_adjacency_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TA, __pyx_n_u_adjacency_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_ta_aj = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1547 + /* "MuchTree.pyx":1569 * TB = self.TreeB.adjacency( node = self.subset_b_root ) * ta_aj = TA['adjacency_matrix'] * tb_aj = TB['adjacency_matrix'] # <<<<<<<<<<<<<< * ta_node_ids = TA['node_ids'].tolist() * tb_node_ids = TB['node_ids'].tolist() */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TB, __pyx_n_u_adjacency_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TB, __pyx_n_u_adjacency_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tb_aj = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1548 + /* "MuchTree.pyx":1570 * ta_aj = TA['adjacency_matrix'] * tb_aj = TB['adjacency_matrix'] * ta_node_ids = TA['node_ids'].tolist() # <<<<<<<<<<<<<< * tb_node_ids = TB['node_ids'].tolist() * */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TA, __pyx_n_u_node_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TA, __pyx_n_u_node_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -49868,7 +49557,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -49876,16 +49565,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_cur_scope->__pyx_v_ta_node_ids = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1549 + /* "MuchTree.pyx":1571 * tb_aj = TB['adjacency_matrix'] * ta_node_ids = TA['node_ids'].tolist() * tb_node_ids = TB['node_ids'].tolist() # <<<<<<<<<<<<<< * * # apply random permutations */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TB, __pyx_n_u_node_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_TB, __pyx_n_u_node_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -49906,7 +49595,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -49914,19 +49603,19 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_cur_scope->__pyx_v_tb_node_ids = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1552 + /* "MuchTree.pyx":1574 * * # apply random permutations * ll = np.array( self.linklist ) # <<<<<<<<<<<<<< * for i in xrange( 1, deletions ) : * ll = np.delete( ll, np.random.randint(len(ll)), axis=0 ) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __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, 1552, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_linklist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_linklist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_4 = 0; @@ -49947,29 +49636,29 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_ll = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1553 + /* "MuchTree.pyx":1575 * # apply random permutations * ll = np.array( self.linklist ) * for i in xrange( 1, deletions ) : # <<<<<<<<<<<<<< * ll = np.delete( ll, np.random.randint(len(ll)), axis=0 ) * for i in xrange( 1, swaps ) : */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 1553, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 1575, __pyx_L1_error); __Pyx_INCREF(__pyx_v_deletions); __Pyx_GIVEREF(__pyx_v_deletions); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_deletions)) __PYX_ERR(0, 1553, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_deletions)) __PYX_ERR(0, 1575, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -49977,9 +49666,9 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -49988,28 +49677,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1553, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1553, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -50019,7 +49708,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1553, __pyx_L1_error) + else __PYX_ERR(0, 1575, __pyx_L1_error) } break; } @@ -50028,28 +49717,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1554 + /* "MuchTree.pyx":1576 * ll = np.array( self.linklist ) * for i in xrange( 1, deletions ) : * ll = np.delete( ll, np.random.randint(len(ll)), axis=0 ) # <<<<<<<<<<<<<< * for i in xrange( 1, swaps ) : * x, y = np.random.choice( xrange( len(ll) ), size=2, replace=False ) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_delete); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_delete); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1554, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_random); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_random); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_randint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_randint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = PyObject_Length(__pyx_v_ll); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1554, __pyx_L1_error) - __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_ll); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __pyx_t_4 = 0; @@ -50070,22 +49759,22 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_ll); __Pyx_GIVEREF(__pyx_v_ll); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ll)) __PYX_ERR(0, 1554, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ll)) __PYX_ERR(0, 1576, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1554, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -50093,7 +49782,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_DECREF_SET(__pyx_v_ll, __pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1553 + /* "MuchTree.pyx":1575 * # apply random permutations * ll = np.array( self.linklist ) * for i in xrange( 1, deletions ) : # <<<<<<<<<<<<<< @@ -50103,22 +49792,22 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":1555 + /* "MuchTree.pyx":1577 * for i in xrange( 1, deletions ) : * ll = np.delete( ll, np.random.randint(len(ll)), axis=0 ) * for i in xrange( 1, swaps ) : # <<<<<<<<<<<<<< * x, y = np.random.choice( xrange( len(ll) ), size=2, replace=False ) * X, Y = ll[x,1], ll[y,1] */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 1555, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 1577, __pyx_L1_error); __Pyx_INCREF(__pyx_v_swaps); __Pyx_GIVEREF(__pyx_v_swaps); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_swaps)) __PYX_ERR(0, 1555, __pyx_L1_error); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1555, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_swaps)) __PYX_ERR(0, 1577, __pyx_L1_error); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { @@ -50126,9 +49815,9 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -50137,28 +49826,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1555, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1577, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1577, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1555, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1577, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1577, __pyx_L1_error) #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1555, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -50168,7 +49857,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1555, __pyx_L1_error) + else __PYX_ERR(0, 1577, __pyx_L1_error) } break; } @@ -50177,37 +49866,37 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1556 + /* "MuchTree.pyx":1578 * ll = np.delete( ll, np.random.randint(len(ll)), axis=0 ) * for i in xrange( 1, swaps ) : * x, y = np.random.choice( xrange( len(ll) ), size=2, replace=False ) # <<<<<<<<<<<<<< * X, Y = ll[x,1], ll[y,1] * ll[x,1] = Y */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_random); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_random); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_choice); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_choice); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = PyObject_Length(__pyx_v_ll); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1556, __pyx_L1_error) - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_9 = PyObject_Length(__pyx_v_ll); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 1556, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_size, __pyx_int_2) < 0) __PYX_ERR(0, 1556, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_replace, Py_False) < 0) __PYX_ERR(0, 1556, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_size, __pyx_int_2) < 0) __PYX_ERR(0, 1578, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_replace, Py_False) < 0) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -50218,7 +49907,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1556, __pyx_L1_error) + __PYX_ERR(0, 1578, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -50231,15 +49920,15 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -50247,7 +49936,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1556, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1578, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; @@ -50255,7 +49944,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1556, __pyx_L1_error) + __PYX_ERR(0, 1578, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); @@ -50263,33 +49952,33 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1557 + /* "MuchTree.pyx":1579 * for i in xrange( 1, swaps ) : * x, y = np.random.choice( xrange( len(ll) ), size=2, replace=False ) * X, Y = ll[x,1], ll[y,1] # <<<<<<<<<<<<<< * ll[x,1] = Y * ll[y,1] = X */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x)) __PYX_ERR(0, 1557, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x)) __PYX_ERR(0, 1579, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 1557, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 1579, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_y)) __PYX_ERR(0, 1557, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_y)) __PYX_ERR(0, 1579, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 1557, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1557, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 1579, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_X, __pyx_t_3); @@ -50297,43 +49986,43 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_Y, __pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1558 + /* "MuchTree.pyx":1580 * x, y = np.random.choice( xrange( len(ll) ), size=2, replace=False ) * X, Y = ll[x,1], ll[y,1] * ll[x,1] = Y # <<<<<<<<<<<<<< * ll[y,1] = X * for i in xrange( 1, additions ) : */ - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_x)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_x)) __PYX_ERR(0, 1580, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1558, __pyx_L1_error); - if (unlikely((PyObject_SetItem(__pyx_v_ll, __pyx_t_5, __pyx_v_Y) < 0))) __PYX_ERR(0, 1558, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1580, __pyx_L1_error); + if (unlikely((PyObject_SetItem(__pyx_v_ll, __pyx_t_5, __pyx_v_Y) < 0))) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1559 + /* "MuchTree.pyx":1581 * X, Y = ll[x,1], ll[y,1] * ll[x,1] = Y * ll[y,1] = X # <<<<<<<<<<<<<< * for i in xrange( 1, additions ) : * a = np.random.choice( self.TreeA.leafs.values() ) */ - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_y)) __PYX_ERR(0, 1559, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_y)) __PYX_ERR(0, 1581, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1559, __pyx_L1_error); - if (unlikely((PyObject_SetItem(__pyx_v_ll, __pyx_t_5, __pyx_v_X) < 0))) __PYX_ERR(0, 1559, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1581, __pyx_L1_error); + if (unlikely((PyObject_SetItem(__pyx_v_ll, __pyx_t_5, __pyx_v_X) < 0))) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1555 + /* "MuchTree.pyx":1577 * for i in xrange( 1, deletions ) : * ll = np.delete( ll, np.random.randint(len(ll)), axis=0 ) * for i in xrange( 1, swaps ) : # <<<<<<<<<<<<<< @@ -50343,22 +50032,22 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":1560 + /* "MuchTree.pyx":1582 * ll[x,1] = Y * ll[y,1] = X * for i in xrange( 1, additions ) : # <<<<<<<<<<<<<< * a = np.random.choice( self.TreeA.leafs.values() ) * b = np.random.choice( self.TreeB.leafs.values() ) */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 1560, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1)) __PYX_ERR(0, 1582, __pyx_L1_error); __Pyx_INCREF(__pyx_v_additions); __Pyx_GIVEREF(__pyx_v_additions); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_additions)) __PYX_ERR(0, 1560, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_additions)) __PYX_ERR(0, 1582, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_xrange, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { @@ -50366,9 +50055,9 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1582, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -50377,28 +50066,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1560, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1582, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1582, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1560, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1582, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1582, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -50408,7 +50097,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1560, __pyx_L1_error) + else __PYX_ERR(0, 1582, __pyx_L1_error) } break; } @@ -50417,24 +50106,24 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1561 + /* "MuchTree.pyx":1583 * ll[y,1] = X * for i in xrange( 1, additions ) : * a = np.random.choice( self.TreeA.leafs.values() ) # <<<<<<<<<<<<<< * b = np.random.choice( self.TreeB.leafs.values() ) * ll = np.concatenate( (ll, np.array([[b,a]])), axis=0 ) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __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, 1561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_random); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __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_choice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_choice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_leafs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -50455,7 +50144,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -50478,31 +50167,31 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1562 + /* "MuchTree.pyx":1584 * for i in xrange( 1, additions ) : * a = np.random.choice( self.TreeA.leafs.values() ) * b = np.random.choice( self.TreeB.leafs.values() ) # <<<<<<<<<<<<<< * ll = np.concatenate( (ll, np.array([[b,a]])), axis=0 ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __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, 1562, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_random); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __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_choice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_choice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_leafs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -50523,7 +50212,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -50546,42 +50235,42 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1563 + /* "MuchTree.pyx":1585 * a = np.random.choice( self.TreeA.leafs.values() ) * b = np.random.choice( self.TreeB.leafs.values() ) * ll = np.concatenate( (ll, np.array([[b,a]])), axis=0 ) # <<<<<<<<<<<<<< * * # map node ids to matrix coordinates */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __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, 1563, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_b); __Pyx_GIVEREF(__pyx_v_b); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_b)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_b)) __PYX_ERR(0, 1585, __pyx_L1_error); __Pyx_INCREF(__pyx_v_a); __Pyx_GIVEREF(__pyx_v_a); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_a)) __PYX_ERR(0, 1563, __pyx_L1_error); - __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_a)) __PYX_ERR(0, 1585, __pyx_L1_error); + __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -50602,27 +50291,27 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_ll); __Pyx_GIVEREF(__pyx_v_ll); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ll)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ll)) __PYX_ERR(0, 1585, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5)) __PYX_ERR(0, 1585, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)) __PYX_ERR(0, 1563, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1563, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -50630,7 +50319,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_DECREF_SET(__pyx_v_ll, __pyx_t_10); __pyx_t_10 = 0; - /* "MuchTree.pyx":1560 + /* "MuchTree.pyx":1582 * ll[x,1] = Y * ll[y,1] = X * for i in xrange( 1, additions ) : # <<<<<<<<<<<<<< @@ -50640,118 +50329,118 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":1566 + /* "MuchTree.pyx":1588 * * # map node ids to matrix coordinates * ta_links = map( lambda x : ta_node_ids.index(x), ll[:,1] ) # <<<<<<<<<<<<<< * tb_links = map( lambda x : tb_node_ids.index(x) + ta_aj.shape[0], ll[:,0] ) * */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_9adjacency_lambda2, 0, __pyx_n_s_adjacency_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_MuchTree, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_9adjacency_lambda2, 0, __pyx_n_s_adjacency_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_MuchTree, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_tuple__25); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_tuple__25); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1)) __PYX_ERR(0, 1566, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10)) __PYX_ERR(0, 1588, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ta_links = __pyx_t_10; __pyx_t_10 = 0; - /* "MuchTree.pyx":1567 + /* "MuchTree.pyx":1589 * # map node ids to matrix coordinates * ta_links = map( lambda x : ta_node_ids.index(x), ll[:,1] ) * tb_links = map( lambda x : tb_node_ids.index(x) + ta_aj.shape[0], ll[:,0] ) # <<<<<<<<<<<<<< * * # build empty graph adjacency matrix */ - __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_9adjacency_1lambda3, 0, __pyx_n_s_adjacency_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_MuchTree, __pyx_d, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_9adjacency_1lambda3, 0, __pyx_n_s_adjacency_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_MuchTree, __pyx_d, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_tuple__26); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ll, __pyx_tuple__26); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10)) __PYX_ERR(0, 1589, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8)) __PYX_ERR(0, 1589, __pyx_L1_error); __pyx_t_10 = 0; __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_tb_links = __pyx_t_8; __pyx_t_8 = 0; - /* "MuchTree.pyx":1570 + /* "MuchTree.pyx":1592 * * # build empty graph adjacency matrix * aj = np.zeros( ( ta_aj.shape[0] + tb_aj.shape[0], # <<<<<<<<<<<<<< * ta_aj.shape[1] + tb_aj.shape[1] ) ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __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; - /* "MuchTree.pyx":1571 + /* "MuchTree.pyx":1593 * # build empty graph adjacency matrix * aj = np.zeros( ( ta_aj.shape[0] + tb_aj.shape[0], * ta_aj.shape[1] + tb_aj.shape[1] ) ) # <<<<<<<<<<<<<< * * # place the tree adjacency matrixes into the empty graph matrix */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1593, __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, 1571, __pyx_L1_error) + __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, 1593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1593, __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, 1571, __pyx_L1_error) + __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, 1593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 1571, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1593, __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; - /* "MuchTree.pyx":1570 + /* "MuchTree.pyx":1592 * * # build empty graph adjacency matrix * aj = np.zeros( ( ta_aj.shape[0] + tb_aj.shape[0], # <<<<<<<<<<<<<< * ta_aj.shape[1] + tb_aj.shape[1] ) ) * */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -50773,21 +50462,21 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1570, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_v_aj = __pyx_t_8; __pyx_t_8 = 0; - /* "MuchTree.pyx":1574 + /* "MuchTree.pyx":1596 * * # place the tree adjacency matrixes into the empty graph matrix * aj[ 0:ta_aj.shape[0] , 0:ta_aj.shape[1] ] = ta_aj / ta_aj.max() # <<<<<<<<<<<<<< * aj[ ta_aj.shape[0]:, ta_aj.shape[1]: ] = tb_aj / tb_aj.max() * */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -50807,49 +50496,49 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PySlice_New(__pyx_int_0, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_8 = PySlice_New(__pyx_int_0, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __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, 1574, __pyx_L1_error) + __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, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySlice_New(__pyx_int_0, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_2 = PySlice_New(__pyx_int_0, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8)) __PYX_ERR(0, 1596, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error); __pyx_t_8 = 0; __pyx_t_2 = 0; - if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_3, __pyx_t_10) < 0))) __PYX_ERR(0, 1574, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_3, __pyx_t_10) < 0))) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "MuchTree.pyx":1575 + /* "MuchTree.pyx":1597 * # place the tree adjacency matrixes into the empty graph matrix * aj[ 0:ta_aj.shape[0] , 0:ta_aj.shape[1] ] = ta_aj / ta_aj.max() * aj[ ta_aj.shape[0]:, ta_aj.shape[1]: ] = tb_aj / tb_aj.max() # <<<<<<<<<<<<<< * * # compute means of all the non-zero-length edges of the trees */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -50869,54 +50558,54 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1575, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_tb_aj, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_tb_aj, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PySlice_New(__pyx_t_2, Py_None, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_10 = PySlice_New(__pyx_t_2, Py_None, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySlice_New(__pyx_t_8, Py_None, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_2 = PySlice_New(__pyx_t_8, Py_None, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10)) __PYX_ERR(0, 1575, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10)) __PYX_ERR(0, 1597, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error); __pyx_t_10 = 0; __pyx_t_2 = 0; - if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_8, __pyx_t_3) < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_8, __pyx_t_3) < 0))) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1578 + /* "MuchTree.pyx":1600 * * # compute means of all the non-zero-length edges of the trees * ta_mean = np.mean( ta_aj.flatten()[ ta_aj.flatten() > self.TreeA.polytomy_distance ] ) # <<<<<<<<<<<<<< * tb_mean = np.mean( tb_aj.flatten()[ tb_aj.flatten() > self.TreeB.polytomy_distance ] ) * link_mean = ( ta_mean / ta_aj.max() + tb_mean / tb_aj.max() ) / 2.0 */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1578, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_mean); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_mean); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = NULL; __pyx_t_4 = 0; @@ -50936,11 +50625,11 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1578, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_4 = 0; @@ -50960,16 +50649,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1578, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_polytomy_distance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_polytomy_distance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -50992,26 +50681,26 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_ta_mean = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1579 + /* "MuchTree.pyx":1601 * # compute means of all the non-zero-length edges of the trees * ta_mean = np.mean( ta_aj.flatten()[ ta_aj.flatten() > self.TreeA.polytomy_distance ] ) * tb_mean = np.mean( tb_aj.flatten()[ tb_aj.flatten() > self.TreeB.polytomy_distance ] ) # <<<<<<<<<<<<<< * link_mean = ( ta_mean / ta_aj.max() + tb_mean / tb_aj.max() ) / 2.0 * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_mean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_mean); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; __pyx_t_4 = 0; @@ -51031,11 +50720,11 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_flatten); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __pyx_t_4 = 0; @@ -51055,16 +50744,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1579, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_polytomy_distance); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_polytomy_distance); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -51087,21 +50776,21 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_v_tb_mean = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1580 + /* "MuchTree.pyx":1602 * ta_mean = np.mean( ta_aj.flatten()[ ta_aj.flatten() > self.TreeA.polytomy_distance ] ) * tb_mean = np.mean( tb_aj.flatten()[ tb_aj.flatten() > self.TreeB.polytomy_distance ] ) * link_mean = ( ta_mean / ta_aj.max() + tb_mean / tb_aj.max() ) / 2.0 # <<<<<<<<<<<<<< * * # place the link edges into graph adjacency matrix, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ta_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_4 = 0; @@ -51121,14 +50810,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_ta_mean, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_ta_mean, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb_aj, __pyx_n_s_max); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __pyx_t_4 = 0; @@ -51148,39 +50837,39 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_tb_mean, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_tb_mean, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_3, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_3, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_link_mean = __pyx_t_8; __pyx_t_8 = 0; - /* "MuchTree.pyx":1585 + /* "MuchTree.pyx":1607 * # normalizing their edge weights to the average weight of the * # tree edges * for i,j in zip( tb_links, ta_links ) : # <<<<<<<<<<<<<< * aj[i,j] = link_mean * aj[j,i] = link_mean */ - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_tb_links); __Pyx_GIVEREF(__pyx_v_tb_links); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tb_links)) __PYX_ERR(0, 1585, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_tb_links)) __PYX_ERR(0, 1607, __pyx_L1_error); __Pyx_INCREF(__pyx_v_ta_links); __Pyx_GIVEREF(__pyx_v_ta_links); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ta_links)) __PYX_ERR(0, 1585, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ta_links)) __PYX_ERR(0, 1607, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -51188,9 +50877,9 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1607, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -51199,28 +50888,28 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1585, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1607, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1607, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1585, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1607, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1607, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -51230,7 +50919,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1585, __pyx_L1_error) + else __PYX_ERR(0, 1607, __pyx_L1_error) } break; } @@ -51242,7 +50931,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1585, __pyx_L1_error) + __PYX_ERR(0, 1607, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -51255,15 +50944,15 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); @@ -51271,7 +50960,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_10)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1585, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1607, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L17_unpacking_done; @@ -51279,7 +50968,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1585, __pyx_L1_error) + __PYX_ERR(0, 1607, __pyx_L1_error) __pyx_L17_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); @@ -51287,43 +50976,43 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_10); __pyx_t_10 = 0; - /* "MuchTree.pyx":1586 + /* "MuchTree.pyx":1608 * # tree edges * for i,j in zip( tb_links, ta_links ) : * aj[i,j] = link_mean # <<<<<<<<<<<<<< * aj[j,i] = link_mean * */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i)) __PYX_ERR(0, 1586, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i)) __PYX_ERR(0, 1608, __pyx_L1_error); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j)) __PYX_ERR(0, 1586, __pyx_L1_error); - if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_3, __pyx_v_link_mean) < 0))) __PYX_ERR(0, 1586, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j)) __PYX_ERR(0, 1608, __pyx_L1_error); + if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_3, __pyx_v_link_mean) < 0))) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1587 + /* "MuchTree.pyx":1609 * for i,j in zip( tb_links, ta_links ) : * aj[i,j] = link_mean * aj[j,i] = link_mean # <<<<<<<<<<<<<< * * return aj */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_j)) __PYX_ERR(0, 1587, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_j)) __PYX_ERR(0, 1609, __pyx_L1_error); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_i)) __PYX_ERR(0, 1587, __pyx_L1_error); - if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_3, __pyx_v_link_mean) < 0))) __PYX_ERR(0, 1587, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_i)) __PYX_ERR(0, 1609, __pyx_L1_error); + if (unlikely((PyObject_SetItem(__pyx_v_aj, __pyx_t_3, __pyx_v_link_mean) < 0))) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1585 + /* "MuchTree.pyx":1607 * # normalizing their edge weights to the average weight of the * # tree edges * for i,j in zip( tb_links, ta_links ) : # <<<<<<<<<<<<<< @@ -51333,7 +51022,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "MuchTree.pyx":1589 + /* "MuchTree.pyx":1611 * aj[j,i] = link_mean * * return aj # <<<<<<<<<<<<<< @@ -51345,7 +51034,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o __pyx_r = __pyx_v_aj; goto __pyx_L0; - /* "MuchTree.pyx":1539 + /* "MuchTree.pyx":1561 * 'deviation_b' : deviation_b } * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -51388,7 +51077,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_18adjacency(struct __pyx_o return __pyx_r; } -/* "MuchTree.pyx":1591 +/* "MuchTree.pyx":1613 * return aj * * def laplacian( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -51458,26 +51147,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_deletions); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1591, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_additions); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1591, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_swaps); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1591, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "laplacian") < 0)) __PYX_ERR(0, 1591, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "laplacian") < 0)) __PYX_ERR(0, 1613, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -51497,7 +51186,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("laplacian", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1591, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("laplacian", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1613, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -51540,64 +51229,64 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_20laplacian(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("laplacian", 1); - /* "MuchTree.pyx":1596 + /* "MuchTree.pyx":1618 * ''' * * aj = self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjacency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjacency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deletions, __pyx_v_deletions) < 0) __PYX_ERR(0, 1596, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deletions, __pyx_v_deletions) < 0) __PYX_ERR(0, 1618, __pyx_L1_error) - /* "MuchTree.pyx":1597 + /* "MuchTree.pyx":1619 * * aj = self.adjacency( deletions=deletions, * additions=additions, # <<<<<<<<<<<<<< * swaps=swaps ) * lp = np.zeros( aj.shape ) */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_additions, __pyx_v_additions) < 0) __PYX_ERR(0, 1596, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_additions, __pyx_v_additions) < 0) __PYX_ERR(0, 1618, __pyx_L1_error) - /* "MuchTree.pyx":1598 + /* "MuchTree.pyx":1620 * aj = self.adjacency( deletions=deletions, * additions=additions, * swaps=swaps ) # <<<<<<<<<<<<<< * lp = np.zeros( aj.shape ) * np.fill_diagonal( lp, aj.sum( axis=0 ) ) */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_swaps, __pyx_v_swaps) < 0) __PYX_ERR(0, 1596, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_swaps, __pyx_v_swaps) < 0) __PYX_ERR(0, 1618, __pyx_L1_error) - /* "MuchTree.pyx":1596 + /* "MuchTree.pyx":1618 * ''' * * aj = self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_aj = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1599 + /* "MuchTree.pyx":1621 * additions=additions, * swaps=swaps ) * lp = np.zeros( aj.shape ) # <<<<<<<<<<<<<< * np.fill_diagonal( lp, aj.sum( axis=0 ) ) * lp = lp - aj */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -51618,31 +51307,31 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_20laplacian(struct __pyx_o __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_v_lp = __pyx_t_3; __pyx_t_3 = 0; - /* "MuchTree.pyx":1600 + /* "MuchTree.pyx":1622 * swaps=swaps ) * lp = np.zeros( aj.shape ) * np.fill_diagonal( lp, aj.sum( axis=0 ) ) # <<<<<<<<<<<<<< * lp = lp - aj * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fill_diagonal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fill_diagonal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_aj, __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1600, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1600, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1622, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -51665,25 +51354,25 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_20laplacian(struct __pyx_o __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1622, __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; - /* "MuchTree.pyx":1601 + /* "MuchTree.pyx":1623 * lp = np.zeros( aj.shape ) * np.fill_diagonal( lp, aj.sum( axis=0 ) ) * lp = lp - aj # <<<<<<<<<<<<<< * * return lp */ - __pyx_t_3 = PyNumber_Subtract(__pyx_v_lp, __pyx_v_aj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_v_lp, __pyx_v_aj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_lp, __pyx_t_3); __pyx_t_3 = 0; - /* "MuchTree.pyx":1603 + /* "MuchTree.pyx":1625 * lp = lp - aj * * return lp # <<<<<<<<<<<<<< @@ -51695,7 +51384,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_20laplacian(struct __pyx_o __pyx_r = __pyx_v_lp; goto __pyx_L0; - /* "MuchTree.pyx":1591 + /* "MuchTree.pyx":1613 * return aj * * def laplacian( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -51720,7 +51409,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_20laplacian(struct __pyx_o return __pyx_r; } -/* "MuchTree.pyx":1605 +/* "MuchTree.pyx":1627 * return lp * * def spectrum( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -51790,26 +51479,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_deletions); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1627, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_additions); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1627, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_swaps); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1627, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "spectrum") < 0)) __PYX_ERR(0, 1605, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "spectrum") < 0)) __PYX_ERR(0, 1627, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -51829,7 +51518,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("spectrum", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1605, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("spectrum", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1627, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -51885,14 +51574,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("spectrum", 1); - /* "MuchTree.pyx":1610 + /* "MuchTree.pyx":1632 * subsetted trees. * ''' * lp = self.laplacian( deletions, additions, swaps ) # <<<<<<<<<<<<<< * * cdef int N = lp.shape[0] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_laplacian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1610, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_laplacian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -51912,30 +51601,30 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_deletions, __pyx_v_additions, __pyx_v_swaps}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_lp = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1612 + /* "MuchTree.pyx":1634 * lp = self.laplacian( deletions, additions, swaps ) * * cdef int N = lp.shape[0] # <<<<<<<<<<<<<< * cdef int nb = 4 * cdef int lwork = (nb+2)*N */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lp, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lp, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_5; - /* "MuchTree.pyx":1613 + /* "MuchTree.pyx":1635 * * cdef int N = lp.shape[0] * cdef int nb = 4 # <<<<<<<<<<<<<< @@ -51944,7 +51633,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob */ __pyx_v_nb = 4; - /* "MuchTree.pyx":1614 + /* "MuchTree.pyx":1636 * cdef int N = lp.shape[0] * cdef int nb = 4 * cdef int lwork = (nb+2)*N # <<<<<<<<<<<<<< @@ -51953,73 +51642,73 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob */ __pyx_v_lwork = ((__pyx_v_nb + 2) * __pyx_v_N); - /* "MuchTree.pyx":1616 + /* "MuchTree.pyx":1638 * cdef int lwork = (nb+2)*N * * np_work = np.ndarray( lwork ) # <<<<<<<<<<<<<< * np_w = np.ndarray( N ) * */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lwork); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_lwork); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_np_work = __pyx_t_1; __pyx_t_1 = 0; - /* "MuchTree.pyx":1617 + /* "MuchTree.pyx":1639 * * np_work = np.ndarray( lwork ) * np_w = np.ndarray( N ) # <<<<<<<<<<<<<< * * cdef double[:,::1] a = lp */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_ndarray), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_np_w = __pyx_t_2; __pyx_t_2 = 0; - /* "MuchTree.pyx":1619 + /* "MuchTree.pyx":1641 * np_w = np.ndarray( N ) * * cdef double[:,::1] a = lp # <<<<<<<<<<<<<< * cdef double[:] work = np_work * cdef double[:] w = np_w */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double(__pyx_v_lp, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double(__pyx_v_lp, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1641, __pyx_L1_error) __pyx_v_a = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "MuchTree.pyx":1620 + /* "MuchTree.pyx":1642 * * cdef double[:,::1] a = lp * cdef double[:] work = np_work # <<<<<<<<<<<<<< * cdef double[:] w = np_w * */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_work, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_work, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1642, __pyx_L1_error) __pyx_v_work = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1621 + /* "MuchTree.pyx":1643 * cdef double[:,::1] a = lp * cdef double[:] work = np_work * cdef double[:] w = np_w # <<<<<<<<<<<<<< * * cdef double * b = &a[0,0] */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_w, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_np_w, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1643, __pyx_L1_error) __pyx_v_w = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "MuchTree.pyx":1623 + /* "MuchTree.pyx":1645 * cdef double[:] w = np_w * * cdef double * b = &a[0,0] # <<<<<<<<<<<<<< @@ -52039,11 +51728,11 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob } else if (unlikely(__pyx_t_9 >= __pyx_v_a.shape[1])) __pyx_t_5 = 1; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); - __PYX_ERR(0, 1623, __pyx_L1_error) + __PYX_ERR(0, 1645, __pyx_L1_error) } __pyx_v_b = (&(*((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_8 * __pyx_v_a.strides[0]) )) + __pyx_t_9)) )))); - /* "MuchTree.pyx":1624 + /* "MuchTree.pyx":1646 * * cdef double * b = &a[0,0] * cdef int info = 0 # <<<<<<<<<<<<<< @@ -52052,7 +51741,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob */ __pyx_v_info = 0; - /* "MuchTree.pyx":1626 + /* "MuchTree.pyx":1648 * cdef int info = 0 * * dsyev( 'N', 'U', &N, b, &N, &w[0], &work[0], &lwork, &info ) # <<<<<<<<<<<<<< @@ -52067,7 +51756,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob } else if (unlikely(__pyx_t_9 >= __pyx_v_w.shape[0])) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); - __PYX_ERR(0, 1626, __pyx_L1_error) + __PYX_ERR(0, 1648, __pyx_L1_error) } __pyx_t_8 = 0; __pyx_t_5 = -1; @@ -52077,11 +51766,11 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob } else if (unlikely(__pyx_t_8 >= __pyx_v_work.shape[0])) __pyx_t_5 = 0; if (unlikely(__pyx_t_5 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_5); - __PYX_ERR(0, 1626, __pyx_L1_error) + __PYX_ERR(0, 1648, __pyx_L1_error) } __pyx_f_5scipy_6linalg_13cython_lapack_dsyev(((char *)"N"), ((char *)"U"), (&__pyx_v_N), __pyx_v_b, (&__pyx_v_N), (&(*((double *) ( /* dim=0 */ (__pyx_v_w.data + __pyx_t_9 * __pyx_v_w.strides[0]) )))), (&(*((double *) ( /* dim=0 */ (__pyx_v_work.data + __pyx_t_8 * __pyx_v_work.strides[0]) )))), (&__pyx_v_lwork), (&__pyx_v_info)); - /* "MuchTree.pyx":1628 + /* "MuchTree.pyx":1650 * dsyev( 'N', 'U', &N, b, &N, &w[0], &work[0], &lwork, &info ) * * if info == 0 : # <<<<<<<<<<<<<< @@ -52091,7 +51780,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob __pyx_t_10 = (__pyx_v_info == 0); if (__pyx_t_10) { - /* "MuchTree.pyx":1629 + /* "MuchTree.pyx":1651 * * if info == 0 : * return np_w # <<<<<<<<<<<<<< @@ -52103,7 +51792,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob __pyx_r = __pyx_v_np_w; goto __pyx_L0; - /* "MuchTree.pyx":1628 + /* "MuchTree.pyx":1650 * dsyev( 'N', 'U', &N, b, &N, &w[0], &work[0], &lwork, &info ) * * if info == 0 : # <<<<<<<<<<<<<< @@ -52112,7 +51801,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob */ } - /* "MuchTree.pyx":1631 + /* "MuchTree.pyx":1653 * return np_w * else : * return info # <<<<<<<<<<<<<< @@ -52121,14 +51810,14 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "MuchTree.pyx":1605 + /* "MuchTree.pyx":1627 * return lp * * def spectrum( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -52157,7 +51846,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_22spectrum(struct __pyx_ob return __pyx_r; } -/* "MuchTree.pyx":1633 +/* "MuchTree.pyx":1655 * return info * * def to_igraph( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -52227,26 +51916,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_deletions); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1633, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_additions); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1633, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_swaps); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1633, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "to_igraph") < 0)) __PYX_ERR(0, 1633, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "to_igraph") < 0)) __PYX_ERR(0, 1655, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -52266,7 +51955,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("to_igraph", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1633, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("to_igraph", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1655, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -52317,34 +52006,34 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_igraph", 1); - /* "MuchTree.pyx":1638 + /* "MuchTree.pyx":1660 * labled igraph object. The igraph package must be installed. * ''' * if not with_igraph : # <<<<<<<<<<<<<< * raise Exception( 'igraph package not installed.' ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_with_igraph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_with_igraph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1638, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (!__pyx_t_2); if (unlikely(__pyx_t_3)) { - /* "MuchTree.pyx":1639 + /* "MuchTree.pyx":1661 * ''' * if not with_igraph : * raise Exception( 'igraph package not installed.' ) # <<<<<<<<<<<<<< * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1639, __pyx_L1_error) + __PYX_ERR(0, 1661, __pyx_L1_error) - /* "MuchTree.pyx":1638 + /* "MuchTree.pyx":1660 * labled igraph object. The igraph package must be installed. * ''' * if not with_igraph : # <<<<<<<<<<<<<< @@ -52353,78 +52042,78 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o */ } - /* "MuchTree.pyx":1641 + /* "MuchTree.pyx":1663 * raise Exception( 'igraph package not installed.' ) * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ).tolist(), */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Graph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Graph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Weighted_Adjacency); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Weighted_Adjacency); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "MuchTree.pyx":1643 + /* "MuchTree.pyx":1665 * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, * additions=additions, * swaps=swaps ).tolist(), # <<<<<<<<<<<<<< * mode=ADJ_UNDIRECTED ) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjacency); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjacency); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "MuchTree.pyx":1641 + /* "MuchTree.pyx":1663 * raise Exception( 'igraph package not installed.' ) * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ).tolist(), */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_deletions, __pyx_v_deletions) < 0) __PYX_ERR(0, 1641, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_deletions, __pyx_v_deletions) < 0) __PYX_ERR(0, 1663, __pyx_L1_error) - /* "MuchTree.pyx":1642 + /* "MuchTree.pyx":1664 * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, * additions=additions, # <<<<<<<<<<<<<< * swaps=swaps ).tolist(), * mode=ADJ_UNDIRECTED ) */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_additions, __pyx_v_additions) < 0) __PYX_ERR(0, 1641, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_additions, __pyx_v_additions) < 0) __PYX_ERR(0, 1663, __pyx_L1_error) - /* "MuchTree.pyx":1643 + /* "MuchTree.pyx":1665 * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, * additions=additions, * swaps=swaps ).tolist(), # <<<<<<<<<<<<<< * mode=ADJ_UNDIRECTED ) * */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_swaps, __pyx_v_swaps) < 0) __PYX_ERR(0, 1641, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_swaps, __pyx_v_swaps) < 0) __PYX_ERR(0, 1663, __pyx_L1_error) - /* "MuchTree.pyx":1641 + /* "MuchTree.pyx":1663 * raise Exception( 'igraph package not installed.' ) * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ).tolist(), */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "MuchTree.pyx":1643 + /* "MuchTree.pyx":1665 * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, * additions=additions, * swaps=swaps ).tolist(), # <<<<<<<<<<<<<< * mode=ADJ_UNDIRECTED ) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_tolist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1643, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_tolist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -52445,46 +52134,46 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - /* "MuchTree.pyx":1641 + /* "MuchTree.pyx":1663 * raise Exception( 'igraph package not installed.' ) * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ).tolist(), */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error); __pyx_t_1 = 0; - /* "MuchTree.pyx":1644 + /* "MuchTree.pyx":1666 * additions=additions, * swaps=swaps ).tolist(), * mode=ADJ_UNDIRECTED ) # <<<<<<<<<<<<<< * * subset_a_length = len( list( self.TreeA.get_descendant_nodes( self.subset_a_root ) ) ) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ADJ_UNDIRECTED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1644, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ADJ_UNDIRECTED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mode, __pyx_t_7) < 0) __PYX_ERR(0, 1644, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mode, __pyx_t_7) < 0) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "MuchTree.pyx":1641 + /* "MuchTree.pyx":1663 * raise Exception( 'igraph package not installed.' ) * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, # <<<<<<<<<<<<<< * additions=additions, * swaps=swaps ).tolist(), */ - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -52492,16 +52181,16 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o __pyx_v_g = __pyx_t_7; __pyx_t_7 = 0; - /* "MuchTree.pyx":1646 + /* "MuchTree.pyx":1668 * mode=ADJ_UNDIRECTED ) * * subset_a_length = len( list( self.TreeA.get_descendant_nodes( self.subset_a_root ) ) ) # <<<<<<<<<<<<<< * subset_b_length = len( list( self.TreeB.get_descendant_nodes( self.subset_b_root ) ) ) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_get_descendant_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeA, __pyx_n_s_get_descendant_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_a_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -52522,27 +52211,27 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_subset_a_length = __pyx_t_9; - /* "MuchTree.pyx":1647 + /* "MuchTree.pyx":1669 * * subset_a_length = len( list( self.TreeA.get_descendant_nodes( self.subset_a_root ) ) ) * subset_b_length = len( list( self.TreeB.get_descendant_nodes( self.subset_b_root ) ) ) # <<<<<<<<<<<<<< * * g.vs['color'] = ['#e1e329ff'] * subset_a_length + \ */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_get_descendant_nodes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->TreeB, __pyx_n_s_get_descendant_nodes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->subset_b_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -52563,69 +52252,69 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __pyx_t_7 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_subset_b_length = __pyx_t_9; - /* "MuchTree.pyx":1649 + /* "MuchTree.pyx":1671 * subset_b_length = len( list( self.TreeB.get_descendant_nodes( self.subset_b_root ) ) ) * * g.vs['color'] = ['#e1e329ff'] * subset_a_length + \ # <<<<<<<<<<<<<< * ['#24878dff'] * subset_b_length * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ */ - __pyx_t_7 = PyList_New(1 * ((__pyx_v_subset_a_length<0) ? 0:__pyx_v_subset_a_length)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1649, __pyx_L1_error) + __pyx_t_7 = PyList_New(1 * ((__pyx_v_subset_a_length<0) ? 0:__pyx_v_subset_a_length)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_subset_a_length; __pyx_temp++) { __Pyx_INCREF(__pyx_kp_u_e1e329ff); __Pyx_GIVEREF(__pyx_kp_u_e1e329ff); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_kp_u_e1e329ff)) __PYX_ERR(0, 1649, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_kp_u_e1e329ff)) __PYX_ERR(0, 1671, __pyx_L1_error); } } - /* "MuchTree.pyx":1650 + /* "MuchTree.pyx":1672 * * g.vs['color'] = ['#e1e329ff'] * subset_a_length + \ * ['#24878dff'] * subset_b_length # <<<<<<<<<<<<<< * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ * [ 'g' + str(i) for i in range( subset_b_length ) ] */ - __pyx_t_1 = PyList_New(1 * ((__pyx_v_subset_b_length<0) ? 0:__pyx_v_subset_b_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_subset_b_length<0) ? 0:__pyx_v_subset_b_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_subset_b_length; __pyx_temp++) { __Pyx_INCREF(__pyx_kp_u_24878dff); __Pyx_GIVEREF(__pyx_kp_u_24878dff); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_kp_u_24878dff)) __PYX_ERR(0, 1650, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_kp_u_24878dff)) __PYX_ERR(0, 1672, __pyx_L1_error); } } - /* "MuchTree.pyx":1649 + /* "MuchTree.pyx":1671 * subset_b_length = len( list( self.TreeB.get_descendant_nodes( self.subset_b_root ) ) ) * * g.vs['color'] = ['#e1e329ff'] * subset_a_length + \ # <<<<<<<<<<<<<< * ['#24878dff'] * subset_b_length * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ */ - __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1649, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_vs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_vs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_color, __pyx_t_6) < 0))) __PYX_ERR(0, 1649, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_color, __pyx_t_6) < 0))) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "MuchTree.pyx":1651 + /* "MuchTree.pyx":1673 * g.vs['color'] = ['#e1e329ff'] * subset_a_length + \ * ['#24878dff'] * subset_b_length * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ # <<<<<<<<<<<<<< @@ -52633,105 +52322,105 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o * g.vs['tree'] = [ 0 ] * subset_a_length + [ 1 ] * subset_b_length */ { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __pyx_v_subset_a_length; __pyx_t_10 = __pyx_t_9; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_9genexpr15__pyx_v_i = __pyx_t_11; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_9genexpr15__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_9genexpr15__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_n_u_h, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_n_u_h, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1651, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } /* exit inner scope */ { /* enter inner scope */ - /* "MuchTree.pyx":1652 + /* "MuchTree.pyx":1674 * ['#24878dff'] * subset_b_length * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ * [ 'g' + str(i) for i in range( subset_b_length ) ] # <<<<<<<<<<<<<< * g.vs['tree'] = [ 0 ] * subset_a_length + [ 1 ] * subset_b_length * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_v_subset_b_length; __pyx_t_10 = __pyx_t_9; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_9genexpr16__pyx_v_i = __pyx_t_11; - __pyx_t_7 = PyInt_FromSsize_t(__pyx_9genexpr16__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_9genexpr16__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_n_u_g, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_n_u_g, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1652, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* exit inner scope */ - /* "MuchTree.pyx":1651 + /* "MuchTree.pyx":1673 * g.vs['color'] = ['#e1e329ff'] * subset_a_length + \ * ['#24878dff'] * subset_b_length * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ # <<<<<<<<<<<<<< * [ 'g' + str(i) for i in range( subset_b_length ) ] * g.vs['tree'] = [ 0 ] * subset_a_length + [ 1 ] * subset_b_length */ - __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_vs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_vs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_label, __pyx_t_7) < 0))) __PYX_ERR(0, 1651, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_label, __pyx_t_7) < 0))) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "MuchTree.pyx":1653 + /* "MuchTree.pyx":1675 * g.vs['label'] = [ 'h' + str(i) for i in range( subset_a_length ) ] + \ * [ 'g' + str(i) for i in range( subset_b_length ) ] * g.vs['tree'] = [ 0 ] * subset_a_length + [ 1 ] * subset_b_length # <<<<<<<<<<<<<< * * return g */ - __pyx_t_7 = PyList_New(1 * ((__pyx_v_subset_a_length<0) ? 0:__pyx_v_subset_a_length)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_7 = PyList_New(1 * ((__pyx_v_subset_a_length<0) ? 0:__pyx_v_subset_a_length)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_subset_a_length; __pyx_temp++) { __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_int_0)) __PYX_ERR(0, 1653, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_int_0)) __PYX_ERR(0, 1675, __pyx_L1_error); } } - __pyx_t_1 = PyList_New(1 * ((__pyx_v_subset_b_length<0) ? 0:__pyx_v_subset_b_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_subset_b_length<0) ? 0:__pyx_v_subset_b_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_subset_b_length; __pyx_temp++) { __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_1)) __PYX_ERR(0, 1653, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_1)) __PYX_ERR(0, 1675, __pyx_L1_error); } } - __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_vs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_vs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_tree, __pyx_t_6) < 0))) __PYX_ERR(0, 1653, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_tree, __pyx_t_6) < 0))) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "MuchTree.pyx":1655 + /* "MuchTree.pyx":1677 * g.vs['tree'] = [ 0 ] * subset_a_length + [ 1 ] * subset_b_length * * return g # <<<<<<<<<<<<<< @@ -52743,7 +52432,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o __pyx_r = __pyx_v_g; goto __pyx_L0; - /* "MuchTree.pyx":1633 + /* "MuchTree.pyx":1655 * return info * * def to_igraph( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< @@ -52767,7 +52456,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_24to_igraph(struct __pyx_o return __pyx_r; } -/* "MuchTree.pyx":1658 +/* "MuchTree.pyx":1680 * * * def dump_table( self ) : # <<<<<<<<<<<<<< @@ -52839,7 +52528,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_26dump_table(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_table", 1); - /* "MuchTree.pyx":1660 + /* "MuchTree.pyx":1682 * def dump_table( self ) : * 'Print the link matrix (WARNING : may be huge and useless)' * for i in xrange( self.n_cols ) : # <<<<<<<<<<<<<< @@ -52851,19 +52540,19 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_26dump_table(struct __pyx_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "MuchTree.pyx":1661 + /* "MuchTree.pyx":1683 * 'Print the link matrix (WARNING : may be huge and useless)' * for i in xrange( self.n_cols ) : * col = [] # <<<<<<<<<<<<<< * for j in xrange( self.table[i].length ) : * #row_id = np.where( self.row_ids == self.table[i].links[j] )[0][0] */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_col, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "MuchTree.pyx":1662 + /* "MuchTree.pyx":1684 * for i in xrange( self.n_cols ) : * col = [] * for j in xrange( self.table[i].length ) : # <<<<<<<<<<<<<< @@ -52875,7 +52564,7 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_26dump_table(struct __pyx_ for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_j = __pyx_t_7; - /* "MuchTree.pyx":1664 + /* "MuchTree.pyx":1686 * for j in xrange( self.table[i].length ) : * #row_id = np.where( self.row_ids == self.table[i].links[j] )[0][0] * row_id = self.table[i].links[j] # <<<<<<<<<<<<<< @@ -52884,60 +52573,60 @@ static PyObject *__pyx_pf_8MuchTree_15SuchLinkedTrees_26dump_table(struct __pyx_ */ __pyx_v_row_id = ((__pyx_v_self->table[__pyx_v_i]).links[__pyx_v_j]); - /* "MuchTree.pyx":1665 + /* "MuchTree.pyx":1687 * #row_id = np.where( self.row_ids == self.table[i].links[j] )[0][0] * row_id = self.table[i].links[j] * col.append( row_id ) # <<<<<<<<<<<<<< * print( 'column', i, ':', ','.join( map( str, col ) ) ) */ - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_row_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_row_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_col, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_col, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "MuchTree.pyx":1666 + /* "MuchTree.pyx":1688 * row_id = self.table[i].links[j] * col.append( row_id ) * print( 'column', i, ':', ','.join( map( str, col ) ) ) # <<<<<<<<<<<<<< */ - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF((PyObject *)(&PyUnicode_Type)); __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 1666, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 1688, __pyx_L1_error); __Pyx_INCREF(__pyx_v_col); __Pyx_GIVEREF(__pyx_v_col); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_col)) __PYX_ERR(0, 1666, __pyx_L1_error); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_col)) __PYX_ERR(0, 1688, __pyx_L1_error); + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyUnicode_Join(__pyx_kp_u__29, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_9 = PyUnicode_Join(__pyx_kp_u__29, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_n_u_column); __Pyx_GIVEREF(__pyx_n_u_column); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_u_column)) __PYX_ERR(0, 1666, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_n_u_column)) __PYX_ERR(0, 1688, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4)) __PYX_ERR(0, 1688, __pyx_L1_error); __Pyx_INCREF(__pyx_kp_u__28); __Pyx_GIVEREF(__pyx_kp_u__28); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u__28)) __PYX_ERR(0, 1666, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u__28)) __PYX_ERR(0, 1688, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_9); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9)) __PYX_ERR(0, 1666, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - /* "MuchTree.pyx":1658 + /* "MuchTree.pyx":1680 * * * def dump_table( self ) : # <<<<<<<<<<<<<< @@ -53309,7 +52998,7 @@ static PyMethodDef __pyx_methods_8MuchTree_SuchTree[] = { {"is_ancestor", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_35is_ancestor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_34is_ancestor}, {"mrca", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_37mrca, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_36mrca}, {"get_quartet_topology", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_39get_quartet_topology, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_38get_quartet_topology}, - {"quartet_topologies", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_41quartet_topologies, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, + {"quartet_topologies", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_41quartet_topologies, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_40quartet_topologies}, {"distance", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_43distance, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_42distance}, {"distances", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_45distances, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_44distances}, {"distances_by_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_8MuchTree_8SuchTree_47distances_by_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_8MuchTree_8SuchTree_46distances_by_name}, @@ -57094,10 +56783,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 182, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 182, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 277, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 672, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 925, __pyx_L1_error) - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 964, __pyx_L1_error) - __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 947, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1588, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error) __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error) @@ -57149,7 +56838,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025 * __pyx_import_array() * except Exception: * raise ImportError("numpy._core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -57160,7 +56849,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "../../../../tmp/pip-build-env-lr5etisy/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 + /* "../../../../tmp/pip-build-env-1dp5hqrp/overlay/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031 * _import_umath() * except Exception: * raise ImportError("numpy._core.umath failed to import") # <<<<<<<<<<<<<< @@ -57193,80 +56882,80 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "MuchTree.pyx":641 + /* "MuchTree.pyx":657 * visited = np.zeros( self.depth, dtype=int ) * - * M = np.zeros( 6, dtype=int ) # <<<<<<<<<<<<<< - * C = np.zeros( 6, dtype=int ) + * M = np.zeros( 6, dtype=int ) # <<<<<<<<<<<<<< + * C = np.zeros( 6, dtype=int ) * */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - /* "MuchTree.pyx":1069 + /* "MuchTree.pyx":1091 * # make sure the link matrix connects the trees * if not link_matrix.shape == ( self.TreeA.n_leafs, self.TreeB.n_leafs ) : * raise Exception( 'link_matrix shape must match tree leaf counts' ) # <<<<<<<<<<<<<< * * if not set(link_matrix.axes[0]) == set(self.TreeA.leafs.keys()) : */ - __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_link_matrix_shape_must_match_tre); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_link_matrix_shape_must_match_tre); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); - /* "MuchTree.pyx":1072 + /* "MuchTree.pyx":1094 * * if not set(link_matrix.axes[0]) == set(self.TreeA.leafs.keys()) : * raise Exception( 'axis[0] does not match TreeA leaf names' ) # <<<<<<<<<<<<<< * * if not set(link_matrix.axes[1]) == set(self.TreeB.leafs.keys()) : */ - __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_axis_0_does_not_match_TreeA_leaf); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_axis_0_does_not_match_TreeA_leaf); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); - /* "MuchTree.pyx":1075 + /* "MuchTree.pyx":1097 * * if not set(link_matrix.axes[1]) == set(self.TreeB.leafs.keys()) : * raise Exception( 'axis[1] does not match TreeB leaf names' ) # <<<<<<<<<<<<<< * * # set row and column indexes */ - __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_axis_1_does_not_match_TreeB_leaf); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_axis_1_does_not_match_TreeB_leaf); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); - /* "MuchTree.pyx":1566 + /* "MuchTree.pyx":1588 * * # map node ids to matrix coordinates * ta_links = map( lambda x : ta_node_ids.index(x), ll[:,1] ) # <<<<<<<<<<<<<< * tb_links = map( lambda x : tb_node_ids.index(x) + ta_aj.shape[0], ll[:,0] ) * */ - __pyx_tuple__25 = PyTuple_Pack(2, __pyx_slice__5, __pyx_int_1); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(2, __pyx_slice__5, __pyx_int_1); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - /* "MuchTree.pyx":1567 + /* "MuchTree.pyx":1589 * # map node ids to matrix coordinates * ta_links = map( lambda x : ta_node_ids.index(x), ll[:,1] ) * tb_links = map( lambda x : tb_node_ids.index(x) + ta_aj.shape[0], ll[:,0] ) # <<<<<<<<<<<<<< * * # build empty graph adjacency matrix */ - __pyx_tuple__26 = PyTuple_Pack(2, __pyx_slice__5, __pyx_int_0); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(2, __pyx_slice__5, __pyx_int_0); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - /* "MuchTree.pyx":1639 + /* "MuchTree.pyx":1661 * ''' * if not with_igraph : * raise Exception( 'igraph package not installed.' ) # <<<<<<<<<<<<<< * * g = Graph.Weighted_Adjacency( self.adjacency( deletions=deletions, */ - __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_igraph_package_not_installed); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1639, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_igraph_package_not_installed); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); @@ -57582,139 +57271,139 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * return frozenset( sisters ) * * def quartet_topologies( self, long[:,:] quartets ) : # <<<<<<<<<<<<<< - * - * topologies = np.zeros( ( len(quartets), 4 ), dtype=int ) + * ''' + * Bulk processing function for computing quartet topologies. */ __pyx_tuple__70 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_quartets, __pyx_n_s_topologies, __pyx_n_s_visited, __pyx_n_s_M, __pyx_n_s_C, __pyx_n_s_I); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_quartet_topologies, 635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 635, __pyx_L1_error) - /* "MuchTree.pyx":727 + /* "MuchTree.pyx":749 * return mrca * * def distance( self, a, b ) : # <<<<<<<<<<<<<< * ''' * Return distnace between a pair of nodes. Will treat strings as */ - __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_distance, 727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_distance, 749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 749, __pyx_L1_error) - /* "MuchTree.pyx":769 + /* "MuchTree.pyx":791 * return d * * def distances( self, long[:,:] ids ) : # <<<<<<<<<<<<<< * ''' * Returns an array of distances between pairs of node ids, */ - __pyx_tuple__73 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_ids, __pyx_n_s_visited, __pyx_n_s_result); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_tuple__73 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_ids, __pyx_n_s_visited, __pyx_n_s_result); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_distances, 769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_distances, 791, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 791, __pyx_L1_error) - /* "MuchTree.pyx":817 + /* "MuchTree.pyx":839 * result[i] = d * * def distances_by_name( self, id_pairs ) : # <<<<<<<<<<<<<< * ''' * Returns an array of distances between pairs of leaf names in a */ - __pyx_tuple__75 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_id_pairs, __pyx_n_s_shape, __pyx_n_s_ids, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_tuple__75 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_id_pairs, __pyx_n_s_shape, __pyx_n_s_ids, __pyx_n_s_n, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_distances_by_name, 817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_distances_by_name, 839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 839, __pyx_L1_error) - /* "MuchTree.pyx":829 + /* "MuchTree.pyx":851 * return self.distances( ids ) * * def link_leaf( self, unsigned int leaf_id, unsigned int col_id ) : # <<<<<<<<<<<<<< * ''' * Attaches a leaf node to SuchLinkedTrees link matrix column. */ - __pyx_tuple__77 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_leaf_id, __pyx_n_s_col_id); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_leaf_id, __pyx_n_s_col_id); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_link_leaf, 829, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_link_leaf, 851, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 851, __pyx_L1_error) - /* "MuchTree.pyx":841 + /* "MuchTree.pyx":863 * self.data[leaf_id].right_child = col_id * * def get_links( self, leaf_ids ) : # <<<<<<<<<<<<<< * ''' * Returns an array of column ids for an array of leaf ids. */ - __pyx_tuple__79 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_leaf_ids, __pyx_n_s_col_ids, __pyx_n_s_n, __pyx_n_s_leaf); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_leaf_ids, __pyx_n_s_col_ids, __pyx_n_s_n, __pyx_n_s_leaf); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_get_links, 841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_get_links, 863, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 863, __pyx_L1_error) - /* "MuchTree.pyx":852 + /* "MuchTree.pyx":874 * return col_ids * * def adjacency( self, int node=-1 ) : # <<<<<<<<<<<<<< * ''' * The graph adjacency matrix of the tree. If parameter */ - __pyx_tuple__81 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_node_id, __pyx_n_s_parent, __pyx_n_s_distance, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_n, __pyx_n_s_to_visit, __pyx_n_s_ajmatrix); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_node_id, __pyx_n_s_parent, __pyx_n_s_distance, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_n, __pyx_n_s_to_visit, __pyx_n_s_ajmatrix); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); - __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_adjacency, 852, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_adjacency, 874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 874, __pyx_L1_error) - /* "MuchTree.pyx":903 + /* "MuchTree.pyx":925 * 'node_ids' : self.np_buffer[:n] } * * def laplacian( self, int node=-1 ) : # <<<<<<<<<<<<<< * ''' * The graph Laplacian matrix of the tree, or if the parameter */ - __pyx_tuple__83 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_aj, __pyx_n_s_node_ids, __pyx_n_s_lp); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_tuple__83 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_aj, __pyx_n_s_node_ids, __pyx_n_s_lp); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); - __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_laplacian, 903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_laplacian, 925, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 925, __pyx_L1_error) - /* "MuchTree.pyx":920 + /* "MuchTree.pyx":942 * 'node_ids' : node_ids } * * def dump_array( self ) : # <<<<<<<<<<<<<< * ''' * Print the whole tree. (WARNING : may be huge and useless.) */ - __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); - __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_dump_array, 920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_dump_array, 942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 942, __pyx_L1_error) - /* "MuchTree.pyx":931 + /* "MuchTree.pyx":953 * print( ' right child : %d' % self.data[n].right_child ) * * def nodes_data( self ) : # <<<<<<<<<<<<<< * ''' * Generator for the node data in the tree, compatible with networkx. */ - __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_leaf_name); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_leaf_name); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__87); __Pyx_GIVEREF(__pyx_tuple__87); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_nodes_data, 931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_nodes_data, 953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 953, __pyx_L1_error) - /* "MuchTree.pyx":942 + /* "MuchTree.pyx":964 * yield ( n, { 'label' : leaf_name } ) * * def edges_data( self ) : # <<<<<<<<<<<<<< * ''' * Generator for the edge (i.e. branch) data in the tree, compatible with networkx. */ - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_edges_data, 942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_edges_data, 964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 964, __pyx_L1_error) - /* "MuchTree.pyx":951 + /* "MuchTree.pyx":973 * yield ( n, self.data[n].parent, { 'weight' : self.data[n].distance } ) * * def relationships( self ) : # <<<<<<<<<<<<<< * ''' * Return a Pandas DataFrame of describing the relationships among leafs in the tree. */ - __pyx_tuple__88 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_pairs, __pyx_n_s_distances, __pyx_n_s_mrca, __pyx_n_s_mrca_to_root, __pyx_n_s_a_to_root, __pyx_n_s_b_to_root, __pyx_n_s_a_to_mrca, __pyx_n_s_b_to_mrca, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_m, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_a2r, __pyx_n_s_a2m, __pyx_n_s_b2r, __pyx_n_s_b2m); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 951, __pyx_L1_error) + __pyx_tuple__88 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_pairs, __pyx_n_s_distances, __pyx_n_s_mrca, __pyx_n_s_mrca_to_root, __pyx_n_s_a_to_root, __pyx_n_s_b_to_root, __pyx_n_s_a_to_mrca, __pyx_n_s_b_to_mrca, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_m, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_a2r, __pyx_n_s_a2m, __pyx_n_s_b2r, __pyx_n_s_b2m); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_relationships, 951, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 951, __pyx_L1_error) + __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_relationships, 973, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 973, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -57737,137 +57426,137 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__92); __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "MuchTree.pyx":1232 + /* "MuchTree.pyx":1254 * return self.subset_n_links * * def get_column_leafs( self, col, as_row_ids=False ) : # <<<<<<<<<<<<<< * * if isinstance(col, basestring) : */ - __pyx_tuple__94 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_col, __pyx_n_s_as_row_ids, __pyx_n_s_col_id, __pyx_n_s_length, __pyx_n_s_column, __pyx_n_s_i); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_tuple__94 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_col, __pyx_n_s_as_row_ids, __pyx_n_s_col_id, __pyx_n_s_length, __pyx_n_s_column, __pyx_n_s_i); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); - __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_get_column_leafs, 1232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_get_column_leafs, 1254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1254, __pyx_L1_error) - /* "MuchTree.pyx":1252 + /* "MuchTree.pyx":1274 * return column * * def get_column_links( self, col ) : # <<<<<<<<<<<<<< * * if isinstance(col, basestring) : */ - __pyx_tuple__96 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_col, __pyx_n_s_col_id, __pyx_n_s_length, __pyx_n_s_column, __pyx_n_s_i); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_tuple__96 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_col, __pyx_n_s_col_id, __pyx_n_s_length, __pyx_n_s_column, __pyx_n_s_i); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); - __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_get_column_links, 1252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_get_column_links, 1274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1274, __pyx_L1_error) - /* "MuchTree.pyx":1334 + /* "MuchTree.pyx":1356 * self.subset_n_links = k * * def subset_b( self, node_id ) : # <<<<<<<<<<<<<< * 'subset the link matrix to leafs desended from node_id in TreeB' * */ - __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_subset_b, 1334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_subset_b, 1356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1356, __pyx_L1_error) - /* "MuchTree.pyx":1346 + /* "MuchTree.pyx":1368 * self._build_linklist() * * def subset_a( self, node_id ) : # <<<<<<<<<<<<<< * 'subset the link matrix to leafs desended from node_id in TreeA' * */ - __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_subset_a, 1346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_subset_a, 1368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1368, __pyx_L1_error) - /* "MuchTree.pyx":1358 + /* "MuchTree.pyx":1380 * self._build_linklist() * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * def linked_distances( self ) : * ''' */ - __pyx_tuple__100 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_size, __pyx_n_s_ids_a, __pyx_n_s_ids_b, __pyx_n_s_linklist, __pyx_n_s_IDs_a, __pyx_n_s_IDs_b); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_tuple__100 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_size, __pyx_n_s_ids_a, __pyx_n_s_ids_b, __pyx_n_s_linklist, __pyx_n_s_IDs_a, __pyx_n_s_IDs_b); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); - __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_linked_distances, 1358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_linked_distances, 1380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1380, __pyx_L1_error) - /* "MuchTree.pyx":1409 + /* "MuchTree.pyx":1431 * return ( self.seed * self.modulus ) % n * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * def sample_linked_distances( self, float sigma=0.001, * unsigned int buckets=64, */ - __pyx_tuple__102 = PyTuple_Pack(51, __pyx_n_s_self, __pyx_n_s_sigma, __pyx_n_s_buckets, __pyx_n_s_n, __pyx_n_s_maxcycles, __pyx_n_s_np_query_a, __pyx_n_s_np_query_b, __pyx_n_s_np_distances_a, __pyx_n_s_np_distances_b, __pyx_n_s_np_dbuffer_a, __pyx_n_s_np_dbuffer_b, __pyx_n_s_np_sums_a, __pyx_n_s_np_sums_b, __pyx_n_s_np_sumsq_a, __pyx_n_s_np_sumsq_b, __pyx_n_s_np_samples_a, __pyx_n_s_np_samples_b, __pyx_n_s_np_deviations_a, __pyx_n_s_np_deviations_b, __pyx_n_s_np_all_distances_a, __pyx_n_s_np_all_distances_b, __pyx_n_s_query_a, __pyx_n_s_query_b, __pyx_n_s_distances_a, __pyx_n_s_distances_b, __pyx_n_s_distances_a_mv, __pyx_n_s_distances_b_mv, __pyx_n_s_sums_a, __pyx_n_s_sums_b, __pyx_n_s_sumsq_a, __pyx_n_s_sumsq_b, __pyx_n_s_samples_a, __pyx_n_s_samples_b, __pyx_n_s_deviations_a, __pyx_n_s_deviations_b, __pyx_n_s_all_distances_a, __pyx_n_s_all_distances_b, __pyx_n_s_linklist, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_l1, __pyx_n_s_l2, __pyx_n_s_a1, __pyx_n_s_a2, __pyx_n_s_b1, __pyx_n_s_b2, __pyx_n_s_deviation_a, __pyx_n_s_deviation_b, __pyx_n_s_sumsq_bucket_a, __pyx_n_s_sumsq_bucket_b, __pyx_n_s_cycles); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_tuple__102 = PyTuple_Pack(51, __pyx_n_s_self, __pyx_n_s_sigma, __pyx_n_s_buckets, __pyx_n_s_n, __pyx_n_s_maxcycles, __pyx_n_s_np_query_a, __pyx_n_s_np_query_b, __pyx_n_s_np_distances_a, __pyx_n_s_np_distances_b, __pyx_n_s_np_dbuffer_a, __pyx_n_s_np_dbuffer_b, __pyx_n_s_np_sums_a, __pyx_n_s_np_sums_b, __pyx_n_s_np_sumsq_a, __pyx_n_s_np_sumsq_b, __pyx_n_s_np_samples_a, __pyx_n_s_np_samples_b, __pyx_n_s_np_deviations_a, __pyx_n_s_np_deviations_b, __pyx_n_s_np_all_distances_a, __pyx_n_s_np_all_distances_b, __pyx_n_s_query_a, __pyx_n_s_query_b, __pyx_n_s_distances_a, __pyx_n_s_distances_b, __pyx_n_s_distances_a_mv, __pyx_n_s_distances_b_mv, __pyx_n_s_sums_a, __pyx_n_s_sums_b, __pyx_n_s_sumsq_a, __pyx_n_s_sumsq_b, __pyx_n_s_samples_a, __pyx_n_s_samples_b, __pyx_n_s_deviations_a, __pyx_n_s_deviations_b, __pyx_n_s_all_distances_a, __pyx_n_s_all_distances_b, __pyx_n_s_linklist, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_l1, __pyx_n_s_l2, __pyx_n_s_a1, __pyx_n_s_a2, __pyx_n_s_b1, __pyx_n_s_b2, __pyx_n_s_deviation_a, __pyx_n_s_deviation_b, __pyx_n_s_sumsq_bucket_a, __pyx_n_s_sumsq_bucket_b, __pyx_n_s_cycles); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__102); __Pyx_GIVEREF(__pyx_tuple__102); - __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 51, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_sample_linked_distances, 1409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1409, __pyx_L1_error) - __pyx_tuple__104 = PyTuple_Pack(4, __pyx_float_0_001, __pyx_int_64, __pyx_int_4096, __pyx_int_100); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 51, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_sample_linked_distances, 1431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_tuple__104 = PyTuple_Pack(4, __pyx_float_0_001, __pyx_int_64, __pyx_int_4096, __pyx_int_100); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); - /* "MuchTree.pyx":1539 + /* "MuchTree.pyx":1561 * 'deviation_b' : deviation_b } * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * Build the graph adjacency matrix of the current subsetted */ - __pyx_tuple__105 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_TA, __pyx_n_s_TB, __pyx_n_s_ta_aj, __pyx_n_s_tb_aj, __pyx_n_s_ta_node_ids, __pyx_n_s_tb_node_ids, __pyx_n_s_ll, __pyx_n_s_i, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_X, __pyx_n_s_Y, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_ta_links, __pyx_n_s_tb_links, __pyx_n_s_aj, __pyx_n_s_ta_mean, __pyx_n_s_tb_mean, __pyx_n_s_link_mean, __pyx_n_s_j); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_tuple__105 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_TA, __pyx_n_s_TB, __pyx_n_s_ta_aj, __pyx_n_s_tb_aj, __pyx_n_s_ta_node_ids, __pyx_n_s_tb_node_ids, __pyx_n_s_ll, __pyx_n_s_i, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_X, __pyx_n_s_Y, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_ta_links, __pyx_n_s_tb_links, __pyx_n_s_aj, __pyx_n_s_ta_mean, __pyx_n_s_tb_mean, __pyx_n_s_link_mean, __pyx_n_s_j); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__105); __Pyx_GIVEREF(__pyx_tuple__105); - __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_adjacency, 1539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1539, __pyx_L1_error) - __pyx_tuple__107 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_adjacency, 1561, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_tuple__107 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); - /* "MuchTree.pyx":1591 + /* "MuchTree.pyx":1613 * return aj * * def laplacian( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * The graph Laplacian matrix of the current subsetted trees. */ - __pyx_tuple__108 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_aj, __pyx_n_s_lp); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_tuple__108 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_aj, __pyx_n_s_lp); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 1613, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__108); __Pyx_GIVEREF(__pyx_tuple__108); - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_laplacian, 1591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_laplacian, 1613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1613, __pyx_L1_error) - /* "MuchTree.pyx":1605 + /* "MuchTree.pyx":1627 * return lp * * def spectrum( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * The eigenvalues of the graph Laplacian matrix of the current */ - __pyx_tuple__110 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_lp, __pyx_n_s_N, __pyx_n_s_nb, __pyx_n_s_lwork, __pyx_n_s_np_work, __pyx_n_s_np_w, __pyx_n_s_a, __pyx_n_s_work, __pyx_n_s_w, __pyx_n_s_b, __pyx_n_s_info); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1605, __pyx_L1_error) + __pyx_tuple__110 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_lp, __pyx_n_s_N, __pyx_n_s_nb, __pyx_n_s_lwork, __pyx_n_s_np_work, __pyx_n_s_np_w, __pyx_n_s_a, __pyx_n_s_work, __pyx_n_s_w, __pyx_n_s_b, __pyx_n_s_info); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__110); __Pyx_GIVEREF(__pyx_tuple__110); - __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_spectrum, 1605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1605, __pyx_L1_error) + __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_spectrum, 1627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1627, __pyx_L1_error) - /* "MuchTree.pyx":1633 + /* "MuchTree.pyx":1655 * return info * * def to_igraph( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * Return the current SuchLinkedTrees subgraph as a weighted, */ - __pyx_tuple__112 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_g, __pyx_n_s_subset_a_length, __pyx_n_s_subset_b_length, __pyx_n_s_i, __pyx_n_s_i); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 1633, __pyx_L1_error) + __pyx_tuple__112 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_deletions, __pyx_n_s_additions, __pyx_n_s_swaps, __pyx_n_s_g, __pyx_n_s_subset_a_length, __pyx_n_s_subset_b_length, __pyx_n_s_i, __pyx_n_s_i); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__112); __Pyx_GIVEREF(__pyx_tuple__112); - __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_to_igraph, 1633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1633, __pyx_L1_error) + __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_to_igraph, 1655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1655, __pyx_L1_error) - /* "MuchTree.pyx":1658 + /* "MuchTree.pyx":1680 * * * def dump_table( self ) : # <<<<<<<<<<<<<< * 'Print the link matrix (WARNING : may be huge and useless)' * for i in xrange( self.n_cols ) : */ - __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_col, __pyx_n_s_j, __pyx_n_s_row_id); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_tuple__114 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_col, __pyx_n_s_j, __pyx_n_s_row_id); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); - __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_dump_table, 1658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_SuchTree_MuchTree_pyx, __pyx_n_s_dump_table, 1680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1680, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -58003,7 +57692,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_8MuchTree_SuchTree._get_distance_to_root = (float (*)(struct __pyx_obj_8MuchTree_SuchTree *, PyObject *))__pyx_f_8MuchTree_8SuchTree__get_distance_to_root; __pyx_vtable_8MuchTree_SuchTree._is_leaf = (int (*)(struct __pyx_obj_8MuchTree_SuchTree *, int))__pyx_f_8MuchTree_8SuchTree__is_leaf; __pyx_vtable_8MuchTree_SuchTree._is_ancestor = (int (*)(struct __pyx_obj_8MuchTree_SuchTree *, int, int))__pyx_f_8MuchTree_8SuchTree__is_ancestor; - __pyx_vtable_8MuchTree_SuchTree._quartet_topologies = (PyObject *(*)(struct __pyx_obj_8MuchTree_SuchTree *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice))__pyx_f_8MuchTree_8SuchTree__quartet_topologies; + __pyx_vtable_8MuchTree_SuchTree._quartet_topologies = (void (*)(struct __pyx_obj_8MuchTree_SuchTree *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice))__pyx_f_8MuchTree_8SuchTree__quartet_topologies; __pyx_vtable_8MuchTree_SuchTree._mrca = (int (*)(struct __pyx_obj_8MuchTree_SuchTree *, __Pyx_memviewslice, int, int))__pyx_f_8MuchTree_8SuchTree__mrca; __pyx_vtable_8MuchTree_SuchTree._distance = (float (*)(struct __pyx_obj_8MuchTree_SuchTree *, int, int))__pyx_f_8MuchTree_8SuchTree__distance; __pyx_vtable_8MuchTree_SuchTree._distances = (void (*)(struct __pyx_obj_8MuchTree_SuchTree *, unsigned int, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice))__pyx_f_8MuchTree_8SuchTree__distances; @@ -58049,15 +57738,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_8MuchTree_SuchLinkedTrees._build_linklist = (void (*)(struct __pyx_obj_8MuchTree_SuchLinkedTrees *))__pyx_f_8MuchTree_15SuchLinkedTrees__build_linklist; __pyx_vtable_8MuchTree_SuchLinkedTrees._random_int = (uint64_t (*)(struct __pyx_obj_8MuchTree_SuchLinkedTrees *, uint64_t))__pyx_f_8MuchTree_15SuchLinkedTrees__random_int; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8MuchTree_SuchLinkedTrees = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree_SuchLinkedTrees_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree_SuchLinkedTrees)) __PYX_ERR(0, 983, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree_SuchLinkedTrees_spec, __pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_ptype_8MuchTree_SuchLinkedTrees = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree_SuchLinkedTrees_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree_SuchLinkedTrees)) __PYX_ERR(0, 1005, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree_SuchLinkedTrees_spec, __pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 1005, __pyx_L1_error) #else __pyx_ptype_8MuchTree_SuchLinkedTrees = &__pyx_type_8MuchTree_SuchLinkedTrees; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 1005, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8MuchTree_SuchLinkedTrees->tp_print = 0; @@ -58067,13 +57756,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_8MuchTree_SuchLinkedTrees->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_vtabptr_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_vtabptr_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 1005, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 1005, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SuchLinkedTrees, (PyObject *) __pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SuchLinkedTrees, (PyObject *) __pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 1005, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_8MuchTree_SuchLinkedTrees) < 0) __PYX_ERR(0, 1005, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS __pyx_ptype_8MuchTree___pyx_scope_struct__get_descendant_nodes = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct__get_descendant_nodes_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct__get_descendant_nodes)) __PYX_ERR(0, 332, __pyx_L1_error) @@ -58209,15 +57898,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct_7_nodes_data_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data)) __PYX_ERR(0, 931, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree___pyx_scope_struct_7_nodes_data_spec, __pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data) < 0) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct_7_nodes_data_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data)) __PYX_ERR(0, 953, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree___pyx_scope_struct_7_nodes_data_spec, __pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data) < 0) __PYX_ERR(0, 953, __pyx_L1_error) #else __pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data = &__pyx_type_8MuchTree___pyx_scope_struct_7_nodes_data; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data) < 0) __PYX_ERR(0, 931, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data) < 0) __PYX_ERR(0, 953, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8MuchTree___pyx_scope_struct_7_nodes_data->tp_print = 0; @@ -58228,15 +57917,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct_8_edges_data_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data)) __PYX_ERR(0, 942, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree___pyx_scope_struct_8_edges_data_spec, __pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data) < 0) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct_8_edges_data_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data)) __PYX_ERR(0, 964, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree___pyx_scope_struct_8_edges_data_spec, __pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data) < 0) __PYX_ERR(0, 964, __pyx_L1_error) #else __pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data = &__pyx_type_8MuchTree___pyx_scope_struct_8_edges_data; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data) < 0) __PYX_ERR(0, 942, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data) < 0) __PYX_ERR(0, 964, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8MuchTree___pyx_scope_struct_8_edges_data->tp_print = 0; @@ -58247,15 +57936,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct_9_adjacency_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency)) __PYX_ERR(0, 1539, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree___pyx_scope_struct_9_adjacency_spec, __pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency) < 0) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_8MuchTree___pyx_scope_struct_9_adjacency_spec, NULL); if (unlikely(!__pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency)) __PYX_ERR(0, 1561, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_8MuchTree___pyx_scope_struct_9_adjacency_spec, __pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency) < 0) __PYX_ERR(0, 1561, __pyx_L1_error) #else __pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency = &__pyx_type_8MuchTree___pyx_scope_struct_9_adjacency; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency) < 0) __PYX_ERR(0, 1539, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency) < 0) __PYX_ERR(0, 1561, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_8MuchTree___pyx_scope_struct_9_adjacency->tp_print = 0; @@ -59784,8 +59473,8 @@ if (!__Pyx_RefNanny) { * return frozenset( sisters ) * * def quartet_topologies( self, long[:,:] quartets ) : # <<<<<<<<<<<<<< - * - * topologies = np.zeros( ( len(quartets), 4 ), dtype=int ) + * ''' + * Bulk processing function for computing quartet topologies. */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_41quartet_topologies, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_quartet_topologies, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -59793,148 +59482,148 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":727 + /* "MuchTree.pyx":749 * return mrca * * def distance( self, a, b ) : # <<<<<<<<<<<<<< * ''' * Return distnace between a pair of nodes. Will treat strings as */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_43distance, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_distance, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_43distance, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_distance, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_distance, __pyx_t_5) < 0) __PYX_ERR(0, 727, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_distance, __pyx_t_5) < 0) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":769 + /* "MuchTree.pyx":791 * return d * * def distances( self, long[:,:] ids ) : # <<<<<<<<<<<<<< * ''' * Returns an array of distances between pairs of node ids, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_45distances, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_distances, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_45distances, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_distances, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_distances, __pyx_t_5) < 0) __PYX_ERR(0, 769, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_distances, __pyx_t_5) < 0) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":817 + /* "MuchTree.pyx":839 * result[i] = d * * def distances_by_name( self, id_pairs ) : # <<<<<<<<<<<<<< * ''' * Returns an array of distances between pairs of leaf names in a */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_47distances_by_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_distances_by_name, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_47distances_by_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_distances_by_name, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_distances_by_name, __pyx_t_5) < 0) __PYX_ERR(0, 817, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_distances_by_name, __pyx_t_5) < 0) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":829 + /* "MuchTree.pyx":851 * return self.distances( ids ) * * def link_leaf( self, unsigned int leaf_id, unsigned int col_id ) : # <<<<<<<<<<<<<< * ''' * Attaches a leaf node to SuchLinkedTrees link matrix column. */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_49link_leaf, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_link_leaf, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_49link_leaf, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_link_leaf, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_link_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 829, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_link_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":841 + /* "MuchTree.pyx":863 * self.data[leaf_id].right_child = col_id * * def get_links( self, leaf_ids ) : # <<<<<<<<<<<<<< * ''' * Returns an array of column ids for an array of leaf ids. */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_51get_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_get_links, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_51get_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_get_links, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_get_links, __pyx_t_5) < 0) __PYX_ERR(0, 841, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_get_links, __pyx_t_5) < 0) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":852 + /* "MuchTree.pyx":874 * return col_ids * * def adjacency( self, int node=-1 ) : # <<<<<<<<<<<<<< * ''' * The graph adjacency matrix of the tree. If parameter */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_53adjacency, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_adjacency, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_53adjacency, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_adjacency, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_adjacency, __pyx_t_5) < 0) __PYX_ERR(0, 852, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_adjacency, __pyx_t_5) < 0) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":903 + /* "MuchTree.pyx":925 * 'node_ids' : self.np_buffer[:n] } * * def laplacian( self, int node=-1 ) : # <<<<<<<<<<<<<< * ''' * The graph Laplacian matrix of the tree, or if the parameter */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_55laplacian, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_laplacian, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_55laplacian, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_laplacian, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_laplacian, __pyx_t_5) < 0) __PYX_ERR(0, 903, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_laplacian, __pyx_t_5) < 0) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":920 + /* "MuchTree.pyx":942 * 'node_ids' : node_ids } * * def dump_array( self ) : # <<<<<<<<<<<<<< * ''' * Print the whole tree. (WARNING : may be huge and useless.) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_57dump_array, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_dump_array, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_57dump_array, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_dump_array, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_dump_array, __pyx_t_5) < 0) __PYX_ERR(0, 920, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_dump_array, __pyx_t_5) < 0) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":931 + /* "MuchTree.pyx":953 * print( ' right child : %d' % self.data[n].right_child ) * * def nodes_data( self ) : # <<<<<<<<<<<<<< * ''' * Generator for the node data in the tree, compatible with networkx. */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_59nodes_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_nodes_data, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_59nodes_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_nodes_data, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_nodes_data, __pyx_t_5) < 0) __PYX_ERR(0, 931, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_nodes_data, __pyx_t_5) < 0) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":942 + /* "MuchTree.pyx":964 * yield ( n, { 'label' : leaf_name } ) * * def edges_data( self ) : # <<<<<<<<<<<<<< * ''' * Generator for the edge (i.e. branch) data in the tree, compatible with networkx. */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_62edges_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_edges_data, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_62edges_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_edges_data, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_edges_data, __pyx_t_5) < 0) __PYX_ERR(0, 942, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_edges_data, __pyx_t_5) < 0) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); - /* "MuchTree.pyx":951 + /* "MuchTree.pyx":973 * yield ( n, self.data[n].parent, { 'weight' : self.data[n].distance } ) * * def relationships( self ) : # <<<<<<<<<<<<<< * ''' * Return a Pandas DataFrame of describing the relationships among leafs in the tree. */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_65relationships, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_relationships, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_8SuchTree_65relationships, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchTree_relationships, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_relationships, __pyx_t_5) < 0) __PYX_ERR(0, 951, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchTree, __pyx_n_s_relationships, __pyx_t_5) < 0) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchTree); @@ -59959,152 +59648,152 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "MuchTree.pyx":1232 + /* "MuchTree.pyx":1254 * return self.subset_n_links * * def get_column_leafs( self, col, as_row_ids=False ) : # <<<<<<<<<<<<<< * * if isinstance(col, basestring) : */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_7get_column_leafs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_get_column_leafs, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_7get_column_leafs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_get_column_leafs, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__52); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_get_column_leafs, __pyx_t_5) < 0) __PYX_ERR(0, 1232, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_get_column_leafs, __pyx_t_5) < 0) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1252 + /* "MuchTree.pyx":1274 * return column * * def get_column_links( self, col ) : # <<<<<<<<<<<<<< * * if isinstance(col, basestring) : */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_9get_column_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_get_column_links, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_9get_column_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_get_column_links, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_get_column_links, __pyx_t_5) < 0) __PYX_ERR(0, 1252, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_get_column_links, __pyx_t_5) < 0) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1334 + /* "MuchTree.pyx":1356 * self.subset_n_links = k * * def subset_b( self, node_id ) : # <<<<<<<<<<<<<< * 'subset the link matrix to leafs desended from node_id in TreeB' * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_11subset_b, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_subset_b, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_11subset_b, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_subset_b, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_subset_b, __pyx_t_5) < 0) __PYX_ERR(0, 1334, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_subset_b, __pyx_t_5) < 0) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1346 + /* "MuchTree.pyx":1368 * self._build_linklist() * * def subset_a( self, node_id ) : # <<<<<<<<<<<<<< * 'subset the link matrix to leafs desended from node_id in TreeA' * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_13subset_a, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_subset_a, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_13subset_a, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_subset_a, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_subset_a, __pyx_t_5) < 0) __PYX_ERR(0, 1346, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_subset_a, __pyx_t_5) < 0) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1358 + /* "MuchTree.pyx":1380 * self._build_linklist() * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * def linked_distances( self ) : * ''' */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_15linked_distances, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_linked_distances, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_15linked_distances, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_linked_distances, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_linked_distances, __pyx_t_5) < 0) __PYX_ERR(0, 1358, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_linked_distances, __pyx_t_5) < 0) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1409 + /* "MuchTree.pyx":1431 * return ( self.seed * self.modulus ) % n * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * def sample_linked_distances( self, float sigma=0.001, * unsigned int buckets=64, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_17sample_linked_distances, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_sample_linked_di, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_17sample_linked_distances, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_sample_linked_di, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__104); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_sample_linked_distances, __pyx_t_5) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_sample_linked_distances, __pyx_t_5) < 0) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1539 + /* "MuchTree.pyx":1561 * 'deviation_b' : deviation_b } * * def adjacency( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * Build the graph adjacency matrix of the current subsetted */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_19adjacency, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_adjacency, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_19adjacency, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_adjacency, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_adjacency, __pyx_t_5) < 0) __PYX_ERR(0, 1539, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_adjacency, __pyx_t_5) < 0) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1591 + /* "MuchTree.pyx":1613 * return aj * * def laplacian( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * The graph Laplacian matrix of the current subsetted trees. */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_21laplacian, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_laplacian, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_21laplacian, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_laplacian, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_laplacian, __pyx_t_5) < 0) __PYX_ERR(0, 1591, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_laplacian, __pyx_t_5) < 0) __PYX_ERR(0, 1613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1605 + /* "MuchTree.pyx":1627 * return lp * * def spectrum( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * The eigenvalues of the graph Laplacian matrix of the current */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_23spectrum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_spectrum, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1605, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_23spectrum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_spectrum, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_spectrum, __pyx_t_5) < 0) __PYX_ERR(0, 1605, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_spectrum, __pyx_t_5) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1633 + /* "MuchTree.pyx":1655 * return info * * def to_igraph( self, deletions=0, additions=0, swaps=0 ) : # <<<<<<<<<<<<<< * ''' * Return the current SuchLinkedTrees subgraph as a weighted, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_25to_igraph, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_to_igraph, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1633, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_25to_igraph, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_to_igraph, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_to_igraph, __pyx_t_5) < 0) __PYX_ERR(0, 1633, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_to_igraph, __pyx_t_5) < 0) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); - /* "MuchTree.pyx":1658 + /* "MuchTree.pyx":1680 * * * def dump_table( self ) : # <<<<<<<<<<<<<< * 'Print the link matrix (WARNING : may be huge and useless)' * for i in xrange( self.n_cols ) : */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_27dump_table, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_dump_table, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8MuchTree_15SuchLinkedTrees_27dump_table, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SuchLinkedTrees_dump_table, NULL, __pyx_n_s_MuchTree, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_dump_table, __pyx_t_5) < 0) __PYX_ERR(0, 1658, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_8MuchTree_SuchLinkedTrees, __pyx_n_s_dump_table, __pyx_t_5) < 0) __PYX_ERR(0, 1680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_8MuchTree_SuchLinkedTrees); @@ -63920,12 +63609,6 @@ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObje return result; } -/* BufferIndexError */ -static void __Pyx_RaiseBufferIndexError(int axis) { - PyErr_Format(PyExc_IndexError, - "Out of bounds on buffer access (axis %d)", axis); -} - /* PySetContains */ static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { int result = -1; @@ -65308,6 +64991,12 @@ static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, doub } #endif +/* BufferIndexError */ +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { diff --git a/SuchTree/MuchTree.pyx b/SuchTree/MuchTree.pyx index cb7e1fe..6352a72 100644 --- a/SuchTree/MuchTree.pyx +++ b/SuchTree/MuchTree.pyx @@ -601,7 +601,7 @@ cdef class SuchTree : names = [] ids = [] for n,i in enumerate( ( a, b, c, d ) ) : - if isinstance( i, int ) : + if isinstance( i, ( int, np.integer ) ) : ids.append( i ) try : names.append( self.leafnodes[ i ] ) @@ -654,9 +654,9 @@ cdef class SuchTree : visited = np.zeros( self.depth, dtype=int ) - M = np.zeros( 6, dtype=int ) - C = np.zeros( 6, dtype=int ) - + M = np.zeros( 6, dtype=int ) + C = np.zeros( 6, dtype=int ) + # possible topologies I = np.array( [ [ 0, 1, 2, 3 ], [ 0, 2, 1, 3 ], [ 0, 3, 1, 2 ], [ 1, 2, 0, 3 ], [ 1, 3, 0, 2 ], [ 2, 3, 0, 1 ] ] ) @@ -667,12 +667,12 @@ cdef class SuchTree : return topologies @cython.boundscheck(False) - cdef _quartet_topologies( self, long[:,:] quartets, - long[:,:] topologies, - long[:] visited, - long[:] M, - long[:] C, - long[:,:] I ) noexcept nogil : + cdef void _quartet_topologies( self, long[:,:] quartets, + long[:,:] topologies, + long[:] visited, + long[:] M, + long[:] C, + long[:,:] I ) noexcept nogil : cdef int i cdef int j cdef int k @@ -682,13 +682,22 @@ cdef class SuchTree : cdef int c cdef int d + cdef int x + cdef int y + for i in range( len( quartets ) ) : - a,b,c,d = quartets[i,] + a = quartets[i,0] + b = quartets[i,1] + c = quartets[i,2] + d = quartets[i,3] # find MRCAs - for j,(x,y) in enumerate( ( ( a, b ), ( a, c ), ( a, d ), - ( b, c ), ( b, d ), ( c, d ) ) ) : - M[j] = self._mrca( visited, x, y ) + M[0] = self._mrca( visited, a, b ) + M[1] = self._mrca( visited, a, c ) + M[2] = self._mrca( visited, a, d ) + M[3] = self._mrca( visited, b, c ) + M[4] = self._mrca( visited, b, d ) + M[5] = self._mrca( visited, c, d ) # find unique MCRA(s) for j in range( 6 ) : diff --git a/SuchTree/tests/test_SuchTree.py b/SuchTree/tests/test_SuchTree.py index 3ccae9f..b72d75b 100644 --- a/SuchTree/tests/test_SuchTree.py +++ b/SuchTree/tests/test_SuchTree.py @@ -194,6 +194,15 @@ def test_get_quartet_topology() : assert r == frozenset( ( frozenset( ( 'A', 'B' ) ), frozenset( ( 'C', 'D' ) ) ) ) +def test_quartet_topologies() : + T = SuchTree( test_tree ) + Q = numpy.array( list( combinations( T.leafs.values(), 4 ) ) ) + q = T.quartet_topologies( Q ) + for a,b,c,d in q : + t = T.get_quartet_topology( d, c, b, a ) + assert t == frozenset( ( frozenset( ( a, b ) ), + frozenset( ( c, d ) ) ) ) + def test_in_order() : T = SuchTree( test_tree ) traversal = set( node for node,d in T.in_order() )