diff --git a/CHANGELOG b/CHANGELOG index b7e2469..cb0ea32 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +# 0.0.47 (30.10.19) +- fix rare segfault in set_difference_helper + # 0.0.45 (07.10.19) - try to fix another windows error diff --git a/ncls/src/ncls.pyx b/ncls/src/ncls.pyx index b7927e3..f200848 100644 --- a/ncls/src/ncls.pyx +++ b/ncls/src/ncls.pyx @@ -432,7 +432,7 @@ cdef class NCLS64: if nfound + nhit >= length: - length = length * 2 + length = (length + nhit) * 2 output_arr = np.resize(output_arr, length) output_arr_start = np.resize(output_arr_start, length) output = output_arr @@ -602,7 +602,7 @@ cdef class NCLS64: if nfound >= length: - length = length * 2 + length = nfound * 2 output_arr = np.resize(output_arr, length) output_arr_other = np.resize(output_arr_other, length) output = output_arr diff --git a/ncls/src/ncls32.c b/ncls/src/ncls32.c index 6c51f5b..d973f6c 100644 --- a/ncls/src/ncls32.c +++ b/ncls/src/ncls32.c @@ -970,7 +970,7 @@ struct __pyx_obj_4ncls_3src_6ncls32_NCLS32 { }; -/* "ncls/src/ncls32.pyx":661 +/* "ncls/src/ncls32.pyx":672 * * * cdef class NCLSIterator: # <<<<<<<<<<<<<< @@ -1120,7 +1120,7 @@ struct __pyx_vtabstruct_4ncls_3src_6ncls32_NCLS32 { static struct __pyx_vtabstruct_4ncls_3src_6ncls32_NCLS32 *__pyx_vtabptr_4ncls_3src_6ncls32_NCLS32; -/* "ncls/src/ncls32.pyx":661 +/* "ncls/src/ncls32.pyx":672 * * * cdef class NCLSIterator: # <<<<<<<<<<<<<< @@ -1869,6 +1869,13 @@ static CYTHON_INLINE PyObject *__pyx_memview_get_nn_int64_t__const__(const char /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); +/* Print.proto */ +static int __Pyx_Print(PyObject*, PyObject *, int); +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* __pyx_print = 0; +static PyObject* __pyx_print_kwargs = 0; +#endif + /* MemviewSliceCopyTemplate.proto */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -1885,6 +1892,9 @@ static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); +/* PrintOne.proto */ +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); @@ -1975,6 +1985,9 @@ static PyTypeObject *__pyx_GeneratorType = 0; static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t(PyObject *, int writable_flag); + /* ObjectToMemviewSlice.proto */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t(PyObject *, int writable_flag); @@ -2071,6 +2084,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, static __Pyx_TypeInfo __Pyx_TypeInfo_nn_int32_t__const__ = { "const int32_t", NULL, sizeof(int32_t const ), { 0 }, 0, IS_UNSIGNED(int32_t const ) ? 'U' : 'I', IS_UNSIGNED(int32_t const ), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn_int64_t__const__ = { "const int64_t", NULL, sizeof(int64_t const ), { 0 }, 0, IS_UNSIGNED(int64_t const ) ? 'U' : 'I', IS_UNSIGNED(int64_t const ), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_long = { "long", NULL, sizeof(long), { 0 }, 0, IS_UNSIGNED(long) ? 'U' : 'I', IS_UNSIGNED(long), 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_nn_int64_t = { "int64_t", NULL, sizeof(int64_t), { 0 }, 0, IS_UNSIGNED(int64_t) ? 'U' : 'I', IS_UNSIGNED(int64_t), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn_int32_t = { "int32_t", NULL, sizeof(int32_t), { 0 }, 0, IS_UNSIGNED(int32_t) ? 'U' : 'I', IS_UNSIGNED(int32_t), 0 }; #define __Pyx_MODULE_NAME "ncls.src.ncls32" extern int __pyx_module_is_main_ncls__src__ncls32; @@ -2087,9 +2101,16 @@ static PyObject *__pyx_builtin_Ellipsis; static PyObject *__pyx_builtin_id; static PyObject *__pyx_builtin_IndexError; static const char __pyx_k_O[] = "O"; +#if PY_MAJOR_VERSION < 3 +static const char __pyx_k_b[] = "b'--------------------'"; +#endif static const char __pyx_k_c[] = "c"; +static const char __pyx_k_i[] = " i"; static const char __pyx_k_k[] = "k"; static const char __pyx_k__4[] = "\n"; +#if PY_MAJOR_VERSION >= 3 +static const char __pyx_k__5[] = "--------------------"; +#endif static const char __pyx_k_db[] = "db"; static const char __pyx_k_id[] = "id"; static const char __pyx_k_im[] = "im"; @@ -2103,12 +2124,14 @@ static const char __pyx_k_args[] = "args"; static const char __pyx_k_base[] = "base"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_ends[] = "ends"; +static const char __pyx_k_file[] = "file"; static const char __pyx_k_join[] = "join"; static const char __pyx_k_long[] = "long"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_ndim[] = "ndim"; +static const char __pyx_k_nend[] = "nend"; static const char __pyx_k_pack[] = "pack"; static const char __pyx_k_send[] = "send"; static const char __pyx_k_size[] = "size"; @@ -2117,6 +2140,7 @@ static const char __pyx_k_stop[] = "stop"; static const char __pyx_k_take[] = "take"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_ASCII[] = "ASCII"; +static const char __pyx_k_B_end[] = " B end:"; static const char __pyx_k_class[] = "__class__"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_dtype[] = "dtype"; @@ -2126,6 +2150,7 @@ static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_int32[] = "int32"; static const char __pyx_k_int64[] = "int64"; static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_print[] = "print"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_shape[] = "shape"; static const char __pyx_k_start[] = "start"; @@ -2137,6 +2162,8 @@ static const char __pyx_k_format[] = "format"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_lambda[] = ""; static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_nfound[] = " nfound:"; +static const char __pyx_k_nstart[] = "nstart"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_resize[] = "resize"; @@ -2144,6 +2171,7 @@ static const char __pyx_k_starts[] = "starts"; static const char __pyx_k_struct[] = "struct"; static const char __pyx_k_unpack[] = "unpack"; static const char __pyx_k_update[] = "update"; +static const char __pyx_k_B_start[] = " B start:"; static const char __pyx_k_fortran[] = "fortran"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_indexes[] = "indexes"; @@ -2158,6 +2186,8 @@ static const char __pyx_k_pyx_type[] = "__pyx_type"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_enumerate[] = "enumerate"; +static const char __pyx_k_length_is[] = " length is"; +static const char __pyx_k_nfound_is[] = " nfound is"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_IndexError[] = "IndexError"; @@ -2169,11 +2199,13 @@ static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_has_overlap[] = "has_overlap"; static const char __pyx_k_NCLSIterator[] = "NCLSIterator"; static const char __pyx_k_has_overlaps[] = "has_overlaps"; +static const char __pyx_k_loop_counter[] = "loop counter"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_StopIteration[] = "StopIteration"; static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_output_arr_end[] = " output_arr_end"; static const char __pyx_k_View_MemoryView[] = "View.MemoryView"; static const char __pyx_k_allocate_buffer[] = "allocate_buffer"; static const char __pyx_k_dtype_is_object[] = "dtype_is_object"; @@ -2182,6 +2214,7 @@ static const char __pyx_k_ncls_src_ncls32[] = "ncls.src.ncls32"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_Number_intervals[] = "Number intervals:"; +static const char __pyx_k_output_arr_start[] = " output_arr_start"; static const char __pyx_k_all_overlaps_both[] = "all_overlaps_both"; static const char __pyx_k_all_overlaps_self[] = "all_overlaps_self"; static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum"; @@ -2219,6 +2252,8 @@ static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __red static const char __pyx_k_unable_to_allocate_IntervalMap_d[] = "unable to allocate IntervalMap[%d]"; static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides."; static PyObject *__pyx_n_s_ASCII; +static PyObject *__pyx_kp_s_B_end; +static PyObject *__pyx_kp_s_B_start; static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri; static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor; @@ -2255,6 +2290,7 @@ static PyObject *__pyx_n_s_all_overlaps_both; static PyObject *__pyx_n_s_all_overlaps_self; static PyObject *__pyx_n_s_allocate_buffer; static PyObject *__pyx_n_s_args; +static PyObject *__pyx_kp_s_b; static PyObject *__pyx_n_s_base; static PyObject *__pyx_n_s_c; static PyObject *__pyx_n_u_c; @@ -2274,6 +2310,7 @@ static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_ends; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_error; +static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_first_overlap_both; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_format; @@ -2284,6 +2321,7 @@ static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi; static PyObject *__pyx_n_s_has_overlap; static PyObject *__pyx_n_s_has_overlaps; +static PyObject *__pyx_kp_s_i; static PyObject *__pyx_n_s_id; static PyObject *__pyx_n_s_ids; static PyObject *__pyx_n_s_im; @@ -2297,7 +2335,9 @@ static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_k_overlaps_both; static PyObject *__pyx_n_s_lambda; +static PyObject *__pyx_kp_s_length_is; static PyObject *__pyx_n_s_long; +static PyObject *__pyx_kp_s_loop_counter; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_memview; static PyObject *__pyx_n_s_mode; @@ -2305,13 +2345,20 @@ static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_ncls_src_ncls32; static PyObject *__pyx_n_s_ndim; +static PyObject *__pyx_n_s_nend; static PyObject *__pyx_n_s_new; +static PyObject *__pyx_kp_s_nfound; +static PyObject *__pyx_kp_s_nfound_is; static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_nstart; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_obj; +static PyObject *__pyx_kp_s_output_arr_end; +static PyObject *__pyx_kp_s_output_arr_start; static PyObject *__pyx_n_s_pack; static PyObject *__pyx_n_s_pickle; +static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_profile; static PyObject *__pyx_n_s_pyx_PickleError; static PyObject *__pyx_n_s_pyx_checksum; @@ -2436,12 +2483,11 @@ static PyObject *__pyx_int_neg_1; static __Pyx_memviewslice __pyx_k_; static __Pyx_memviewslice __pyx_k__2; static __Pyx_memviewslice __pyx_k__3; -static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; -static PyObject *__pyx_slice__23; +static PyObject *__pyx_slice__24; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; @@ -2455,7 +2501,7 @@ static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; -static PyObject *__pyx_tuple__24; +static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; @@ -2464,7 +2510,8 @@ static PyObject *__pyx_tuple__29; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; -static PyObject *__pyx_codeobj__33; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_codeobj__34; /* Late includes */ /* "ncls/src/ncls32.pyx":23 @@ -7125,7 +7172,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_22has_overlap(struct __pyx_ * @cython.initializedcheck(False) * cpdef set_difference_helper(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< * - * cdef int i + * cdef int i = 0 */ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_25set_difference_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ @@ -7133,8 +7180,8 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct int __pyx_v_i; int __pyx_v_nhit; int __pyx_v_nfound; - int __pyx_v_nstart; - CYTHON_UNUSED int __pyx_v_nend; + int32_t __pyx_v_nstart; + int32_t __pyx_v_nend; int __pyx_v_length; int __pyx_v_loop_counter; CYTHON_UNUSED int __pyx_v_overlap_type_nb; @@ -7167,10 +7214,10 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct int __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; - Py_ssize_t __pyx_t_18; - Py_ssize_t __pyx_t_19; - int __pyx_t_20; - int __pyx_t_21; + int __pyx_t_18; + int __pyx_t_19; + Py_ssize_t __pyx_t_20; + Py_ssize_t __pyx_t_21; Py_ssize_t __pyx_t_22; Py_ssize_t __pyx_t_23; Py_ssize_t __pyx_t_24; @@ -7178,9 +7225,9 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct Py_ssize_t __pyx_t_26; Py_ssize_t __pyx_t_27; Py_ssize_t __pyx_t_28; - Py_ssize_t __pyx_t_29; + int32_t __pyx_t_29; Py_ssize_t __pyx_t_30; - int32_t __pyx_t_31; + Py_ssize_t __pyx_t_31; Py_ssize_t __pyx_t_32; Py_ssize_t __pyx_t_33; Py_ssize_t __pyx_t_34; @@ -7195,8 +7242,6 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct Py_ssize_t __pyx_t_43; Py_ssize_t __pyx_t_44; Py_ssize_t __pyx_t_45; - Py_ssize_t __pyx_t_46; - Py_ssize_t __pyx_t_47; __Pyx_RefNannySetupContext("set_difference_helper", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -7290,45 +7335,54 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct #endif } + /* "ncls/src/ncls32.pyx":387 + * cpdef set_difference_helper(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): + * + * cdef int i = 0 # <<<<<<<<<<<<<< + * cdef int nhit = 0 + * cdef int nfound = 0 + */ + __pyx_v_i = 0; + /* "ncls/src/ncls32.pyx":388 * - * cdef int i + * cdef int i = 0 * cdef int nhit = 0 # <<<<<<<<<<<<<< * cdef int nfound = 0 - * cdef int nstart = 0 + * cdef int32_t nstart = 0 */ __pyx_v_nhit = 0; /* "ncls/src/ncls32.pyx":389 - * cdef int i + * cdef int i = 0 * cdef int nhit = 0 * cdef int nfound = 0 # <<<<<<<<<<<<<< - * cdef int nstart = 0 - * cdef int nend = 0 + * cdef int32_t nstart = 0 + * cdef int32_t nend = 0 */ __pyx_v_nfound = 0; /* "ncls/src/ncls32.pyx":390 * cdef int nhit = 0 * cdef int nfound = 0 - * cdef int nstart = 0 # <<<<<<<<<<<<<< - * cdef int nend = 0 + * cdef int32_t nstart = 0 # <<<<<<<<<<<<<< + * cdef int32_t nend = 0 * cdef int length = len(starts) */ __pyx_v_nstart = 0; /* "ncls/src/ncls32.pyx":391 * cdef int nfound = 0 - * cdef int nstart = 0 - * cdef int nend = 0 # <<<<<<<<<<<<<< + * cdef int32_t nstart = 0 + * cdef int32_t nend = 0 # <<<<<<<<<<<<<< * cdef int length = len(starts) * cdef int loop_counter = 0 */ __pyx_v_nend = 0; /* "ncls/src/ncls32.pyx":392 - * cdef int nstart = 0 - * cdef int nend = 0 + * cdef int32_t nstart = 0 + * cdef int32_t nend = 0 * cdef int length = len(starts) # <<<<<<<<<<<<<< * cdef int loop_counter = 0 * cdef int overlap_type_nb = 0 @@ -7337,7 +7391,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __pyx_v_length = __pyx_t_10; /* "ncls/src/ncls32.pyx":393 - * cdef int nend = 0 + * cdef int32_t nend = 0 * cdef int length = len(starts) * cdef int loop_counter = 0 # <<<<<<<<<<<<<< * cdef int overlap_type_nb = 0 @@ -7404,7 +7458,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct * output_arr = np.zeros(length, dtype=np.int64) * output_arr_start = np.zeros(length, dtype=np.int32) # <<<<<<<<<<<<<< * output_arr_end = np.zeros(length, dtype=np.int32) - * cdef long [::1] output + * cdef int64_t [::1] output */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -7439,7 +7493,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct * output_arr = np.zeros(length, dtype=np.int64) * output_arr_start = np.zeros(length, dtype=np.int32) * output_arr_end = np.zeros(length, dtype=np.int32) # <<<<<<<<<<<<<< - * cdef long [::1] output + * cdef int64_t [::1] output * cdef int32_t [::1] output_start */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 400, __pyx_L1_error) @@ -7478,7 +7532,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct * output_start = output_arr_start * output_end = output_arr_end */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 405, __pyx_L1_error) __pyx_v_output = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; @@ -7522,7 +7576,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct * if not self.im: # if empty * return [], [], [] # <<<<<<<<<<<<<< * - * + * it_alloc = cn.interval_iterator_alloc() */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error) @@ -7555,8 +7609,8 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ } - /* "ncls/src/ncls32.pyx":416 - * + /* "ncls/src/ncls32.pyx":415 + * return [], [], [] * * it_alloc = cn.interval_iterator_alloc() # <<<<<<<<<<<<<< * it = it_alloc @@ -7564,7 +7618,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_it_alloc = interval_iterator_alloc(); - /* "ncls/src/ncls32.pyx":417 + /* "ncls/src/ncls32.pyx":416 * * it_alloc = cn.interval_iterator_alloc() * it = it_alloc # <<<<<<<<<<<<<< @@ -7573,7 +7627,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_it = __pyx_v_it_alloc; - /* "ncls/src/ncls32.pyx":418 + /* "ncls/src/ncls32.pyx":417 * it_alloc = cn.interval_iterator_alloc() * it = it_alloc * for loop_counter in range(length): # <<<<<<<<<<<<<< @@ -7585,100 +7639,159 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_loop_counter = __pyx_t_15; - /* "ncls/src/ncls32.pyx":420 + /* "ncls/src/ncls32.pyx":419 * for loop_counter in range(length): * * while it: # <<<<<<<<<<<<<< * i = 0 - * cn.find_intervals(it, starts[loop_counter], ends[loop_counter], self.im, self.ntop, + * */ while (1) { __pyx_t_13 = (__pyx_v_it != 0); if (!__pyx_t_13) break; - /* "ncls/src/ncls32.pyx":421 + /* "ncls/src/ncls32.pyx":420 * * while it: * i = 0 # <<<<<<<<<<<<<< - * cn.find_intervals(it, starts[loop_counter], ends[loop_counter], self.im, self.ntop, - * self.subheader, self.nlists, im_buf, 1024, + * + * nstart = starts[loop_counter] */ __pyx_v_i = 0; /* "ncls/src/ncls32.pyx":422 - * while it: * i = 0 - * cn.find_intervals(it, starts[loop_counter], ends[loop_counter], self.im, self.ntop, # <<<<<<<<<<<<<< - * self.subheader, self.nlists, im_buf, 1024, - * &(nhit), &(it)) # GET NEXT BUFFER CHUNK + * + * nstart = starts[loop_counter] # <<<<<<<<<<<<<< + * nend = ends[loop_counter] + * */ __pyx_t_16 = __pyx_v_loop_counter; + __pyx_v_nstart = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_16)) ))); + + /* "ncls/src/ncls32.pyx":423 + * + * nstart = starts[loop_counter] + * nend = ends[loop_counter] # <<<<<<<<<<<<<< + * + * print("----" * 5) + */ __pyx_t_17 = __pyx_v_loop_counter; + __pyx_v_nend = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_17)) ))); - /* "ncls/src/ncls32.pyx":424 - * cn.find_intervals(it, starts[loop_counter], ends[loop_counter], self.im, self.ntop, - * self.subheader, self.nlists, im_buf, 1024, - * &(nhit), &(it)) # GET NEXT BUFFER CHUNK # <<<<<<<<<<<<<< + /* "ncls/src/ncls32.pyx":425 + * nend = ends[loop_counter] * - * #print("nhits:", nhit) + * print("----" * 5) # <<<<<<<<<<<<<< + * print("loop counter", loop_counter) + * print("nstart", nstart) */ - (void)(find_intervals(__pyx_v_it, (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_16)) ))), (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_17)) ))), __pyx_v_self->im, __pyx_v_self->ntop, __pyx_v_self->subheader, __pyx_v_self->nlists, __pyx_v_im_buf, 0x400, (&__pyx_v_nhit), (&__pyx_v_it))); + if (__Pyx_PrintOne(0, __pyx_kp_s_b) < 0) __PYX_ERR(0, 425, __pyx_L1_error) - /* "ncls/src/ncls32.pyx":428 - * #print("nhits:", nhit) + /* "ncls/src/ncls32.pyx":426 * - * nstart = starts[loop_counter] # <<<<<<<<<<<<<< - * nend = ends[loop_counter] + * print("----" * 5) + * print("loop counter", loop_counter) # <<<<<<<<<<<<<< + * print("nstart", nstart) + * print("nend", nend) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_loop_counter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_loop_counter); + __Pyx_GIVEREF(__pyx_kp_s_loop_counter); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_loop_counter); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __pyx_t_5 = 0; + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":427 + * print("----" * 5) + * print("loop counter", loop_counter) + * print("nstart", nstart) # <<<<<<<<<<<<<< + * print("nend", nend) * */ - __pyx_t_18 = __pyx_v_loop_counter; - __pyx_v_nstart = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_18)) ))); + __pyx_t_6 = __Pyx_PyInt_From_int32_t(__pyx_v_nstart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_n_s_nstart); + __Pyx_GIVEREF(__pyx_n_s_nstart); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_nstart); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); + __pyx_t_6 = 0; + if (__Pyx_PrintOne(0, __pyx_t_5) < 0) __PYX_ERR(0, 427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "ncls/src/ncls32.pyx":429 + /* "ncls/src/ncls32.pyx":428 + * print("loop counter", loop_counter) + * print("nstart", nstart) + * print("nend", nend) # <<<<<<<<<<<<<< * - * nstart = starts[loop_counter] - * nend = ends[loop_counter] # <<<<<<<<<<<<<< + * cn.find_intervals(it, nstart, nend, self.im, self.ntop, + */ + __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_nend); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_n_s_nend); + __Pyx_GIVEREF(__pyx_n_s_nend); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_nend); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); + __pyx_t_5 = 0; + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":430 + * print("nend", nend) * - * # print("nstart", nstart) + * cn.find_intervals(it, nstart, nend, self.im, self.ntop, # <<<<<<<<<<<<<< + * self.subheader, self.nlists, im_buf, 1024, + * &(nhit), &(it)) # GET NEXT BUFFER CHUNK */ - __pyx_t_19 = __pyx_v_loop_counter; - __pyx_v_nend = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_19)) ))); + (void)(find_intervals(__pyx_v_it, __pyx_v_nstart, __pyx_v_nend, __pyx_v_self->im, __pyx_v_self->ntop, __pyx_v_self->subheader, __pyx_v_self->nlists, __pyx_v_im_buf, 0x400, (&__pyx_v_nhit), (&__pyx_v_it))); - /* "ncls/src/ncls32.pyx":434 - * # print("nend", nend) + /* "ncls/src/ncls32.pyx":438 + * * * if nfound + nhit >= length: # <<<<<<<<<<<<<< * - * length = length * 2 + * length = (nfound + nhit) * 2 */ __pyx_t_13 = (((__pyx_v_nfound + __pyx_v_nhit) >= __pyx_v_length) != 0); if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":436 + /* "ncls/src/ncls32.pyx":440 * if nfound + nhit >= length: * - * length = length * 2 # <<<<<<<<<<<<<< + * length = (nfound + nhit) * 2 # <<<<<<<<<<<<<< * output_arr = np.resize(output_arr, length) * output_arr_start = np.resize(output_arr_start, length) */ - __pyx_v_length = (__pyx_v_length * 2); + __pyx_v_length = ((__pyx_v_nfound + __pyx_v_nhit) * 2); - /* "ncls/src/ncls32.pyx":437 + /* "ncls/src/ncls32.pyx":441 * - * length = length * 2 + * length = (nfound + nhit) * 2 * output_arr = np.resize(output_arr, length) # <<<<<<<<<<<<<< * output_arr_start = np.resize(output_arr_start, length) * output = output_arr */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_resize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_resize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; - __pyx_t_20 = 0; + __pyx_t_18 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_2)) { @@ -7686,153 +7799,153 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); - __pyx_t_20 = 1; + __pyx_t_18 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { - PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_output_arr, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_output_arr, __pyx_t_5}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { - PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_output_arr, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_output_arr, __pyx_t_5}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_output_arr); __Pyx_GIVEREF(__pyx_v_output_arr); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_20, __pyx_v_output_arr); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_20, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_18, __pyx_v_output_arr); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_18, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF_SET(__pyx_v_output_arr, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_output_arr, __pyx_t_6); + __pyx_t_6 = 0; - /* "ncls/src/ncls32.pyx":438 - * length = length * 2 + /* "ncls/src/ncls32.pyx":442 + * length = (nfound + nhit) * 2 * output_arr = np.resize(output_arr, length) * output_arr_start = np.resize(output_arr_start, length) # <<<<<<<<<<<<<< * output = output_arr * output_start = output_arr_start */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 438, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_resize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_resize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = NULL; - __pyx_t_20 = 0; + __pyx_t_5 = NULL; + __pyx_t_18 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_20 = 1; + __pyx_t_18 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_output_arr_start, __pyx_t_9}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_5); + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_output_arr_start, __pyx_t_9}; + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { - PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_output_arr_start, __pyx_t_9}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_5); + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_output_arr_start, __pyx_t_9}; + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__pyx_t_6) { - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL; + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_output_arr_start); __Pyx_GIVEREF(__pyx_v_output_arr_start); - PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_20, __pyx_v_output_arr_start); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_18, __pyx_v_output_arr_start); __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_20, __pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_18, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 438, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_output_arr_start, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_output_arr_start, __pyx_t_6); + __pyx_t_6 = 0; - /* "ncls/src/ncls32.pyx":439 + /* "ncls/src/ncls32.pyx":443 * output_arr = np.resize(output_arr, length) * output_arr_start = np.resize(output_arr_start, length) * output = output_arr # <<<<<<<<<<<<<< * output_start = output_arr_start * output_arr_end = np.resize(output_arr_end, length) */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 443, __pyx_L1_error) __PYX_XDEC_MEMVIEW(&__pyx_v_output, 1); __pyx_v_output = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":440 + /* "ncls/src/ncls32.pyx":444 * output_arr_start = np.resize(output_arr_start, length) * output = output_arr * output_start = output_arr_start # <<<<<<<<<<<<<< * output_arr_end = np.resize(output_arr_end, length) * output_end = output_arr_end */ - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t(__pyx_v_output_arr_start, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t(__pyx_v_output_arr_start, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 444, __pyx_L1_error) __PYX_XDEC_MEMVIEW(&__pyx_v_output_start, 1); __pyx_v_output_start = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "ncls/src/ncls32.pyx":441 + /* "ncls/src/ncls32.pyx":445 * output = output_arr * output_start = output_arr_start * output_arr_end = np.resize(output_arr_end, length) # <<<<<<<<<<<<<< * output_end = output_arr_end * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; - __pyx_t_20 = 0; + __pyx_t_18 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { @@ -7840,127 +7953,167 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_20 = 1; + __pyx_t_18 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_output_arr_end, __pyx_t_1}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_output_arr_end, __pyx_t_1}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_9) { - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL; + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_output_arr_end); __Pyx_GIVEREF(__pyx_v_output_arr_end); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_20, __pyx_v_output_arr_end); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_18, __pyx_v_output_arr_end); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_20, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_18, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_output_arr_end, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_output_arr_end, __pyx_t_6); + __pyx_t_6 = 0; - /* "ncls/src/ncls32.pyx":442 + /* "ncls/src/ncls32.pyx":446 * output_start = output_arr_start * output_arr_end = np.resize(output_arr_end, length) * output_end = output_arr_end # <<<<<<<<<<<<<< * - * # B covers whole of A; ignore + * print(" length is", length) */ - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t(__pyx_v_output_arr_end, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t(__pyx_v_output_arr_end, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 446, __pyx_L1_error) __PYX_XDEC_MEMVIEW(&__pyx_v_output_end, 1); __pyx_v_output_end = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "ncls/src/ncls32.pyx":434 - * # print("nend", nend) + /* "ncls/src/ncls32.pyx":438 + * * * if nfound + nhit >= length: # <<<<<<<<<<<<<< * - * length = length * 2 + * length = (nfound + nhit) * 2 */ } - /* "ncls/src/ncls32.pyx":445 + /* "ncls/src/ncls32.pyx":448 + * output_end = output_arr_end + * + * print(" length is", length) # <<<<<<<<<<<<<< + * print(" nfound is", nfound) + * + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_s_length_is); + __Pyx_GIVEREF(__pyx_kp_s_length_is); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_length_is); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); + __pyx_t_6 = 0; + if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "ncls/src/ncls32.pyx":449 + * + * print(" length is", length) + * print(" nfound is", nfound) # <<<<<<<<<<<<<< + * + * # B covers whole of A; ignore + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nfound); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_nfound_is); + __Pyx_GIVEREF(__pyx_kp_s_nfound_is); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_nfound_is); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); + __pyx_t_2 = 0; + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":452 * * # B covers whole of A; ignore * if nhit == 1 and starts[loop_counter] > im_buf[i].start and ends[loop_counter] < im_buf[i].end: # <<<<<<<<<<<<<< * # print("ignore me!") * output_start[nfound] = -1 */ - __pyx_t_21 = ((__pyx_v_nhit == 1) != 0); - if (__pyx_t_21) { + __pyx_t_19 = ((__pyx_v_nhit == 1) != 0); + if (__pyx_t_19) { } else { - __pyx_t_13 = __pyx_t_21; + __pyx_t_13 = __pyx_t_19; goto __pyx_L10_bool_binop_done; } - __pyx_t_22 = __pyx_v_loop_counter; - __pyx_t_21 = (((*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_22)) ))) > (__pyx_v_im_buf[__pyx_v_i]).start) != 0); - if (__pyx_t_21) { + __pyx_t_20 = __pyx_v_loop_counter; + __pyx_t_19 = (((*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_20)) ))) > (__pyx_v_im_buf[__pyx_v_i]).start) != 0); + if (__pyx_t_19) { } else { - __pyx_t_13 = __pyx_t_21; + __pyx_t_13 = __pyx_t_19; goto __pyx_L10_bool_binop_done; } - __pyx_t_23 = __pyx_v_loop_counter; - __pyx_t_21 = (((*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_23)) ))) < (__pyx_v_im_buf[__pyx_v_i]).end) != 0); - __pyx_t_13 = __pyx_t_21; + __pyx_t_21 = __pyx_v_loop_counter; + __pyx_t_19 = (((*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_21)) ))) < (__pyx_v_im_buf[__pyx_v_i]).end) != 0); + __pyx_t_13 = __pyx_t_19; __pyx_L10_bool_binop_done:; if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":447 + /* "ncls/src/ncls32.pyx":454 * if nhit == 1 and starts[loop_counter] > im_buf[i].start and ends[loop_counter] < im_buf[i].end: * # print("ignore me!") * output_start[nfound] = -1 # <<<<<<<<<<<<<< * output_end[nfound] = -1 * output[nfound] = indexes[loop_counter] */ - __pyx_t_24 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_24)) )) = -1; + __pyx_t_22 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_22)) )) = -1; - /* "ncls/src/ncls32.pyx":448 + /* "ncls/src/ncls32.pyx":455 * # print("ignore me!") * output_start[nfound] = -1 * output_end[nfound] = -1 # <<<<<<<<<<<<<< * output[nfound] = indexes[loop_counter] * i = nhit */ - __pyx_t_25 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_25)) )) = -1; + __pyx_t_23 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_23)) )) = -1; - /* "ncls/src/ncls32.pyx":449 + /* "ncls/src/ncls32.pyx":456 * output_start[nfound] = -1 * output_end[nfound] = -1 * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< * i = nhit * nfound += 1 */ - __pyx_t_26 = __pyx_v_loop_counter; - __pyx_t_27 = __pyx_v_nfound; - *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_27)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_26)) ))); + __pyx_t_24 = __pyx_v_loop_counter; + __pyx_t_25 = __pyx_v_nfound; + *((int64_t *) ( /* dim=0 */ ((char *) (((int64_t *) __pyx_v_output.data) + __pyx_t_25)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_24)) ))); - /* "ncls/src/ncls32.pyx":450 + /* "ncls/src/ncls32.pyx":457 * output_end[nfound] = -1 * output[nfound] = indexes[loop_counter] * i = nhit # <<<<<<<<<<<<<< @@ -7969,7 +8122,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_i = __pyx_v_nhit; - /* "ncls/src/ncls32.pyx":451 + /* "ncls/src/ncls32.pyx":458 * output[nfound] = indexes[loop_counter] * i = nhit * nfound += 1 # <<<<<<<<<<<<<< @@ -7978,7 +8131,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":445 + /* "ncls/src/ncls32.pyx":452 * * # B covers whole of A; ignore * if nhit == 1 and starts[loop_counter] > im_buf[i].start and ends[loop_counter] < im_buf[i].end: # <<<<<<<<<<<<<< @@ -7987,18 +8140,134 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ } - /* "ncls/src/ncls32.pyx":453 + /* "ncls/src/ncls32.pyx":460 * nfound += 1 * * while i < nhit: # <<<<<<<<<<<<<< + * print(" i", i) * # print("--- i:", i) - * # print("--- im_buf[i]", im_buf[i]) */ while (1) { __pyx_t_13 = ((__pyx_v_i < __pyx_v_nhit) != 0); if (!__pyx_t_13) break; - /* "ncls/src/ncls32.pyx":460 + /* "ncls/src/ncls32.pyx":461 + * + * while i < nhit: + * print(" i", i) # <<<<<<<<<<<<<< + * # print("--- i:", i) + * # print("--- im_buf[i]", im_buf[i]) + */ + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_s_i); + __Pyx_GIVEREF(__pyx_kp_s_i); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_i); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); + __pyx_t_6 = 0; + if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "ncls/src/ncls32.pyx":464 + * # print("--- i:", i) + * # print("--- im_buf[i]", im_buf[i]) + * print(" B start:", im_buf[i].start) # <<<<<<<<<<<<<< + * print(" B end:", im_buf[i].end) + * print(" nfound:", nfound) + */ + __pyx_t_2 = __Pyx_PyInt_From_int32_t((__pyx_v_im_buf[__pyx_v_i]).start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_B_start); + __Pyx_GIVEREF(__pyx_kp_s_B_start); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_B_start); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); + __pyx_t_2 = 0; + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":465 + * # print("--- im_buf[i]", im_buf[i]) + * print(" B start:", im_buf[i].start) + * print(" B end:", im_buf[i].end) # <<<<<<<<<<<<<< + * print(" nfound:", nfound) + * print(" output_arr_start", output_arr_start) + */ + __pyx_t_6 = __Pyx_PyInt_From_int32_t((__pyx_v_im_buf[__pyx_v_i]).end); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_kp_s_B_end); + __Pyx_GIVEREF(__pyx_kp_s_B_end); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_B_end); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); + __pyx_t_6 = 0; + if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "ncls/src/ncls32.pyx":466 + * print(" B start:", im_buf[i].start) + * print(" B end:", im_buf[i].end) + * print(" nfound:", nfound) # <<<<<<<<<<<<<< + * print(" output_arr_start", output_arr_start) + * print(" output_arr_end", output_arr_end) + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nfound); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_nfound); + __Pyx_GIVEREF(__pyx_kp_s_nfound); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_nfound); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); + __pyx_t_2 = 0; + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":467 + * print(" B end:", im_buf[i].end) + * print(" nfound:", nfound) + * print(" output_arr_start", output_arr_start) # <<<<<<<<<<<<<< + * print(" output_arr_end", output_arr_end) + * + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_output_arr_start); + __Pyx_GIVEREF(__pyx_kp_s_output_arr_start); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_output_arr_start); + __Pyx_INCREF(__pyx_v_output_arr_start); + __Pyx_GIVEREF(__pyx_v_output_arr_start); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_output_arr_start); + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":468 + * print(" nfound:", nfound) + * print(" output_arr_start", output_arr_start) + * print(" output_arr_end", output_arr_end) # <<<<<<<<<<<<<< + * + * # in case the start contributes nothing + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(__pyx_kp_s_output_arr_end); + __Pyx_GIVEREF(__pyx_kp_s_output_arr_end); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_output_arr_end); + __Pyx_INCREF(__pyx_v_output_arr_end); + __Pyx_GIVEREF(__pyx_v_output_arr_end); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_output_arr_end); + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) __PYX_ERR(0, 468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "ncls/src/ncls32.pyx":471 * * # in case the start contributes nothing * if i < nhit - 1: # <<<<<<<<<<<<<< @@ -8008,7 +8277,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __pyx_t_13 = ((__pyx_v_i < (__pyx_v_nhit - 1)) != 0); if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":463 + /* "ncls/src/ncls32.pyx":474 * # print(" i < nhit - 1") * * if nstart < im_buf[i].start: # <<<<<<<<<<<<<< @@ -8018,39 +8287,39 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __pyx_t_13 = ((__pyx_v_nstart < (__pyx_v_im_buf[__pyx_v_i]).start) != 0); if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":466 + /* "ncls/src/ncls32.pyx":477 * #print(" new_start", nstart) * #print(" new_end", im_buf[i].start) * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< * output_start[nfound] = nstart * output_end[nfound] = im_buf[i].start */ - __pyx_t_28 = __pyx_v_loop_counter; - __pyx_t_29 = __pyx_v_nfound; - *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_29)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_28)) ))); + __pyx_t_26 = __pyx_v_loop_counter; + __pyx_t_27 = __pyx_v_nfound; + *((int64_t *) ( /* dim=0 */ ((char *) (((int64_t *) __pyx_v_output.data) + __pyx_t_27)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_26)) ))); - /* "ncls/src/ncls32.pyx":467 + /* "ncls/src/ncls32.pyx":478 * #print(" new_end", im_buf[i].start) * output[nfound] = indexes[loop_counter] * output_start[nfound] = nstart # <<<<<<<<<<<<<< * output_end[nfound] = im_buf[i].start * nfound += 1 */ - __pyx_t_30 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_30)) )) = __pyx_v_nstart; + __pyx_t_28 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_28)) )) = __pyx_v_nstart; - /* "ncls/src/ncls32.pyx":468 + /* "ncls/src/ncls32.pyx":479 * output[nfound] = indexes[loop_counter] * output_start[nfound] = nstart * output_end[nfound] = im_buf[i].start # <<<<<<<<<<<<<< * nfound += 1 * */ - __pyx_t_31 = (__pyx_v_im_buf[__pyx_v_i]).start; - __pyx_t_32 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_32)) )) = __pyx_t_31; + __pyx_t_29 = (__pyx_v_im_buf[__pyx_v_i]).start; + __pyx_t_30 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_30)) )) = __pyx_t_29; - /* "ncls/src/ncls32.pyx":469 + /* "ncls/src/ncls32.pyx":480 * output_start[nfound] = nstart * output_end[nfound] = im_buf[i].start * nfound += 1 # <<<<<<<<<<<<<< @@ -8059,7 +8328,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":463 + /* "ncls/src/ncls32.pyx":474 * # print(" i < nhit - 1") * * if nstart < im_buf[i].start: # <<<<<<<<<<<<<< @@ -8068,17 +8337,17 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ } - /* "ncls/src/ncls32.pyx":471 + /* "ncls/src/ncls32.pyx":482 * nfound += 1 * * nstart = im_buf[i].end # <<<<<<<<<<<<<< * elif i == nhit - 1: * */ - __pyx_t_31 = (__pyx_v_im_buf[__pyx_v_i]).end; - __pyx_v_nstart = __pyx_t_31; + __pyx_t_29 = (__pyx_v_im_buf[__pyx_v_i]).end; + __pyx_v_nstart = __pyx_t_29; - /* "ncls/src/ncls32.pyx":460 + /* "ncls/src/ncls32.pyx":471 * * # in case the start contributes nothing * if i < nhit - 1: # <<<<<<<<<<<<<< @@ -8088,7 +8357,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct goto __pyx_L15; } - /* "ncls/src/ncls32.pyx":472 + /* "ncls/src/ncls32.pyx":483 * * nstart = im_buf[i].end * elif i == nhit - 1: # <<<<<<<<<<<<<< @@ -8098,57 +8367,57 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __pyx_t_13 = ((__pyx_v_i == (__pyx_v_nhit - 1)) != 0); if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":480 + /* "ncls/src/ncls32.pyx":491 * #print("ends[loop_counter]", ends[loop_counter]) * * if im_buf[i].start <= nstart and im_buf[i].end >= ends[loop_counter]: # <<<<<<<<<<<<<< * # print("im_buf[i].start <= nstart and im_buf[i].end >= ends[loop_counter]") * #print("we are here " * 10) */ - __pyx_t_21 = (((__pyx_v_im_buf[__pyx_v_i]).start <= __pyx_v_nstart) != 0); - if (__pyx_t_21) { + __pyx_t_19 = (((__pyx_v_im_buf[__pyx_v_i]).start <= __pyx_v_nstart) != 0); + if (__pyx_t_19) { } else { - __pyx_t_13 = __pyx_t_21; + __pyx_t_13 = __pyx_t_19; goto __pyx_L18_bool_binop_done; } - __pyx_t_33 = __pyx_v_loop_counter; - __pyx_t_21 = (((__pyx_v_im_buf[__pyx_v_i]).end >= (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_33)) )))) != 0); - __pyx_t_13 = __pyx_t_21; + __pyx_t_31 = __pyx_v_loop_counter; + __pyx_t_19 = (((__pyx_v_im_buf[__pyx_v_i]).end >= (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_31)) )))) != 0); + __pyx_t_13 = __pyx_t_19; __pyx_L18_bool_binop_done:; if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":484 + /* "ncls/src/ncls32.pyx":495 * #print("we are here " * 10) * * output_start[nfound] = -1 # <<<<<<<<<<<<<< * output_end[nfound] = -1 * output[nfound] = indexes[loop_counter] */ - __pyx_t_34 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_34)) )) = -1; + __pyx_t_32 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_32)) )) = -1; - /* "ncls/src/ncls32.pyx":485 + /* "ncls/src/ncls32.pyx":496 * * output_start[nfound] = -1 * output_end[nfound] = -1 # <<<<<<<<<<<<<< * output[nfound] = indexes[loop_counter] * nfound += 1 */ - __pyx_t_35 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_35)) )) = -1; + __pyx_t_33 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_33)) )) = -1; - /* "ncls/src/ncls32.pyx":486 + /* "ncls/src/ncls32.pyx":497 * output_start[nfound] = -1 * output_end[nfound] = -1 * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< * nfound += 1 * else: */ - __pyx_t_36 = __pyx_v_loop_counter; - __pyx_t_37 = __pyx_v_nfound; - *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_37)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_36)) ))); + __pyx_t_34 = __pyx_v_loop_counter; + __pyx_t_35 = __pyx_v_nfound; + *((int64_t *) ( /* dim=0 */ ((char *) (((int64_t *) __pyx_v_output.data) + __pyx_t_35)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_34)) ))); - /* "ncls/src/ncls32.pyx":487 + /* "ncls/src/ncls32.pyx":498 * output_end[nfound] = -1 * output[nfound] = indexes[loop_counter] * nfound += 1 # <<<<<<<<<<<<<< @@ -8157,7 +8426,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":480 + /* "ncls/src/ncls32.pyx":491 * #print("ends[loop_counter]", ends[loop_counter]) * * if im_buf[i].start <= nstart and im_buf[i].end >= ends[loop_counter]: # <<<<<<<<<<<<<< @@ -8167,7 +8436,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct goto __pyx_L17; } - /* "ncls/src/ncls32.pyx":489 + /* "ncls/src/ncls32.pyx":500 * nfound += 1 * else: * if im_buf[i].start > nstart: # <<<<<<<<<<<<<< @@ -8178,39 +8447,39 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __pyx_t_13 = (((__pyx_v_im_buf[__pyx_v_i]).start > __pyx_v_nstart) != 0); if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":491 + /* "ncls/src/ncls32.pyx":502 * if im_buf[i].start > nstart: * # print("im_buf[i].start > nstart", im_buf[i].start, nstart) * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< * output_start[nfound] = nstart * output_end[nfound] = im_buf[i].start */ - __pyx_t_38 = __pyx_v_loop_counter; - __pyx_t_39 = __pyx_v_nfound; - *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_39)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_38)) ))); + __pyx_t_36 = __pyx_v_loop_counter; + __pyx_t_37 = __pyx_v_nfound; + *((int64_t *) ( /* dim=0 */ ((char *) (((int64_t *) __pyx_v_output.data) + __pyx_t_37)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_36)) ))); - /* "ncls/src/ncls32.pyx":492 + /* "ncls/src/ncls32.pyx":503 * # print("im_buf[i].start > nstart", im_buf[i].start, nstart) * output[nfound] = indexes[loop_counter] * output_start[nfound] = nstart # <<<<<<<<<<<<<< * output_end[nfound] = im_buf[i].start * nfound += 1 */ - __pyx_t_40 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_40)) )) = __pyx_v_nstart; + __pyx_t_38 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_38)) )) = __pyx_v_nstart; - /* "ncls/src/ncls32.pyx":493 + /* "ncls/src/ncls32.pyx":504 * output[nfound] = indexes[loop_counter] * output_start[nfound] = nstart * output_end[nfound] = im_buf[i].start # <<<<<<<<<<<<<< * nfound += 1 * */ - __pyx_t_31 = (__pyx_v_im_buf[__pyx_v_i]).start; - __pyx_t_41 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_41)) )) = __pyx_t_31; + __pyx_t_29 = (__pyx_v_im_buf[__pyx_v_i]).start; + __pyx_t_39 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_39)) )) = __pyx_t_29; - /* "ncls/src/ncls32.pyx":494 + /* "ncls/src/ncls32.pyx":505 * output_start[nfound] = nstart * output_end[nfound] = im_buf[i].start * nfound += 1 # <<<<<<<<<<<<<< @@ -8219,7 +8488,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":489 + /* "ncls/src/ncls32.pyx":500 * nfound += 1 * else: * if im_buf[i].start > nstart: # <<<<<<<<<<<<<< @@ -8228,51 +8497,51 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ } - /* "ncls/src/ncls32.pyx":496 + /* "ncls/src/ncls32.pyx":507 * nfound += 1 * * if im_buf[i].end < ends[loop_counter]: # <<<<<<<<<<<<<< * # print("im_buf[i].end < ends[loop_counter]", im_buf[i].end, ends[loop_counter]) * # print("i, loop_counter", i, loop_counter) */ - __pyx_t_42 = __pyx_v_loop_counter; - __pyx_t_13 = (((__pyx_v_im_buf[__pyx_v_i]).end < (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_42)) )))) != 0); + __pyx_t_40 = __pyx_v_loop_counter; + __pyx_t_13 = (((__pyx_v_im_buf[__pyx_v_i]).end < (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_40)) )))) != 0); if (__pyx_t_13) { - /* "ncls/src/ncls32.pyx":502 + /* "ncls/src/ncls32.pyx":513 * # print("indexes", indexes[loop_counte rloop_counter]) * * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< * output_start[nfound] = im_buf[i].end * output_end[nfound] = ends[loop_counter] */ - __pyx_t_43 = __pyx_v_loop_counter; - __pyx_t_44 = __pyx_v_nfound; - *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_44)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_43)) ))); + __pyx_t_41 = __pyx_v_loop_counter; + __pyx_t_42 = __pyx_v_nfound; + *((int64_t *) ( /* dim=0 */ ((char *) (((int64_t *) __pyx_v_output.data) + __pyx_t_42)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_41)) ))); - /* "ncls/src/ncls32.pyx":503 + /* "ncls/src/ncls32.pyx":514 * * output[nfound] = indexes[loop_counter] * output_start[nfound] = im_buf[i].end # <<<<<<<<<<<<<< * output_end[nfound] = ends[loop_counter] * nfound += 1 */ - __pyx_t_31 = (__pyx_v_im_buf[__pyx_v_i]).end; - __pyx_t_45 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_45)) )) = __pyx_t_31; + __pyx_t_29 = (__pyx_v_im_buf[__pyx_v_i]).end; + __pyx_t_43 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_start.data) + __pyx_t_43)) )) = __pyx_t_29; - /* "ncls/src/ncls32.pyx":504 + /* "ncls/src/ncls32.pyx":515 * output[nfound] = indexes[loop_counter] * output_start[nfound] = im_buf[i].end * output_end[nfound] = ends[loop_counter] # <<<<<<<<<<<<<< * nfound += 1 * */ - __pyx_t_46 = __pyx_v_loop_counter; - __pyx_t_47 = __pyx_v_nfound; - *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_47)) )) = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_46)) ))); + __pyx_t_44 = __pyx_v_loop_counter; + __pyx_t_45 = __pyx_v_nfound; + *((int32_t *) ( /* dim=0 */ ((char *) (((int32_t *) __pyx_v_output_end.data) + __pyx_t_45)) )) = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_44)) ))); - /* "ncls/src/ncls32.pyx":505 + /* "ncls/src/ncls32.pyx":516 * output_start[nfound] = im_buf[i].end * output_end[nfound] = ends[loop_counter] * nfound += 1 # <<<<<<<<<<<<<< @@ -8281,7 +8550,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":496 + /* "ncls/src/ncls32.pyx":507 * nfound += 1 * * if im_buf[i].end < ends[loop_counter]: # <<<<<<<<<<<<<< @@ -8292,7 +8561,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct } __pyx_L17:; - /* "ncls/src/ncls32.pyx":472 + /* "ncls/src/ncls32.pyx":483 * * nstart = im_buf[i].end * elif i == nhit - 1: # <<<<<<<<<<<<<< @@ -8302,7 +8571,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct } __pyx_L15:; - /* "ncls/src/ncls32.pyx":507 + /* "ncls/src/ncls32.pyx":518 * nfound += 1 * * i += 1 # <<<<<<<<<<<<<< @@ -8313,7 +8582,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct } } - /* "ncls/src/ncls32.pyx":509 + /* "ncls/src/ncls32.pyx":520 * i += 1 * * cn.reset_interval_iterator(it_alloc) # <<<<<<<<<<<<<< @@ -8322,7 +8591,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ (void)(reset_interval_iterator(__pyx_v_it_alloc)); - /* "ncls/src/ncls32.pyx":510 + /* "ncls/src/ncls32.pyx":521 * * cn.reset_interval_iterator(it_alloc) * it = it_alloc # <<<<<<<<<<<<<< @@ -8332,7 +8601,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct __pyx_v_it = __pyx_v_it_alloc; } - /* "ncls/src/ncls32.pyx":512 + /* "ncls/src/ncls32.pyx":523 * it = it_alloc * * cn.free_interval_iterator(it_alloc) # <<<<<<<<<<<<<< @@ -8341,7 +8610,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct */ (void)(free_interval_iterator(__pyx_v_it_alloc)); - /* "ncls/src/ncls32.pyx":514 + /* "ncls/src/ncls32.pyx":525 * cn.free_interval_iterator(it_alloc) * * return output_arr[:nfound], output_arr_start[:nfound], output_arr_end[:nfound] # <<<<<<<<<<<<<< @@ -8349,23 +8618,23 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_start, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_end, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_start, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_end, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6); - __pyx_t_5 = 0; - __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5); __pyx_t_6 = 0; + __pyx_t_2 = 0; + __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; @@ -8375,7 +8644,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_set_difference_helper(struct * @cython.initializedcheck(False) * cpdef set_difference_helper(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< * - * cdef int i + * cdef int i = 0 */ /* function exit code */ @@ -8502,7 +8771,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_24set_difference_helper(str return __pyx_r; } -/* "ncls/src/ncls32.pyx":521 +/* "ncls/src/ncls32.pyx":532 * @cython.wraparound(False) * @cython.initializedcheck(False) * cpdef first_overlap_both(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< @@ -8552,15 +8821,15 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_first_overlap_both); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_first_overlap_both); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4ncls_3src_6ncls32_6NCLS32_27first_overlap_both)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_starts, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_starts, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_ends, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_ends, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; @@ -8578,7 +8847,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8589,7 +8858,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8598,7 +8867,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ } else #endif { - __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -8612,7 +8881,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -8635,7 +8904,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ #endif } - /* "ncls/src/ncls32.pyx":523 + /* "ncls/src/ncls32.pyx":534 * cpdef first_overlap_both(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): * * cdef int ix = 0 # <<<<<<<<<<<<<< @@ -8644,7 +8913,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ */ __pyx_v_ix = 0; - /* "ncls/src/ncls32.pyx":524 + /* "ncls/src/ncls32.pyx":535 * * cdef int ix = 0 * cdef int length = len(starts) # <<<<<<<<<<<<<< @@ -8654,7 +8923,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_10 = __Pyx_MemoryView_Len(__pyx_v_starts); __pyx_v_length = __pyx_t_10; - /* "ncls/src/ncls32.pyx":525 + /* "ncls/src/ncls32.pyx":536 * cdef int ix = 0 * cdef int length = len(starts) * cdef int loop_counter = 0 # <<<<<<<<<<<<<< @@ -8663,7 +8932,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ */ __pyx_v_loop_counter = 0; - /* "ncls/src/ncls32.pyx":526 + /* "ncls/src/ncls32.pyx":537 * cdef int length = len(starts) * cdef int loop_counter = 0 * cdef int nfound = 0 # <<<<<<<<<<<<<< @@ -8672,35 +8941,35 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ */ __pyx_v_nfound = 0; - /* "ncls/src/ncls32.pyx":528 + /* "ncls/src/ncls32.pyx":539 * cdef int nfound = 0 * * output_arr = np.zeros(length, dtype=np.long) # <<<<<<<<<<<<<< * output_arr_other = np.zeros(length, dtype=np.long) * cdef long [::1] output */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __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, 528, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_long); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_long); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 528, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8708,35 +8977,35 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_v_output_arr = __pyx_t_5; __pyx_t_5 = 0; - /* "ncls/src/ncls32.pyx":529 + /* "ncls/src/ncls32.pyx":540 * * output_arr = np.zeros(length, dtype=np.long) * output_arr_other = np.zeros(length, dtype=np.long) # <<<<<<<<<<<<<< * cdef long [::1] output * cdef long [::1] output_other */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_long); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_long); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 529, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -8744,31 +9013,31 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_v_output_arr_other = __pyx_t_9; __pyx_t_9 = 0; - /* "ncls/src/ncls32.pyx":533 + /* "ncls/src/ncls32.pyx":544 * cdef long [::1] output_other * * output = output_arr # <<<<<<<<<<<<<< * output_other = output_arr_other * */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 544, __pyx_L1_error) __pyx_v_output = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":534 + /* "ncls/src/ncls32.pyx":545 * * output = output_arr * output_other = output_arr_other # <<<<<<<<<<<<<< * * cdef cn.IntervalIterator *it */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr_other, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr_other, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 545, __pyx_L1_error) __pyx_v_output_other = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":540 + /* "ncls/src/ncls32.pyx":551 * * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty # <<<<<<<<<<<<<< @@ -8778,7 +9047,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_12 = ((!(__pyx_v_self->im != 0)) != 0); if (__pyx_t_12) { - /* "ncls/src/ncls32.pyx":541 + /* "ncls/src/ncls32.pyx":552 * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty * return [], [] # <<<<<<<<<<<<<< @@ -8786,11 +9055,11 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); @@ -8802,7 +9071,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_6 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":540 + /* "ncls/src/ncls32.pyx":551 * * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty # <<<<<<<<<<<<<< @@ -8811,7 +9080,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ */ } - /* "ncls/src/ncls32.pyx":544 + /* "ncls/src/ncls32.pyx":555 * * * for loop_counter in range(length): # <<<<<<<<<<<<<< @@ -8823,7 +9092,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_loop_counter = __pyx_t_14; - /* "ncls/src/ncls32.pyx":547 + /* "ncls/src/ncls32.pyx":558 * * # remember first pointer for dealloc * ix = cn.find_overlap_start(starts[loop_counter], ends[loop_counter], self.im, self.ntop) # <<<<<<<<<<<<<< @@ -8834,7 +9103,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_16 = __pyx_v_loop_counter; __pyx_v_ix = find_overlap_start((*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_15)) ))), (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_16)) ))), __pyx_v_self->im, __pyx_v_self->ntop); - /* "ncls/src/ncls32.pyx":549 + /* "ncls/src/ncls32.pyx":560 * ix = cn.find_overlap_start(starts[loop_counter], ends[loop_counter], self.im, self.ntop) * * if ix != -1: # <<<<<<<<<<<<<< @@ -8844,7 +9113,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_12 = ((__pyx_v_ix != -1L) != 0); if (__pyx_t_12) { - /* "ncls/src/ncls32.pyx":550 + /* "ncls/src/ncls32.pyx":561 * * if ix != -1: * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< @@ -8855,7 +9124,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_18 = __pyx_v_nfound; *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_18)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_17)) ))); - /* "ncls/src/ncls32.pyx":551 + /* "ncls/src/ncls32.pyx":562 * if ix != -1: * output[nfound] = indexes[loop_counter] * output_other[nfound] = self.im[ix].target_id # <<<<<<<<<<<<<< @@ -8866,7 +9135,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_20 = __pyx_v_nfound; *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output_other.data) + __pyx_t_20)) )) = __pyx_t_19; - /* "ncls/src/ncls32.pyx":553 + /* "ncls/src/ncls32.pyx":564 * output_other[nfound] = self.im[ix].target_id * * nfound += 1 # <<<<<<<<<<<<<< @@ -8875,7 +9144,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":549 + /* "ncls/src/ncls32.pyx":560 * ix = cn.find_overlap_start(starts[loop_counter], ends[loop_counter], self.im, self.ntop) * * if ix != -1: # <<<<<<<<<<<<<< @@ -8885,7 +9154,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ } } - /* "ncls/src/ncls32.pyx":555 + /* "ncls/src/ncls32.pyx":566 * nfound += 1 * * return output_arr[:nfound], output_arr_other[:nfound] # <<<<<<<<<<<<<< @@ -8893,11 +9162,11 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_other, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_other, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); @@ -8909,7 +9178,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(struct __ __pyx_t_9 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":521 + /* "ncls/src/ncls32.pyx":532 * @cython.wraparound(False) * @cython.initializedcheck(False) * cpdef first_overlap_both(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< @@ -8974,17 +9243,17 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_27first_overlap_both(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ends)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("first_overlap_both", 1, 3, 3, 1); __PYX_ERR(0, 521, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("first_overlap_both", 1, 3, 3, 1); __PYX_ERR(0, 532, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("first_overlap_both", 1, 3, 3, 2); __PYX_ERR(0, 521, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("first_overlap_both", 1, 3, 3, 2); __PYX_ERR(0, 532, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "first_overlap_both") < 0)) __PYX_ERR(0, 521, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "first_overlap_both") < 0)) __PYX_ERR(0, 532, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -8993,13 +9262,13 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_27first_overlap_both(PyObje values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } - __pyx_v_starts = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[0], 0); if (unlikely(!__pyx_v_starts.memview)) __PYX_ERR(0, 521, __pyx_L3_error) - __pyx_v_ends = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[1], 0); if (unlikely(!__pyx_v_ends.memview)) __PYX_ERR(0, 521, __pyx_L3_error) - __pyx_v_indexes = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t__const__(values[2], 0); if (unlikely(!__pyx_v_indexes.memview)) __PYX_ERR(0, 521, __pyx_L3_error) + __pyx_v_starts = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[0], 0); if (unlikely(!__pyx_v_starts.memview)) __PYX_ERR(0, 532, __pyx_L3_error) + __pyx_v_ends = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[1], 0); if (unlikely(!__pyx_v_ends.memview)) __PYX_ERR(0, 532, __pyx_L3_error) + __pyx_v_indexes = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t__const__(values[2], 0); if (unlikely(!__pyx_v_indexes.memview)) __PYX_ERR(0, 532, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("first_overlap_both", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 521, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("first_overlap_both", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 532, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ncls.src.ncls32.NCLS32.first_overlap_both", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9018,7 +9287,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_26first_overlap_both(struct PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("first_overlap_both", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(__pyx_v_self, __pyx_v_starts, __pyx_v_ends, __pyx_v_indexes, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ncls_3src_6ncls32_6NCLS32_first_overlap_both(__pyx_v_self, __pyx_v_starts, __pyx_v_ends, __pyx_v_indexes, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9038,7 +9307,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_26first_overlap_both(struct return __pyx_r; } -/* "ncls/src/ncls32.pyx":561 +/* "ncls/src/ncls32.pyx":572 * @cython.wraparound(False) * @cython.initializedcheck(False) * cpdef all_containments_both(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< @@ -9096,15 +9365,15 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_all_containments_both); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_all_containments_both); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4ncls_3src_6ncls32_6NCLS32_29all_containments_both)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_starts, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_starts, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_ends, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_ends, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; @@ -9122,7 +9391,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9133,7 +9402,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9142,7 +9411,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct } else #endif { - __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -9156,7 +9425,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -9179,7 +9448,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #endif } - /* "ncls/src/ncls32.pyx":564 + /* "ncls/src/ncls32.pyx":575 * * cdef int i * cdef int nhit = 0 # <<<<<<<<<<<<<< @@ -9188,7 +9457,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_nhit = 0; - /* "ncls/src/ncls32.pyx":565 + /* "ncls/src/ncls32.pyx":576 * cdef int i * cdef int nhit = 0 * cdef int length = len(starts) # <<<<<<<<<<<<<< @@ -9198,7 +9467,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_10 = __Pyx_MemoryView_Len(__pyx_v_starts); __pyx_v_length = __pyx_t_10; - /* "ncls/src/ncls32.pyx":566 + /* "ncls/src/ncls32.pyx":577 * cdef int nhit = 0 * cdef int length = len(starts) * cdef int loop_counter = 0 # <<<<<<<<<<<<<< @@ -9207,7 +9476,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_loop_counter = 0; - /* "ncls/src/ncls32.pyx":567 + /* "ncls/src/ncls32.pyx":578 * cdef int length = len(starts) * cdef int loop_counter = 0 * cdef int nfound = 0 # <<<<<<<<<<<<<< @@ -9216,35 +9485,35 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_nfound = 0; - /* "ncls/src/ncls32.pyx":570 + /* "ncls/src/ncls32.pyx":581 * cdef int start, end * * output_arr = np.zeros(length, dtype=np.long) # <<<<<<<<<<<<<< * output_arr_other = np.zeros(length, dtype=np.long) * cdef long [::1] output */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __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, 570, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 570, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_long); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_long); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -9252,35 +9521,35 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_v_output_arr = __pyx_t_5; __pyx_t_5 = 0; - /* "ncls/src/ncls32.pyx":571 + /* "ncls/src/ncls32.pyx":582 * * output_arr = np.zeros(length, dtype=np.long) * output_arr_other = np.zeros(length, dtype=np.long) # <<<<<<<<<<<<<< * cdef long [::1] output * cdef long [::1] output_other */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_long); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_long); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 571, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -9288,31 +9557,31 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_v_output_arr_other = __pyx_t_9; __pyx_t_9 = 0; - /* "ncls/src/ncls32.pyx":575 + /* "ncls/src/ncls32.pyx":586 * cdef long [::1] output_other * * output = output_arr # <<<<<<<<<<<<<< * output_other = output_arr_other * */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 586, __pyx_L1_error) __pyx_v_output = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":576 + /* "ncls/src/ncls32.pyx":587 * * output = output_arr * output_other = output_arr_other # <<<<<<<<<<<<<< * * cdef cn.IntervalIterator *it */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr_other, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr_other, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 587, __pyx_L1_error) __pyx_v_output_other = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":583 + /* "ncls/src/ncls32.pyx":594 * * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty # <<<<<<<<<<<<<< @@ -9322,7 +9591,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_12 = ((!(__pyx_v_self->im != 0)) != 0); if (__pyx_t_12) { - /* "ncls/src/ncls32.pyx":584 + /* "ncls/src/ncls32.pyx":595 * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty * return [], [] # <<<<<<<<<<<<<< @@ -9330,11 +9599,11 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); @@ -9346,7 +9615,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_6 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":583 + /* "ncls/src/ncls32.pyx":594 * * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty # <<<<<<<<<<<<<< @@ -9355,7 +9624,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ } - /* "ncls/src/ncls32.pyx":587 + /* "ncls/src/ncls32.pyx":598 * * * it_alloc = cn.interval_iterator_alloc() # <<<<<<<<<<<<<< @@ -9364,7 +9633,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_it_alloc = interval_iterator_alloc(); - /* "ncls/src/ncls32.pyx":588 + /* "ncls/src/ncls32.pyx":599 * * it_alloc = cn.interval_iterator_alloc() * it = it_alloc # <<<<<<<<<<<<<< @@ -9373,7 +9642,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_it = __pyx_v_it_alloc; - /* "ncls/src/ncls32.pyx":590 + /* "ncls/src/ncls32.pyx":601 * it = it_alloc * * for loop_counter in range(length): # <<<<<<<<<<<<<< @@ -9385,7 +9654,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_loop_counter = __pyx_t_14; - /* "ncls/src/ncls32.pyx":592 + /* "ncls/src/ncls32.pyx":603 * for loop_counter in range(length): * * start = starts[loop_counter] # <<<<<<<<<<<<<< @@ -9395,7 +9664,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_15 = __pyx_v_loop_counter; __pyx_v_start = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_15)) ))); - /* "ncls/src/ncls32.pyx":593 + /* "ncls/src/ncls32.pyx":604 * * start = starts[loop_counter] * end = ends[loop_counter] # <<<<<<<<<<<<<< @@ -9405,7 +9674,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_16 = __pyx_v_loop_counter; __pyx_v_end = (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_16)) ))); - /* "ncls/src/ncls32.pyx":594 + /* "ncls/src/ncls32.pyx":605 * start = starts[loop_counter] * end = ends[loop_counter] * while it: # <<<<<<<<<<<<<< @@ -9416,7 +9685,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_12 = (__pyx_v_it != 0); if (!__pyx_t_12) break; - /* "ncls/src/ncls32.pyx":595 + /* "ncls/src/ncls32.pyx":606 * end = ends[loop_counter] * while it: * i = 0 # <<<<<<<<<<<<<< @@ -9425,7 +9694,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_i = 0; - /* "ncls/src/ncls32.pyx":596 + /* "ncls/src/ncls32.pyx":607 * while it: * i = 0 * cn.find_intervals(it, start, end, self.im, self.ntop, # <<<<<<<<<<<<<< @@ -9434,7 +9703,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ (void)(find_intervals(__pyx_v_it, __pyx_v_start, __pyx_v_end, __pyx_v_self->im, __pyx_v_self->ntop, __pyx_v_self->subheader, __pyx_v_self->nlists, __pyx_v_im_buf, 0x400, (&__pyx_v_nhit), (&__pyx_v_it))); - /* "ncls/src/ncls32.pyx":600 + /* "ncls/src/ncls32.pyx":611 * &(nhit), &(it)) # GET NEXT BUFFER CHUNK * * while i < nhit: # <<<<<<<<<<<<<< @@ -9445,7 +9714,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_12 = ((__pyx_v_i < __pyx_v_nhit) != 0); if (!__pyx_t_12) break; - /* "ncls/src/ncls32.pyx":602 + /* "ncls/src/ncls32.pyx":613 * while i < nhit: * * if im_buf[i].start <= start and im_buf[i].end >= end: # <<<<<<<<<<<<<< @@ -9463,7 +9732,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_L11_bool_binop_done:; if (__pyx_t_12) { - /* "ncls/src/ncls32.pyx":604 + /* "ncls/src/ncls32.pyx":615 * if im_buf[i].start <= start and im_buf[i].end >= end: * * if nfound >= length: # <<<<<<<<<<<<<< @@ -9473,7 +9742,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_12 = ((__pyx_v_nfound >= __pyx_v_length) != 0); if (__pyx_t_12) { - /* "ncls/src/ncls32.pyx":606 + /* "ncls/src/ncls32.pyx":617 * if nfound >= length: * * length = length * 2 # <<<<<<<<<<<<<< @@ -9482,19 +9751,19 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_length = (__pyx_v_length * 2); - /* "ncls/src/ncls32.pyx":607 + /* "ncls/src/ncls32.pyx":618 * * length = length * 2 * output_arr = np.resize(output_arr, length) # <<<<<<<<<<<<<< * output_arr_other = np.resize(output_arr_other, length) * output = output_arr */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_resize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_resize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; __pyx_t_18 = 0; @@ -9511,7 +9780,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_output_arr, __pyx_t_5}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -9520,14 +9789,14 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_output_arr, __pyx_t_5}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -9538,7 +9807,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_18, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -9546,19 +9815,19 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __Pyx_DECREF_SET(__pyx_v_output_arr, __pyx_t_6); __pyx_t_6 = 0; - /* "ncls/src/ncls32.pyx":608 + /* "ncls/src/ncls32.pyx":619 * length = length * 2 * output_arr = np.resize(output_arr, length) * output_arr_other = np.resize(output_arr_other, length) # <<<<<<<<<<<<<< * output = output_arr * output_other = output_arr_other */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 608, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = NULL; __pyx_t_18 = 0; @@ -9575,7 +9844,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_output_arr_other, __pyx_t_9}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -9584,14 +9853,14 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_output_arr_other, __pyx_t_9}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -9602,7 +9871,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_18, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -9610,33 +9879,33 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __Pyx_DECREF_SET(__pyx_v_output_arr_other, __pyx_t_6); __pyx_t_6 = 0; - /* "ncls/src/ncls32.pyx":609 + /* "ncls/src/ncls32.pyx":620 * output_arr = np.resize(output_arr, length) * output_arr_other = np.resize(output_arr_other, length) * output = output_arr # <<<<<<<<<<<<<< * output_other = output_arr_other * */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 620, __pyx_L1_error) __PYX_XDEC_MEMVIEW(&__pyx_v_output, 1); __pyx_v_output = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":610 + /* "ncls/src/ncls32.pyx":621 * output_arr_other = np.resize(output_arr_other, length) * output = output_arr * output_other = output_arr_other # <<<<<<<<<<<<<< * * output[nfound] = indexes[loop_counter] */ - __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr_other, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 610, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr_other, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 621, __pyx_L1_error) __PYX_XDEC_MEMVIEW(&__pyx_v_output_other, 1); __pyx_v_output_other = __pyx_t_11; __pyx_t_11.memview = NULL; __pyx_t_11.data = NULL; - /* "ncls/src/ncls32.pyx":604 + /* "ncls/src/ncls32.pyx":615 * if im_buf[i].start <= start and im_buf[i].end >= end: * * if nfound >= length: # <<<<<<<<<<<<<< @@ -9645,7 +9914,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ } - /* "ncls/src/ncls32.pyx":612 + /* "ncls/src/ncls32.pyx":623 * output_other = output_arr_other * * output[nfound] = indexes[loop_counter] # <<<<<<<<<<<<<< @@ -9656,7 +9925,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_20 = __pyx_v_nfound; *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_20)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_19)) ))); - /* "ncls/src/ncls32.pyx":613 + /* "ncls/src/ncls32.pyx":624 * * output[nfound] = indexes[loop_counter] * output_other[nfound] = im_buf[i].target_id # <<<<<<<<<<<<<< @@ -9667,7 +9936,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_22 = __pyx_v_nfound; *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output_other.data) + __pyx_t_22)) )) = __pyx_t_21; - /* "ncls/src/ncls32.pyx":615 + /* "ncls/src/ncls32.pyx":626 * output_other[nfound] = im_buf[i].target_id * * nfound += 1 # <<<<<<<<<<<<<< @@ -9676,7 +9945,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":602 + /* "ncls/src/ncls32.pyx":613 * while i < nhit: * * if im_buf[i].start <= start and im_buf[i].end >= end: # <<<<<<<<<<<<<< @@ -9685,7 +9954,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ } - /* "ncls/src/ncls32.pyx":616 + /* "ncls/src/ncls32.pyx":627 * * nfound += 1 * i += 1 # <<<<<<<<<<<<<< @@ -9696,7 +9965,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct } } - /* "ncls/src/ncls32.pyx":618 + /* "ncls/src/ncls32.pyx":629 * i += 1 * * cn.reset_interval_iterator(it_alloc) # <<<<<<<<<<<<<< @@ -9705,7 +9974,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ (void)(reset_interval_iterator(__pyx_v_it_alloc)); - /* "ncls/src/ncls32.pyx":619 + /* "ncls/src/ncls32.pyx":630 * * cn.reset_interval_iterator(it_alloc) * it = it_alloc # <<<<<<<<<<<<<< @@ -9715,7 +9984,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_v_it = __pyx_v_it_alloc; } - /* "ncls/src/ncls32.pyx":621 + /* "ncls/src/ncls32.pyx":632 * it = it_alloc * * cn.free_interval_iterator(it_alloc) # <<<<<<<<<<<<<< @@ -9724,7 +9993,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct */ (void)(free_interval_iterator(__pyx_v_it_alloc)); - /* "ncls/src/ncls32.pyx":623 + /* "ncls/src/ncls32.pyx":634 * cn.free_interval_iterator(it_alloc) * * return output_arr[:nfound], output_arr_other[:nfound] # <<<<<<<<<<<<<< @@ -9732,11 +10001,11 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_other, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr_other, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); @@ -9748,7 +10017,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(struct __pyx_t_1 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":561 + /* "ncls/src/ncls32.pyx":572 * @cython.wraparound(False) * @cython.initializedcheck(False) * cpdef all_containments_both(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< @@ -9813,17 +10082,17 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_29all_containments_both(PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ends)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("all_containments_both", 1, 3, 3, 1); __PYX_ERR(0, 561, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("all_containments_both", 1, 3, 3, 1); __PYX_ERR(0, 572, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("all_containments_both", 1, 3, 3, 2); __PYX_ERR(0, 561, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("all_containments_both", 1, 3, 3, 2); __PYX_ERR(0, 572, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "all_containments_both") < 0)) __PYX_ERR(0, 561, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "all_containments_both") < 0)) __PYX_ERR(0, 572, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -9832,13 +10101,13 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_29all_containments_both(PyO values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } - __pyx_v_starts = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[0], 0); if (unlikely(!__pyx_v_starts.memview)) __PYX_ERR(0, 561, __pyx_L3_error) - __pyx_v_ends = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[1], 0); if (unlikely(!__pyx_v_ends.memview)) __PYX_ERR(0, 561, __pyx_L3_error) - __pyx_v_indexes = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t__const__(values[2], 0); if (unlikely(!__pyx_v_indexes.memview)) __PYX_ERR(0, 561, __pyx_L3_error) + __pyx_v_starts = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[0], 0); if (unlikely(!__pyx_v_starts.memview)) __PYX_ERR(0, 572, __pyx_L3_error) + __pyx_v_ends = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[1], 0); if (unlikely(!__pyx_v_ends.memview)) __PYX_ERR(0, 572, __pyx_L3_error) + __pyx_v_indexes = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t__const__(values[2], 0); if (unlikely(!__pyx_v_indexes.memview)) __PYX_ERR(0, 572, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("all_containments_both", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 561, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("all_containments_both", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 572, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ncls.src.ncls32.NCLS32.all_containments_both", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9857,7 +10126,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_28all_containments_both(str PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("all_containments_both", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(__pyx_v_self, __pyx_v_starts, __pyx_v_ends, __pyx_v_indexes, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ncls_3src_6ncls32_6NCLS32_all_containments_both(__pyx_v_self, __pyx_v_starts, __pyx_v_ends, __pyx_v_indexes, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9877,7 +10146,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_28all_containments_both(str return __pyx_r; } -/* "ncls/src/ncls32.pyx":631 +/* "ncls/src/ncls32.pyx":642 * @cython.wraparound(False) * @cython.initializedcheck(False) * cpdef has_overlaps(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< @@ -9923,15 +10192,15 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4ncls_3src_6ncls32_6NCLS32_31has_overlaps)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_starts, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_starts, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_ends, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_ends, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int32_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_indexes, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_int64_t__const__, (int (*)(char *, PyObject *)) NULL, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; @@ -9949,7 +10218,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9960,7 +10229,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9969,7 +10238,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob } else #endif { - __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -9983,7 +10252,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -10006,7 +10275,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob #endif } - /* "ncls/src/ncls32.pyx":633 + /* "ncls/src/ncls32.pyx":644 * cpdef has_overlaps(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): * * cdef int i = 0 # <<<<<<<<<<<<<< @@ -10015,7 +10284,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob */ __pyx_v_i = 0; - /* "ncls/src/ncls32.pyx":634 + /* "ncls/src/ncls32.pyx":645 * * cdef int i = 0 * cdef int ix = 0 # <<<<<<<<<<<<<< @@ -10024,7 +10293,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob */ __pyx_v_ix = 0; - /* "ncls/src/ncls32.pyx":635 + /* "ncls/src/ncls32.pyx":646 * cdef int i = 0 * cdef int ix = 0 * cdef int length = len(starts) # <<<<<<<<<<<<<< @@ -10034,7 +10303,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_t_10 = __Pyx_MemoryView_Len(__pyx_v_starts); __pyx_v_length = __pyx_t_10; - /* "ncls/src/ncls32.pyx":636 + /* "ncls/src/ncls32.pyx":647 * cdef int ix = 0 * cdef int length = len(starts) * cdef int nfound = 0 # <<<<<<<<<<<<<< @@ -10043,7 +10312,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob */ __pyx_v_nfound = 0; - /* "ncls/src/ncls32.pyx":640 + /* "ncls/src/ncls32.pyx":651 * # cdef cn.IntervalIterator *it * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty # <<<<<<<<<<<<<< @@ -10053,7 +10322,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_t_11 = ((!(__pyx_v_self->im != 0)) != 0); if (__pyx_t_11) { - /* "ncls/src/ncls32.pyx":641 + /* "ncls/src/ncls32.pyx":652 * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty * return [] # <<<<<<<<<<<<<< @@ -10061,13 +10330,13 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob * output_arr = np.zeros(length, dtype=long) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":640 + /* "ncls/src/ncls32.pyx":651 * # cdef cn.IntervalIterator *it * cdef cn.IntervalMap im_buf[1024] * if not self.im: # if empty # <<<<<<<<<<<<<< @@ -10076,29 +10345,29 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob */ } - /* "ncls/src/ncls32.pyx":643 + /* "ncls/src/ncls32.pyx":654 * return [] * * output_arr = np.zeros(length, dtype=long) # <<<<<<<<<<<<<< * cdef long [::1] output * output = output_arr */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __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, 643, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyLong_Type))) < 0) __PYX_ERR(0, 643, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 643, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyLong_Type))) < 0) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -10106,19 +10375,19 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_v_output_arr = __pyx_t_9; __pyx_t_9 = 0; - /* "ncls/src/ncls32.pyx":645 + /* "ncls/src/ncls32.pyx":656 * output_arr = np.zeros(length, dtype=long) * cdef long [::1] output * output = output_arr # <<<<<<<<<<<<<< * * for i in range(length): */ - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_output_arr, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 656, __pyx_L1_error) __pyx_v_output = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "ncls/src/ncls32.pyx":647 + /* "ncls/src/ncls32.pyx":658 * output = output_arr * * for i in range(length): # <<<<<<<<<<<<<< @@ -10130,7 +10399,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "ncls/src/ncls32.pyx":649 + /* "ncls/src/ncls32.pyx":660 * for i in range(length): * * ix = cn.find_overlap_start(starts[i], ends[i], self.im, self.ntop) # <<<<<<<<<<<<<< @@ -10141,7 +10410,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_t_16 = __pyx_v_i; __pyx_v_ix = find_overlap_start((*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_starts.data) + __pyx_t_15)) ))), (*((int32_t const *) ( /* dim=0 */ ((char *) (((int32_t const *) __pyx_v_ends.data) + __pyx_t_16)) ))), __pyx_v_self->im, __pyx_v_self->ntop); - /* "ncls/src/ncls32.pyx":651 + /* "ncls/src/ncls32.pyx":662 * ix = cn.find_overlap_start(starts[i], ends[i], self.im, self.ntop) * * if ix != -1: # <<<<<<<<<<<<<< @@ -10151,7 +10420,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_t_11 = ((__pyx_v_ix != -1L) != 0); if (__pyx_t_11) { - /* "ncls/src/ncls32.pyx":652 + /* "ncls/src/ncls32.pyx":663 * * if ix != -1: * output[nfound] = indexes[i] # <<<<<<<<<<<<<< @@ -10162,7 +10431,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_t_18 = __pyx_v_nfound; *((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_output.data) + __pyx_t_18)) )) = (*((int64_t const *) ( /* dim=0 */ ((char *) (((int64_t const *) __pyx_v_indexes.data) + __pyx_t_17)) ))); - /* "ncls/src/ncls32.pyx":653 + /* "ncls/src/ncls32.pyx":664 * if ix != -1: * output[nfound] = indexes[i] * nfound += 1 # <<<<<<<<<<<<<< @@ -10171,7 +10440,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob */ __pyx_v_nfound = (__pyx_v_nfound + 1); - /* "ncls/src/ncls32.pyx":651 + /* "ncls/src/ncls32.pyx":662 * ix = cn.find_overlap_start(starts[i], ends[i], self.im, self.ntop) * * if ix != -1: # <<<<<<<<<<<<<< @@ -10180,7 +10449,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob */ } - /* "ncls/src/ncls32.pyx":655 + /* "ncls/src/ncls32.pyx":666 * nfound += 1 * * i += 1 # <<<<<<<<<<<<<< @@ -10190,7 +10459,7 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob __pyx_v_i = (__pyx_v_i + 1); } - /* "ncls/src/ncls32.pyx":657 + /* "ncls/src/ncls32.pyx":668 * i += 1 * * return output_arr[:nfound] # <<<<<<<<<<<<<< @@ -10198,13 +10467,13 @@ static PyObject *__pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_output_arr, 0, __pyx_v_nfound, NULL, NULL, NULL, 0, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":631 + /* "ncls/src/ncls32.pyx":642 * @cython.wraparound(False) * @cython.initializedcheck(False) * cpdef has_overlaps(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): # <<<<<<<<<<<<<< @@ -10267,17 +10536,17 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_31has_overlaps(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ends)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("has_overlaps", 1, 3, 3, 1); __PYX_ERR(0, 631, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("has_overlaps", 1, 3, 3, 1); __PYX_ERR(0, 642, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("has_overlaps", 1, 3, 3, 2); __PYX_ERR(0, 631, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("has_overlaps", 1, 3, 3, 2); __PYX_ERR(0, 642, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "has_overlaps") < 0)) __PYX_ERR(0, 631, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "has_overlaps") < 0)) __PYX_ERR(0, 642, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -10286,13 +10555,13 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_6NCLS32_31has_overlaps(PyObject *__ values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } - __pyx_v_starts = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[0], 0); if (unlikely(!__pyx_v_starts.memview)) __PYX_ERR(0, 631, __pyx_L3_error) - __pyx_v_ends = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[1], 0); if (unlikely(!__pyx_v_ends.memview)) __PYX_ERR(0, 631, __pyx_L3_error) - __pyx_v_indexes = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t__const__(values[2], 0); if (unlikely(!__pyx_v_indexes.memview)) __PYX_ERR(0, 631, __pyx_L3_error) + __pyx_v_starts = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[0], 0); if (unlikely(!__pyx_v_starts.memview)) __PYX_ERR(0, 642, __pyx_L3_error) + __pyx_v_ends = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t__const__(values[1], 0); if (unlikely(!__pyx_v_ends.memview)) __PYX_ERR(0, 642, __pyx_L3_error) + __pyx_v_indexes = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t__const__(values[2], 0); if (unlikely(!__pyx_v_indexes.memview)) __PYX_ERR(0, 642, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("has_overlaps", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 631, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("has_overlaps", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 642, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ncls.src.ncls32.NCLS32.has_overlaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10311,7 +10580,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_30has_overlaps(struct __pyx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("has_overlaps", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(__pyx_v_self, __pyx_v_starts, __pyx_v_ends, __pyx_v_indexes, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ncls_3src_6ncls32_6NCLS32_has_overlaps(__pyx_v_self, __pyx_v_starts, __pyx_v_ends, __pyx_v_indexes, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10362,7 +10631,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_32__reduce_cython__(CYTHON_ * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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; @@ -10415,7 +10684,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_34__setstate_cython__(CYTHO * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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; @@ -10438,7 +10707,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_6NCLS32_34__setstate_cython__(CYTHO return __pyx_r; } -/* "ncls/src/ncls32.pyx":669 +/* "ncls/src/ncls32.pyx":680 * cdef NCLS32 db * * def __cinit__(self, int32_t start, int32_t end, NCLS32 db not None): # <<<<<<<<<<<<<< @@ -10480,17 +10749,17 @@ static int __pyx_pw_4ncls_3src_6ncls32_12NCLSIterator_1__cinit__(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 669, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 680, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_db)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 669, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 680, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 669, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 680, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -10499,19 +10768,19 @@ static int __pyx_pw_4ncls_3src_6ncls32_12NCLSIterator_1__cinit__(PyObject *__pyx values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } - __pyx_v_start = __Pyx_PyInt_As_int32_t(values[0]); if (unlikely((__pyx_v_start == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 669, __pyx_L3_error) - __pyx_v_end = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_end == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 669, __pyx_L3_error) + __pyx_v_start = __Pyx_PyInt_As_int32_t(values[0]); if (unlikely((__pyx_v_start == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L3_error) + __pyx_v_end = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_end == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L3_error) __pyx_v_db = ((struct __pyx_obj_4ncls_3src_6ncls32_NCLS32 *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 669, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 680, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ncls.src.ncls32.NCLSIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_4ncls_3src_6ncls32_NCLS32, 0, "db", 0))) __PYX_ERR(0, 669, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_db), __pyx_ptype_4ncls_3src_6ncls32_NCLS32, 0, "db", 0))) __PYX_ERR(0, 680, __pyx_L1_error) __pyx_r = __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(((struct __pyx_obj_4ncls_3src_6ncls32_NCLSIterator *)__pyx_v_self), __pyx_v_start, __pyx_v_end, __pyx_v_db); /* function exit code */ @@ -10529,7 +10798,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj IntervalIterator *__pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "ncls/src/ncls32.pyx":670 + /* "ncls/src/ncls32.pyx":681 * * def __cinit__(self, int32_t start, int32_t end, NCLS32 db not None): * self.it = cn.interval_iterator_alloc() # <<<<<<<<<<<<<< @@ -10538,7 +10807,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj */ __pyx_v_self->it = interval_iterator_alloc(); - /* "ncls/src/ncls32.pyx":671 + /* "ncls/src/ncls32.pyx":682 * def __cinit__(self, int32_t start, int32_t end, NCLS32 db not None): * self.it = cn.interval_iterator_alloc() * self.it_alloc = self.it # <<<<<<<<<<<<<< @@ -10548,7 +10817,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj __pyx_t_1 = __pyx_v_self->it; __pyx_v_self->it_alloc = __pyx_t_1; - /* "ncls/src/ncls32.pyx":672 + /* "ncls/src/ncls32.pyx":683 * self.it = cn.interval_iterator_alloc() * self.it_alloc = self.it * self.start = start # <<<<<<<<<<<<<< @@ -10557,7 +10826,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj */ __pyx_v_self->start = __pyx_v_start; - /* "ncls/src/ncls32.pyx":673 + /* "ncls/src/ncls32.pyx":684 * self.it_alloc = self.it * self.start = start * self.end = end # <<<<<<<<<<<<<< @@ -10566,7 +10835,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj */ __pyx_v_self->end = __pyx_v_end; - /* "ncls/src/ncls32.pyx":674 + /* "ncls/src/ncls32.pyx":685 * self.start = start * self.end = end * self.db = db # <<<<<<<<<<<<<< @@ -10579,7 +10848,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj __Pyx_DECREF(((PyObject *)__pyx_v_self->db)); __pyx_v_self->db = __pyx_v_db; - /* "ncls/src/ncls32.pyx":675 + /* "ncls/src/ncls32.pyx":686 * self.end = end * self.db = db * self.nhit = 0 # <<<<<<<<<<<<<< @@ -10588,7 +10857,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj */ __pyx_v_self->nhit = 0; - /* "ncls/src/ncls32.pyx":676 + /* "ncls/src/ncls32.pyx":687 * self.db = db * self.nhit = 0 * self.ihit = 0 # <<<<<<<<<<<<<< @@ -10597,7 +10866,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj */ __pyx_v_self->ihit = 0; - /* "ncls/src/ncls32.pyx":669 + /* "ncls/src/ncls32.pyx":680 * cdef NCLS32 db * * def __cinit__(self, int32_t start, int32_t end, NCLS32 db not None): # <<<<<<<<<<<<<< @@ -10611,7 +10880,7 @@ static int __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator___cinit__(struct __pyx_obj return __pyx_r; } -/* "ncls/src/ncls32.pyx":679 +/* "ncls/src/ncls32.pyx":690 * * * def __iter__(self): # <<<<<<<<<<<<<< @@ -10637,7 +10906,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_2__iter__(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "ncls/src/ncls32.pyx":680 + /* "ncls/src/ncls32.pyx":691 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -10649,7 +10918,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_2__iter__(struct __p __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "ncls/src/ncls32.pyx":679 + /* "ncls/src/ncls32.pyx":690 * * * def __iter__(self): # <<<<<<<<<<<<<< @@ -10664,7 +10933,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_2__iter__(struct __p return __pyx_r; } -/* "ncls/src/ncls32.pyx":683 +/* "ncls/src/ncls32.pyx":694 * * * cdef int cnext(self): # c VERSION OF ITERATOR next METHOD RETURNS INDEX # <<<<<<<<<<<<<< @@ -10680,7 +10949,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl int __pyx_t_2; __Pyx_RefNannySetupContext("cnext", 0); - /* "ncls/src/ncls32.pyx":685 + /* "ncls/src/ncls32.pyx":696 * cdef int cnext(self): # c VERSION OF ITERATOR next METHOD RETURNS INDEX * cdef int i * if self.ihit >= self.nhit: # TRY TO GET ONE MORE BUFFER CHUNK OF HITS # <<<<<<<<<<<<<< @@ -10690,7 +10959,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl __pyx_t_1 = ((__pyx_v_self->ihit >= __pyx_v_self->nhit) != 0); if (__pyx_t_1) { - /* "ncls/src/ncls32.pyx":686 + /* "ncls/src/ncls32.pyx":697 * cdef int i * if self.ihit >= self.nhit: # TRY TO GET ONE MORE BUFFER CHUNK OF HITS * if self.it == NULL: # ITERATOR IS EXHAUSTED # <<<<<<<<<<<<<< @@ -10700,7 +10969,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl __pyx_t_1 = ((__pyx_v_self->it == NULL) != 0); if (__pyx_t_1) { - /* "ncls/src/ncls32.pyx":687 + /* "ncls/src/ncls32.pyx":698 * if self.ihit >= self.nhit: # TRY TO GET ONE MORE BUFFER CHUNK OF HITS * if self.it == NULL: # ITERATOR IS EXHAUSTED * return -1 # <<<<<<<<<<<<<< @@ -10710,7 +10979,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl __pyx_r = -1; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":686 + /* "ncls/src/ncls32.pyx":697 * cdef int i * if self.ihit >= self.nhit: # TRY TO GET ONE MORE BUFFER CHUNK OF HITS * if self.it == NULL: # ITERATOR IS EXHAUSTED # <<<<<<<<<<<<<< @@ -10719,7 +10988,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl */ } - /* "ncls/src/ncls32.pyx":688 + /* "ncls/src/ncls32.pyx":699 * if self.it == NULL: # ITERATOR IS EXHAUSTED * return -1 * cn.find_intervals(self.it, self.start, self.end, self.db.im, self.db.ntop, # <<<<<<<<<<<<<< @@ -10728,7 +10997,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl */ (void)(find_intervals(__pyx_v_self->it, __pyx_v_self->start, __pyx_v_self->end, __pyx_v_self->db->im, __pyx_v_self->db->ntop, __pyx_v_self->db->subheader, __pyx_v_self->db->nlists, __pyx_v_self->im_buf, 0x400, (&__pyx_v_self->nhit), (&__pyx_v_self->it))); - /* "ncls/src/ncls32.pyx":691 + /* "ncls/src/ncls32.pyx":702 * self.db.subheader, self.db.nlists, self.im_buf, 1024, * &(self.nhit), &(self.it)) # GET NEXT BUFFER CHUNK * self.ihit = 0 # START ITERATING FROM START OF BUFFER # <<<<<<<<<<<<<< @@ -10737,7 +11006,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl */ __pyx_v_self->ihit = 0; - /* "ncls/src/ncls32.pyx":685 + /* "ncls/src/ncls32.pyx":696 * cdef int cnext(self): # c VERSION OF ITERATOR next METHOD RETURNS INDEX * cdef int i * if self.ihit >= self.nhit: # TRY TO GET ONE MORE BUFFER CHUNK OF HITS # <<<<<<<<<<<<<< @@ -10746,7 +11015,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl */ } - /* "ncls/src/ncls32.pyx":693 + /* "ncls/src/ncls32.pyx":704 * self.ihit = 0 # START ITERATING FROM START OF BUFFER * * if self.ihit < self.nhit: # RETURN NEXT ITEM FROM BUFFER # <<<<<<<<<<<<<< @@ -10756,7 +11025,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl __pyx_t_1 = ((__pyx_v_self->ihit < __pyx_v_self->nhit) != 0); if (__pyx_t_1) { - /* "ncls/src/ncls32.pyx":694 + /* "ncls/src/ncls32.pyx":705 * * if self.ihit < self.nhit: # RETURN NEXT ITEM FROM BUFFER * i = self.ihit # <<<<<<<<<<<<<< @@ -10766,7 +11035,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl __pyx_t_2 = __pyx_v_self->ihit; __pyx_v_i = __pyx_t_2; - /* "ncls/src/ncls32.pyx":695 + /* "ncls/src/ncls32.pyx":706 * if self.ihit < self.nhit: # RETURN NEXT ITEM FROM BUFFER * i = self.ihit * self.ihit = self.ihit + 1 # ADVANCE THE BUFFER COUNTER # <<<<<<<<<<<<<< @@ -10775,7 +11044,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl */ __pyx_v_self->ihit = (__pyx_v_self->ihit + 1); - /* "ncls/src/ncls32.pyx":696 + /* "ncls/src/ncls32.pyx":707 * i = self.ihit * self.ihit = self.ihit + 1 # ADVANCE THE BUFFER COUNTER * return i # <<<<<<<<<<<<<< @@ -10785,7 +11054,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl __pyx_r = __pyx_v_i; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":693 + /* "ncls/src/ncls32.pyx":704 * self.ihit = 0 # START ITERATING FROM START OF BUFFER * * if self.ihit < self.nhit: # RETURN NEXT ITEM FROM BUFFER # <<<<<<<<<<<<<< @@ -10794,7 +11063,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl */ } - /* "ncls/src/ncls32.pyx":698 + /* "ncls/src/ncls32.pyx":709 * return i * else: # BUFFER WAS EMPTY, NO HITS TO ITERATE OVER... * return -1 # <<<<<<<<<<<<<< @@ -10806,7 +11075,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl goto __pyx_L0; } - /* "ncls/src/ncls32.pyx":683 + /* "ncls/src/ncls32.pyx":694 * * * cdef int cnext(self): # c VERSION OF ITERATOR next METHOD RETURNS INDEX # <<<<<<<<<<<<<< @@ -10820,7 +11089,7 @@ static int __pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext(struct __pyx_obj_4ncl return __pyx_r; } -/* "ncls/src/ncls32.pyx":702 +/* "ncls/src/ncls32.pyx":713 * * # PYTHON VERSION OF next RETURNS HIT AS A TUPLE * def __next__(self): # PYREX USES THIS NON-STANDARD NAME INSTEAD OF next()!!! # <<<<<<<<<<<<<< @@ -10852,7 +11121,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "ncls/src/ncls32.pyx":704 + /* "ncls/src/ncls32.pyx":715 * def __next__(self): # PYREX USES THIS NON-STANDARD NAME INSTEAD OF next()!!! * cdef int i * i = self.cnext() # <<<<<<<<<<<<<< @@ -10861,7 +11130,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p */ __pyx_v_i = ((struct __pyx_vtabstruct_4ncls_3src_6ncls32_NCLSIterator *)__pyx_v_self->__pyx_vtab)->cnext(__pyx_v_self); - /* "ncls/src/ncls32.pyx":705 + /* "ncls/src/ncls32.pyx":716 * cdef int i * i = self.cnext() * if i >= 0: # <<<<<<<<<<<<<< @@ -10871,7 +11140,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p __pyx_t_1 = ((__pyx_v_i >= 0) != 0); if (likely(__pyx_t_1)) { - /* "ncls/src/ncls32.pyx":706 + /* "ncls/src/ncls32.pyx":717 * i = self.cnext() * if i >= 0: * return (self.im_buf[i].start, self.im_buf[i].end, self.im_buf[i].target_id) # <<<<<<<<<<<<<< @@ -10879,13 +11148,13 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p * raise StopIteration */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int32_t((__pyx_v_self->im_buf[__pyx_v_i]).start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int32_t((__pyx_v_self->im_buf[__pyx_v_i]).start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int32_t((__pyx_v_self->im_buf[__pyx_v_i]).end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int32_t((__pyx_v_self->im_buf[__pyx_v_i]).end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int32_t((__pyx_v_self->im_buf[__pyx_v_i]).target_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int32_t((__pyx_v_self->im_buf[__pyx_v_i]).target_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); @@ -10900,7 +11169,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p __pyx_t_5 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":705 + /* "ncls/src/ncls32.pyx":716 * cdef int i * i = self.cnext() * if i >= 0: # <<<<<<<<<<<<<< @@ -10909,7 +11178,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p */ } - /* "ncls/src/ncls32.pyx":708 + /* "ncls/src/ncls32.pyx":719 * return (self.im_buf[i].start, self.im_buf[i].end, self.im_buf[i].target_id) * else: * raise StopIteration # <<<<<<<<<<<<<< @@ -10918,10 +11187,10 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p */ /*else*/ { __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 708, __pyx_L1_error) + __PYX_ERR(0, 719, __pyx_L1_error) } - /* "ncls/src/ncls32.pyx":702 + /* "ncls/src/ncls32.pyx":713 * * # PYTHON VERSION OF next RETURNS HIT AS A TUPLE * def __next__(self): # PYREX USES THIS NON-STANDARD NAME INSTEAD OF next()!!! # <<<<<<<<<<<<<< @@ -10943,7 +11212,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_4__next__(struct __p return __pyx_r; } -/* "ncls/src/ncls32.pyx":710 +/* "ncls/src/ncls32.pyx":721 * raise StopIteration * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -10966,7 +11235,7 @@ static void __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_6__dealloc__(struct __pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "ncls/src/ncls32.pyx":712 + /* "ncls/src/ncls32.pyx":723 * def __dealloc__(self): * 'remember: dealloc cannot call other methods!' * cn.free_interval_iterator(self.it_alloc) # <<<<<<<<<<<<<< @@ -10975,7 +11244,7 @@ static void __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_6__dealloc__(struct __pyx */ (void)(free_interval_iterator(__pyx_v_self->it_alloc)); - /* "ncls/src/ncls32.pyx":710 + /* "ncls/src/ncls32.pyx":721 * raise StopIteration * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -10987,7 +11256,7 @@ static void __pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_6__dealloc__(struct __pyx __Pyx_RefNannyFinishContext(); } -/* "ncls/src/ncls32.pyx":715 +/* "ncls/src/ncls32.pyx":726 * * * def find_overlap(self, int32_t start, int32_t end): # <<<<<<<<<<<<<< @@ -11026,11 +11295,11 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_12NCLSIterator_9find_overlap(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("find_overlap", 1, 2, 2, 1); __PYX_ERR(0, 715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find_overlap", 1, 2, 2, 1); __PYX_ERR(0, 726, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_overlap") < 0)) __PYX_ERR(0, 715, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_overlap") < 0)) __PYX_ERR(0, 726, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11038,12 +11307,12 @@ static PyObject *__pyx_pw_4ncls_3src_6ncls32_12NCLSIterator_9find_overlap(PyObje values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_start = __Pyx_PyInt_As_int32_t(values[0]); if (unlikely((__pyx_v_start == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error) - __pyx_v_end = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_end == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error) + __pyx_v_start = __Pyx_PyInt_As_int32_t(values[0]); if (unlikely((__pyx_v_start == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L3_error) + __pyx_v_end = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_end == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("find_overlap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find_overlap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 726, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ncls.src.ncls32.NCLSIterator.find_overlap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11066,21 +11335,21 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_8find_overlap(struct PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("find_overlap", 0); - /* "ncls/src/ncls32.pyx":716 + /* "ncls/src/ncls32.pyx":727 * * def find_overlap(self, int32_t start, int32_t end): * if not self.im: # <<<<<<<<<<<<<< * return [] * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_im); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_im); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __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, 716, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { - /* "ncls/src/ncls32.pyx":717 + /* "ncls/src/ncls32.pyx":728 * def find_overlap(self, int32_t start, int32_t end): * if not self.im: * return [] # <<<<<<<<<<<<<< @@ -11088,13 +11357,13 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_8find_overlap(struct * return NCLSIterator(start, end, self) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":716 + /* "ncls/src/ncls32.pyx":727 * * def find_overlap(self, int32_t start, int32_t end): * if not self.im: # <<<<<<<<<<<<<< @@ -11103,17 +11372,17 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_8find_overlap(struct */ } - /* "ncls/src/ncls32.pyx":719 + /* "ncls/src/ncls32.pyx":730 * return [] * * return NCLSIterator(start, end, self) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_end); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); @@ -11124,14 +11393,14 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_8find_overlap(struct PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_self)); __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4ncls_3src_6ncls32_NCLSIterator), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4ncls_3src_6ncls32_NCLSIterator), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ncls/src/ncls32.pyx":715 + /* "ncls/src/ncls32.pyx":726 * * * def find_overlap(self, int32_t start, int32_t end): # <<<<<<<<<<<<<< @@ -11183,7 +11452,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_10__reduce_cython__( * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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; @@ -11236,7 +11505,7 @@ static PyObject *__pyx_pf_4ncls_3src_6ncls32_12NCLSIterator_12__setstate_cython_ * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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; @@ -11456,7 +11725,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * if itemsize <= 0: */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __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; @@ -11488,7 +11757,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * if not isinstance(format, bytes): */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __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; @@ -11615,7 +11884,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11889,7 +12158,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ * * if self.dtype_is_object: */ - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -12130,7 +12399,7 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru * info.buf = self.data * info.len = self.len */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __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; @@ -12846,7 +13115,7 @@ static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __p * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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; @@ -12899,7 +13168,7 @@ static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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; @@ -14543,7 +14812,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit * * have_slices, index = _unellipsify(index, self.view.ndim) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -15570,7 +15839,7 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview * else: * if len(self.view.format) == 1: */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L5_except_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 491, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -15926,7 +16195,7 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu * * if flags & PyBUF_ND: */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __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; @@ -16466,7 +16735,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st * * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -16580,7 +16849,7 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__20, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__21, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -17581,7 +17850,7 @@ static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struc * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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; @@ -17634,7 +17903,7 @@ static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED st * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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; @@ -17985,9 +18254,9 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { __Pyx_GOTREF(__pyx_t_7); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) { - __Pyx_INCREF(__pyx_slice__23); - __Pyx_GIVEREF(__pyx_slice__23); - PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__23); + __Pyx_INCREF(__pyx_slice__24); + __Pyx_GIVEREF(__pyx_slice__24); + PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__24); } } __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 678, __pyx_L1_error) @@ -18020,7 +18289,7 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { * else: */ /*else*/ { - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__23); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__24); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 681, __pyx_L1_error) } __pyx_L7:; @@ -18160,9 +18429,9 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) { - __Pyx_INCREF(__pyx_slice__23); - __Pyx_GIVEREF(__pyx_slice__23); - PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__23); + __Pyx_INCREF(__pyx_slice__24); + __Pyx_GIVEREF(__pyx_slice__24); + PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__24); } } __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error) @@ -18286,7 +18555,7 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __ * * */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 699, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 699, __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; @@ -20449,7 +20718,7 @@ static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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; @@ -20502,7 +20771,7 @@ static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUS * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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; @@ -25239,6 +25508,8 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1}, + {&__pyx_kp_s_B_end, __pyx_k_B_end, sizeof(__pyx_k_B_end), 0, 0, 1, 0}, + {&__pyx_kp_s_B_start, __pyx_k_B_start, sizeof(__pyx_k_B_start), 0, 0, 1, 0}, {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0}, {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0}, @@ -25275,6 +25546,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_all_overlaps_self, __pyx_k_all_overlaps_self, sizeof(__pyx_k_all_overlaps_self), 0, 0, 1, 1}, {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + #if PY_MAJOR_VERSION >= 3 + {&__pyx_kp_s_b, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, + #else + {&__pyx_kp_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 0}, + #endif {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, @@ -25294,6 +25570,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_ends, __pyx_k_ends, sizeof(__pyx_k_ends), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, + {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_first_overlap_both, __pyx_k_first_overlap_both, sizeof(__pyx_k_first_overlap_both), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, @@ -25304,6 +25581,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0}, {&__pyx_n_s_has_overlap, __pyx_k_has_overlap, sizeof(__pyx_k_has_overlap), 0, 0, 1, 1}, {&__pyx_n_s_has_overlaps, __pyx_k_has_overlaps, sizeof(__pyx_k_has_overlaps), 0, 0, 1, 1}, + {&__pyx_kp_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 0}, {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, {&__pyx_n_s_ids, __pyx_k_ids, sizeof(__pyx_k_ids), 0, 0, 1, 1}, {&__pyx_n_s_im, __pyx_k_im, sizeof(__pyx_k_im), 0, 0, 1, 1}, @@ -25317,7 +25595,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_k_overlaps_both, __pyx_k_k_overlaps_both, sizeof(__pyx_k_k_overlaps_both), 0, 0, 1, 1}, {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1}, + {&__pyx_kp_s_length_is, __pyx_k_length_is, sizeof(__pyx_k_length_is), 0, 0, 1, 0}, {&__pyx_n_s_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 0, 1, 1}, + {&__pyx_kp_s_loop_counter, __pyx_k_loop_counter, sizeof(__pyx_k_loop_counter), 0, 0, 1, 0}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1}, {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, @@ -25325,13 +25605,20 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_ncls_src_ncls32, __pyx_k_ncls_src_ncls32, sizeof(__pyx_k_ncls_src_ncls32), 0, 0, 1, 1}, {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1}, + {&__pyx_n_s_nend, __pyx_k_nend, sizeof(__pyx_k_nend), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, + {&__pyx_kp_s_nfound, __pyx_k_nfound, sizeof(__pyx_k_nfound), 0, 0, 1, 0}, + {&__pyx_kp_s_nfound_is, __pyx_k_nfound_is, sizeof(__pyx_k_nfound_is), 0, 0, 1, 0}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_nstart, __pyx_k_nstart, sizeof(__pyx_k_nstart), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, + {&__pyx_kp_s_output_arr_end, __pyx_k_output_arr_end, sizeof(__pyx_k_output_arr_end), 0, 0, 1, 0}, + {&__pyx_kp_s_output_arr_start, __pyx_k_output_arr_start, sizeof(__pyx_k_output_arr_start), 0, 0, 1, 0}, {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_profile, __pyx_k_profile, sizeof(__pyx_k_profile), 0, 0, 1, 1}, {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1}, {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1}, @@ -25378,7 +25665,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 50, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 52, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 719, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 133, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 151, __pyx_L1_error) __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 400, __pyx_L1_error) @@ -25399,18 +25686,18 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__5); - __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__6); - __Pyx_GIVEREF(__pyx_tuple__6); + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); /* "(tree fragment)":2 * def __reduce_cython__(self): @@ -25418,18 +25705,18 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__8); - __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); /* "View.MemoryView":133 * @@ -25438,9 +25725,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * if itemsize <= 0: */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 133, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); /* "View.MemoryView":136 * @@ -25449,9 +25736,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * if not isinstance(format, bytes): */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 136, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); /* "View.MemoryView":148 * @@ -25460,9 +25747,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 148, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__11); - __Pyx_GIVEREF(__pyx_tuple__11); + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); /* "View.MemoryView":176 * self.data = malloc(self.len) @@ -25471,9 +25758,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * if self.dtype_is_object: */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); /* "View.MemoryView":192 * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS @@ -25482,9 +25769,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * info.buf = self.data * info.len = self.len */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 192, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__13); - __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); /* "(tree fragment)":2 * def __reduce_cython__(self): @@ -25492,18 +25779,18 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); /* "View.MemoryView":414 * def __setitem__(memoryview self, object index, object value): @@ -25512,9 +25799,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * have_slices, index = _unellipsify(index, self.view.ndim) */ - __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__16); - __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); /* "View.MemoryView":491 * result = struct.unpack(self.view.format, bytesitem) @@ -25523,9 +25810,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * else: * if len(self.view.format) == 1: */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 491, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); /* "View.MemoryView":516 * def __getbuffer__(self, Py_buffer *info, int flags): @@ -25534,9 +25821,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * if flags & PyBUF_ND: */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 516, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); /* "View.MemoryView":566 * if self.view.strides == NULL: @@ -25545,9 +25832,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 566, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); /* "View.MemoryView":573 * def suboffsets(self): @@ -25556,12 +25843,12 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) */ - __pyx_tuple__20 = PyTuple_New(1); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 573, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__20); + __pyx_tuple__21 = PyTuple_New(1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); - PyTuple_SET_ITEM(__pyx_tuple__20, 0, __pyx_int_neg_1); - __Pyx_GIVEREF(__pyx_tuple__20); + PyTuple_SET_ITEM(__pyx_tuple__21, 0, __pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_tuple__21); /* "(tree fragment)":2 * def __reduce_cython__(self): @@ -25569,18 +25856,18 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__22); - __Pyx_GIVEREF(__pyx_tuple__22); + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); /* "View.MemoryView":678 * if item is Ellipsis: @@ -25589,9 +25876,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * seen_ellipsis = True * else: */ - __pyx_slice__23 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(1, 678, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__23); - __Pyx_GIVEREF(__pyx_slice__23); + __pyx_slice__24 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(1, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__24); + __Pyx_GIVEREF(__pyx_slice__24); /* "View.MemoryView":699 * for suboffset in suboffsets[:ndim]: @@ -25600,9 +25887,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * */ - __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 699, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); /* "(tree fragment)":2 * def __reduce_cython__(self): @@ -25610,18 +25897,18 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ - __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); + __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ - __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__26); - __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); /* "View.MemoryView":286 * return self.name @@ -25630,9 +25917,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * cdef strided = Enum("") # default * cdef indirect = Enum("") */ - __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 286, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); /* "View.MemoryView":287 * @@ -25641,9 +25928,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * cdef indirect = Enum("") * */ - __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 287, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); /* "View.MemoryView":288 * cdef generic = Enum("") @@ -25652,9 +25939,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * */ - __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); /* "View.MemoryView":291 * @@ -25663,9 +25950,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * cdef indirect_contiguous = Enum("") * */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 291, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); /* "View.MemoryView":292 * @@ -25674,19 +25961,19 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * */ - __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__31); - __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 292, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); /* "(tree fragment)":1 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_tuple__32 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -25769,16 +26056,16 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_4ncls_3src_6ncls32_NCLS32 = &__pyx_type_4ncls_3src_6ncls32_NCLS32; __pyx_vtabptr_4ncls_3src_6ncls32_NCLSIterator = &__pyx_vtable_4ncls_3src_6ncls32_NCLSIterator; __pyx_vtable_4ncls_3src_6ncls32_NCLSIterator.cnext = (int (*)(struct __pyx_obj_4ncls_3src_6ncls32_NCLSIterator *))__pyx_f_4ncls_3src_6ncls32_12NCLSIterator_cnext; - if (PyType_Ready(&__pyx_type_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 661, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 672, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_4ncls_3src_6ncls32_NCLSIterator.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4ncls_3src_6ncls32_NCLSIterator.tp_dictoffset && __pyx_type_4ncls_3src_6ncls32_NCLSIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4ncls_3src_6ncls32_NCLSIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4ncls_3src_6ncls32_NCLSIterator.tp_dict, __pyx_vtabptr_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 661, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NCLSIterator, (PyObject *)&__pyx_type_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 661, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 661, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4ncls_3src_6ncls32_NCLSIterator.tp_dict, __pyx_vtabptr_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NCLSIterator, (PyObject *)&__pyx_type_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 672, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4ncls_3src_6ncls32_NCLSIterator) < 0) __PYX_ERR(0, 672, __pyx_L1_error) __pyx_ptype_4ncls_3src_6ncls32_NCLSIterator = &__pyx_type_4ncls_3src_6ncls32_NCLSIterator; if (PyType_Ready(&__pyx_type_4ncls_3src_6ncls32___pyx_scope_struct____str__) < 0) __PYX_ERR(0, 328, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -26253,7 +26540,7 @@ if (!__Pyx_RefNanny) { * cdef strided = Enum("") # default * cdef indirect = Enum("") */ - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 286, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(generic); __Pyx_DECREF_SET(generic, __pyx_t_6); @@ -26267,7 +26554,7 @@ if (!__Pyx_RefNanny) { * cdef indirect = Enum("") * */ - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 287, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(strided); __Pyx_DECREF_SET(strided, __pyx_t_6); @@ -26281,7 +26568,7 @@ if (!__Pyx_RefNanny) { * * */ - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 288, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(indirect); __Pyx_DECREF_SET(indirect, __pyx_t_6); @@ -26295,7 +26582,7 @@ if (!__Pyx_RefNanny) { * cdef indirect_contiguous = Enum("") * */ - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 291, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(contiguous); __Pyx_DECREF_SET(contiguous, __pyx_t_6); @@ -26309,7 +26596,7 @@ if (!__Pyx_RefNanny) { * * */ - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 292, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(indirect_contiguous); __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_6); @@ -30305,6 +30592,112 @@ static int __Pyx_ValidateAndInit_memviewslice( } } +/* Print */ + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} +#else +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!__pyx_print)) { + __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); + if (!__pyx_print) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!__pyx_print_kwargs)) { + __pyx_print_kwargs = PyDict_New(); + if (unlikely(!__pyx_print_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = __pyx_print_kwargs; + } + result = PyObject_Call(__pyx_print, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != __pyx_print_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + /* MemviewSliceCopyTemplate */ static __Pyx_memviewslice __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, @@ -30939,6 +31332,43 @@ __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, return (long) -1; } +/* PrintOne */ + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} +#else +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} +#endif + /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; @@ -32225,6 +32655,29 @@ static int __pyx_Generator_init(void) { return 0; } +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int64_t(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG, + (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1, + &__Pyx_TypeInfo_nn_int64_t, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + /* ObjectToMemviewSlice */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_int32_t(PyObject *obj, int writable_flag) { __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; diff --git a/ncls/src/ncls32.pyx b/ncls/src/ncls32.pyx index f66af8f..eedd4a9 100644 --- a/ncls/src/ncls32.pyx +++ b/ncls/src/ncls32.pyx @@ -384,11 +384,11 @@ cdef class NCLS32: @cython.initializedcheck(False) cpdef set_difference_helper(self, const int32_t [::1] starts, const int32_t [::1] ends, const int64_t [::1] indexes): - cdef int i + cdef int i = 0 cdef int nhit = 0 cdef int nfound = 0 - cdef int nstart = 0 - cdef int nend = 0 + cdef int32_t nstart = 0 + cdef int32_t nend = 0 cdef int length = len(starts) cdef int loop_counter = 0 cdef int overlap_type_nb = 0 @@ -398,7 +398,7 @@ cdef class NCLS32: output_arr = np.zeros(length, dtype=np.int64) output_arr_start = np.zeros(length, dtype=np.int32) output_arr_end = np.zeros(length, dtype=np.int32) - cdef long [::1] output + cdef int64_t [::1] output cdef int32_t [::1] output_start cdef int32_t [::1] output_end @@ -412,28 +412,32 @@ cdef class NCLS32: if not self.im: # if empty return [], [], [] - it_alloc = cn.interval_iterator_alloc() it = it_alloc for loop_counter in range(length): while it: i = 0 - cn.find_intervals(it, starts[loop_counter], ends[loop_counter], self.im, self.ntop, - self.subheader, self.nlists, im_buf, 1024, - &(nhit), &(it)) # GET NEXT BUFFER CHUNK - - #print("nhits:", nhit) nstart = starts[loop_counter] nend = ends[loop_counter] + # print("----" * 5) + # print("loop counter", loop_counter) # print("nstart", nstart) # print("nend", nend) + cn.find_intervals(it, nstart, nend, self.im, self.ntop, + self.subheader, self.nlists, im_buf, 1024, + &(nhit), &(it)) # GET NEXT BUFFER CHUNK + + #print("nhits:", nhit) + + + if nfound + nhit >= length: - length = length * 2 + length = (nfound + nhit) * 2 output_arr = np.resize(output_arr, length) output_arr_start = np.resize(output_arr_start, length) output = output_arr @@ -441,6 +445,9 @@ cdef class NCLS32: output_arr_end = np.resize(output_arr_end, length) output_end = output_arr_end + # print(" length is", length) + # print(" nfound is", nfound) + # B covers whole of A; ignore if nhit == 1 and starts[loop_counter] > im_buf[i].start and ends[loop_counter] < im_buf[i].end: # print("ignore me!") @@ -451,10 +458,14 @@ cdef class NCLS32: nfound += 1 while i < nhit: + # print(" i", i) # print("--- i:", i) # print("--- im_buf[i]", im_buf[i]) - #print(" B start:", im_buf[i].start) - #print(" B end:", im_buf[i].end) + # print(" B start:", im_buf[i].start) + # print(" B end:", im_buf[i].end) + # print(" nfound:", nfound) + # print(" output_arr_start", output_arr_start) + # print(" output_arr_end", output_arr_end) # in case the start contributes nothing if i < nhit - 1: @@ -603,7 +614,7 @@ cdef class NCLS32: if nfound >= length: - length = length * 2 + length = nfound * 2 output_arr = np.resize(output_arr, length) output_arr_other = np.resize(output_arr_other, length) output = output_arr diff --git a/ncls/version.py b/ncls/version.py index 68baa3e..a15559f 100644 --- a/ncls/version.py +++ b/ncls/version.py @@ -1 +1 @@ -__version__ = "0.0.46" +__version__ = "0.0.47"