diff --git a/README.md b/README.md index 2c7b9d4..990fd0a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,13 @@ print(path.shape) # the anisotropic euclidean distance from the source to all labeled vertices. dist_field = dijkstra3d.euclidean_distance_field(field, source=(0,0,0), anisotropy=(4,4,40)) +# To make the EDF go faster add the free_space_radius parameter. It's only +# safe to use if you know that some distance around the source point +# is unobstructed space. For that region, we use an equation instead +# of dijkstra's algorithm. Hybrid algorithm! free_space_radius is a physical +# distance, meaning you must account for anisotropy in setting it. +dist_field = dijkstra3d.euclidean_distance_field(field, source=(0,0,0), anisotropy=(4,4,40), free_space_radius=300) + # Given a numerical field, for each directed edge from adjacent voxels A and B, # use B as the edge weight. In this fashion, compute the distance from a source # point for all finite voxels. @@ -82,7 +89,7 @@ float* field = dijkstra::euclidean_distance_field3d( labels, /*sx=*/512, /*sy=*/512, /*sz=*/512, /*wx=*/4, /*wy=*/4, /*wz=*/40, - source + source, /*free_space_radius=*/0 // set to > 0 to switch on ); float* field = dijkstra::distance_field3d(labels, /*sx=*/512, /*sy=*/512, /*sz=*/512, source); diff --git a/automated_test.py b/automated_test.py index 40fdd83..3d1becc 100644 --- a/automated_test.py +++ b/automated_test.py @@ -563,7 +563,8 @@ def test_distance_field_2d_asymmetric(dtype): field = dijkstra3d.distance_field(values, (0,1)) assert np.all(field == answer) -def test_euclidean_distance_field_2d(): +@pytest.mark.parametrize('free_space_radius', (0,1,2,3,4,5,10)) +def test_euclidean_distance_field_2d(free_space_radius): values = np.ones((2, 2), dtype=bool) sq2 = sqrt(2) @@ -574,7 +575,7 @@ def test_euclidean_distance_field_2d(): [1, sq2], ], dtype=np.float32) - field = dijkstra3d.euclidean_distance_field(values, (0,0)) + field = dijkstra3d.euclidean_distance_field(values, (0,0), free_space_radius=free_space_radius) assert np.all(np.abs(field - answer) < 0.00001) values = np.ones((5, 5), dtype=bool) @@ -587,7 +588,7 @@ def test_euclidean_distance_field_2d(): [4, 4.4142137 , 4.8284273, 5.2426405 , 5.656854 ]], dtype=np.float32) - field = dijkstra3d.euclidean_distance_field(values, (0,0,0), (1,1,1)) + field = dijkstra3d.euclidean_distance_field(values, (0,0,0), (1,1,1), free_space_radius=free_space_radius) assert np.all(np.abs(field - answer) < 0.00001) answer = np.array([ @@ -602,11 +603,11 @@ def test_euclidean_distance_field_2d(): ], dtype=np.float32) values = np.ones((2, 2, 2), dtype=bool) - field = dijkstra3d.euclidean_distance_field(values, (0,0,0), (1,1,1)) + field = dijkstra3d.euclidean_distance_field(values, (0,0,0), (1,1,1), free_space_radius=free_space_radius) assert np.all(np.abs(field - answer) < 0.00001) values = np.ones((2, 2, 2), dtype=bool) - field = dijkstra3d.euclidean_distance_field(values, (1,1,1), (1,1,1)) + field = dijkstra3d.euclidean_distance_field(values, (1,1,1), (1,1,1), free_space_radius=free_space_radius) answer = np.array([ [ @@ -621,6 +622,15 @@ def test_euclidean_distance_field_2d(): assert np.all(np.abs(field - answer) < 0.00001) +@pytest.mark.parametrize('point', (np.random.randint(0,256, size=(3,)),)) +def test_euclidean_distance_field_3d_free_space_eqn(point): + point = tuple(point) + print(point) + values = np.ones((256, 256, 256), dtype=bool) + field_dijk = dijkstra3d.euclidean_distance_field(values, point, free_space_radius=0) # free space off + field_free = dijkstra3d.euclidean_distance_field(values, point, free_space_radius=10000) # free space 100% on + + assert np.all(np.abs(field_free - field_dijk) < 0.001) # there's some difference below this def test_compass(): field = np.array([ diff --git a/dijkstra3d.cpp b/dijkstra3d.cpp index fa0fc2a..7f0450c 100644 --- a/dijkstra3d.cpp +++ b/dijkstra3d.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.15 */ +/* Generated by Cython 0.29.21 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,8 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_15" -#define CYTHON_HEX_VERSION 0x001D0FF0 +#define CYTHON_ABI "0_29_21" +#define CYTHON_HEX_VERSION 0x001D15F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -449,7 +449,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 @@ -498,8 +502,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -510,6 +516,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else @@ -549,7 +562,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif @@ -590,11 +603,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -968,7 +980,7 @@ typedef struct { #define __Pyx_FastGilFuncInit() -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":775 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -977,7 +989,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -986,7 +998,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -995,7 +1007,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1004,7 +1016,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":782 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1013,7 +1025,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1022,7 +1034,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1031,7 +1043,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1040,7 +1052,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":789 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1049,7 +1061,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1058,7 +1070,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1067,7 +1079,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -1076,7 +1088,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1085,7 +1097,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1094,7 +1106,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -1103,7 +1115,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1112,7 +1124,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":807 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1121,7 +1133,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1130,7 +1142,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":810 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1139,7 +1151,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1148,7 +1160,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1191,7 +1203,7 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":814 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1200,7 +1212,7 @@ struct __pyx_memoryviewslice_obj; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1209,7 +1221,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1218,7 +1230,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":818 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -1814,7 +1826,7 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1844,7 +1856,7 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1909,6 +1921,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -2658,6 +2673,7 @@ static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_arr_memviewfloat[] = "arr_memviewfloat"; static const char __pyx_k_execute_dijkstra[] = "_execute_dijkstra"; static const char __pyx_k_arr_memviewdouble[] = "arr_memviewdouble"; +static const char __pyx_k_free_space_radius[] = "free_space_radius"; static const char __pyx_k_path_from_parents[] = "path_from_parents"; static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; @@ -2802,6 +2818,7 @@ static PyObject *__pyx_n_s_float64; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_fortran; static PyObject *__pyx_n_u_fortran; +static PyObject *__pyx_n_s_free_space_radius; static PyObject *__pyx_n_s_frombuffer; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi; @@ -2920,13 +2937,13 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_parents, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_connectivity); /* proto */ -static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy); /* proto */ +static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy, PyObject *__pyx_v_free_space_radius); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_coord); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_dims, PyObject *__pyx_v_rows, PyObject *__pyx_v_cols); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_target, int __pyx_v_connectivity, PyObject *__pyx_v_bidirectional, PyObject *__pyx_v_compass, float __pyx_v_compass_norm); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source); /* proto */ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_connectivity); /* proto */ -static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy); /* proto */ +static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy, float __pyx_v_free_space_radius); /* proto */ static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */ static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ @@ -3047,7 +3064,7 @@ static PyObject *__pyx_codeobj__55; static PyObject *__pyx_codeobj__62; /* Late includes */ -/* "dijkstra3d.pyx":83 +/* "dijkstra3d.pyx":85 * ) * * def dijkstra( # <<<<<<<<<<<<<< @@ -3067,6 +3084,9 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject PyObject *__pyx_v_connectivity = 0; PyObject *__pyx_v_compass = 0; PyObject *__pyx_v_compass_norm = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dijkstra (wrapper)", 0); @@ -3074,7 +3094,7 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_source,&__pyx_n_s_target,&__pyx_n_s_bidirectional,&__pyx_n_s_connectivity,&__pyx_n_s_compass,&__pyx_n_s_compass_norm,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; - /* "dijkstra3d.pyx":85 + /* "dijkstra3d.pyx":87 * def dijkstra( * data, source, target, * bidirectional=False, connectivity=26, # <<<<<<<<<<<<<< @@ -3084,7 +3104,7 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject values[3] = ((PyObject *)Py_False); values[4] = ((PyObject *)__pyx_int_26); - /* "dijkstra3d.pyx":86 + /* "dijkstra3d.pyx":88 * data, source, target, * bidirectional=False, connectivity=26, * compass=False, compass_norm=-1 # <<<<<<<<<<<<<< @@ -3123,13 +3143,13 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("dijkstra", 0, 3, 7, 1); __PYX_ERR(0, 83, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("dijkstra", 0, 3, 7, 1); __PYX_ERR(0, 85, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("dijkstra", 0, 3, 7, 2); __PYX_ERR(0, 83, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("dijkstra", 0, 3, 7, 2); __PYX_ERR(0, 85, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -3157,7 +3177,7 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dijkstra") < 0)) __PYX_ERR(0, 83, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dijkstra") < 0)) __PYX_ERR(0, 85, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3186,7 +3206,7 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("dijkstra", 0, 3, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 83, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("dijkstra", 0, 3, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 85, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d.dijkstra", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3194,7 +3214,7 @@ static PyObject *__pyx_pw_10dijkstra3d_1dijkstra(PyObject *__pyx_self, PyObject __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_10dijkstra3d_dijkstra(__pyx_self, __pyx_v_data, __pyx_v_source, __pyx_v_target, __pyx_v_bidirectional, __pyx_v_connectivity, __pyx_v_compass, __pyx_v_compass_norm); - /* "dijkstra3d.pyx":83 + /* "dijkstra3d.pyx":85 * ) * * def dijkstra( # <<<<<<<<<<<<<< @@ -3226,29 +3246,32 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se size_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dijkstra", 0); __Pyx_INCREF(__pyx_v_data); __Pyx_INCREF(__pyx_v_source); __Pyx_INCREF(__pyx_v_target); __Pyx_INCREF(__pyx_v_connectivity); - /* "dijkstra3d.pyx":125 + /* "dijkstra3d.pyx":127 * source to target including source and target. * """ * dims = len(data.shape) # <<<<<<<<<<<<<< * if dims not in (2,3): * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dims = __pyx_t_1; __pyx_t_1 = 0; - /* "dijkstra3d.pyx":126 + /* "dijkstra3d.pyx":128 * """ * dims = len(data.shape) * if dims not in (2,3): # <<<<<<<<<<<<<< @@ -3257,18 +3280,18 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ __Pyx_INCREF(__pyx_v_dims); __pyx_t_1 = __pyx_v_dims; - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -3276,18 +3299,18 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_5 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_5)) { - /* "dijkstra3d.pyx":127 + /* "dijkstra3d.pyx":129 * dims = len(data.shape) * if dims not in (2,3): * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) # <<<<<<<<<<<<<< * * if dims == 2: */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_2D_and_3D_image_sources_are, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_2D_and_3D_image_sources_are, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -3303,14 +3326,14 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 127, __pyx_L1_error) + __PYX_ERR(0, 129, __pyx_L1_error) - /* "dijkstra3d.pyx":126 + /* "dijkstra3d.pyx":128 * """ * dims = len(data.shape) * if dims not in (2,3): # <<<<<<<<<<<<<< @@ -3319,33 +3342,33 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "dijkstra3d.pyx":129 + /* "dijkstra3d.pyx":131 * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) * * if dims == 2: # <<<<<<<<<<<<<< * if connectivity == 4: * connectivity = 6 */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":130 + /* "dijkstra3d.pyx":132 * * if dims == 2: * if connectivity == 4: # <<<<<<<<<<<<<< * connectivity = 6 * elif connectivity == 8: */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":131 + /* "dijkstra3d.pyx":133 * if dims == 2: * if connectivity == 4: * connectivity = 6 # <<<<<<<<<<<<<< @@ -3355,7 +3378,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_int_6); __Pyx_DECREF_SET(__pyx_v_connectivity, __pyx_int_6); - /* "dijkstra3d.pyx":130 + /* "dijkstra3d.pyx":132 * * if dims == 2: * if connectivity == 4: # <<<<<<<<<<<<<< @@ -3365,20 +3388,20 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L7; } - /* "dijkstra3d.pyx":132 + /* "dijkstra3d.pyx":134 * if connectivity == 4: * connectivity = 6 * elif connectivity == 8: # <<<<<<<<<<<<<< * connectivity = 18 # or 26 but 18 might be faster * */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_8, 8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_8, 8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":133 + /* "dijkstra3d.pyx":135 * connectivity = 6 * elif connectivity == 8: * connectivity = 18 # or 26 but 18 might be faster # <<<<<<<<<<<<<< @@ -3388,7 +3411,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_int_18); __Pyx_DECREF_SET(__pyx_v_connectivity, __pyx_int_18); - /* "dijkstra3d.pyx":132 + /* "dijkstra3d.pyx":134 * if connectivity == 4: * connectivity = 6 * elif connectivity == 8: # <<<<<<<<<<<<<< @@ -3398,7 +3421,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L7:; - /* "dijkstra3d.pyx":129 + /* "dijkstra3d.pyx":131 * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) * * if dims == 2: # <<<<<<<<<<<<<< @@ -3407,7 +3430,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "dijkstra3d.pyx":135 + /* "dijkstra3d.pyx":137 * connectivity = 18 # or 26 but 18 might be faster * * if connectivity not in (6, 18, 26): # <<<<<<<<<<<<<< @@ -3416,27 +3439,27 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ __Pyx_INCREF(__pyx_v_connectivity); __pyx_t_1 = __pyx_v_connectivity; - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { } else { __pyx_t_5 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_18, 18, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_18, 18, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { } else { __pyx_t_5 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_26, 26, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_26, 26, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_3; __pyx_L9_bool_binop_done:; @@ -3444,34 +3467,34 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_3 = (__pyx_t_5 != 0); if (unlikely(__pyx_t_3)) { - /* "dijkstra3d.pyx":137 + /* "dijkstra3d.pyx":139 * if connectivity not in (6, 18, 26): * raise ValueError( * "Only 6, 18, and 26 connectivities are supported. Got: " + str(connectivity) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_connectivity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_connectivity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_6_18_and_26_connectivities, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_6_18_and_26_connectivities, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":136 + /* "dijkstra3d.pyx":138 * * if connectivity not in (6, 18, 26): * raise ValueError( # <<<<<<<<<<<<<< * "Only 6, 18, and 26 connectivities are supported. Got: " + str(connectivity) * ) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 136, __pyx_L1_error) + __PYX_ERR(0, 138, __pyx_L1_error) - /* "dijkstra3d.pyx":135 + /* "dijkstra3d.pyx":137 * connectivity = 18 # or 26 but 18 might be faster * * if connectivity not in (6, 18, 26): # <<<<<<<<<<<<<< @@ -3480,23 +3503,23 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "dijkstra3d.pyx":140 + /* "dijkstra3d.pyx":142 * ) * * if data.size == 0: # <<<<<<<<<<<<<< * return np.zeros(shape=(0,), dtype=np.uint32, order='F') * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":141 + /* "dijkstra3d.pyx":143 * * if data.size == 0: * return np.zeros(shape=(0,), dtype=np.uint32, order='F') # <<<<<<<<<<<<<< @@ -3504,23 +3527,23 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se * _validate_coord(data, source) */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 141, __pyx_L1_error) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 141, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -3528,7 +3551,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_6 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":140 + /* "dijkstra3d.pyx":142 * ) * * if data.size == 0: # <<<<<<<<<<<<<< @@ -3537,14 +3560,14 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "dijkstra3d.pyx":143 + /* "dijkstra3d.pyx":145 * return np.zeros(shape=(0,), dtype=np.uint32, order='F') * * _validate_coord(data, source) # <<<<<<<<<<<<<< * _validate_coord(data, target) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; __pyx_t_8 = 0; @@ -3561,7 +3584,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -3569,13 +3592,13 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -3586,21 +3609,21 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_source); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":144 + /* "dijkstra3d.pyx":146 * * _validate_coord(data, source) * _validate_coord(data, target) # <<<<<<<<<<<<<< * * if dims == 2: */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -3617,7 +3640,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_data, __pyx_v_target}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else @@ -3625,13 +3648,13 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_data, __pyx_v_target}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -3642,39 +3665,39 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_v_target); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":146 + /* "dijkstra3d.pyx":148 * _validate_coord(data, target) * * if dims == 2: # <<<<<<<<<<<<<< * data = data[:, :, np.newaxis] * source = list(source) + [ 0 ] */ - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":147 + /* "dijkstra3d.pyx":149 * * if dims == 2: * data = data[:, :, np.newaxis] # <<<<<<<<<<<<<< * source = list(source) + [ 0 ] * target = list(target) + [ 0 ] */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -3685,55 +3708,55 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":148 + /* "dijkstra3d.pyx":150 * if dims == 2: * data = data[:, :, np.newaxis] * source = list(source) + [ 0 ] # <<<<<<<<<<<<<< * target = list(target) + [ 0 ] * */ - __pyx_t_4 = PySequence_List(__pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_v_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); - __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":149 + /* "dijkstra3d.pyx":151 * data = data[:, :, np.newaxis] * source = list(source) + [ 0 ] * target = list(target) + [ 0 ] # <<<<<<<<<<<<<< * * data = np.asfortranarray(data) */ - __pyx_t_1 = PySequence_List(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); - __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":146 + /* "dijkstra3d.pyx":148 * _validate_coord(data, target) * * if dims == 2: # <<<<<<<<<<<<<< @@ -3742,16 +3765,16 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "dijkstra3d.pyx":151 + /* "dijkstra3d.pyx":153 * target = list(target) + [ 0 ] * * data = np.asfortranarray(data) # <<<<<<<<<<<<<< * * cdef size_t cols = data.shape[0] */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -3766,71 +3789,71 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":153 + /* "dijkstra3d.pyx":155 * data = np.asfortranarray(data) * * cdef size_t cols = data.shape[0] # <<<<<<<<<<<<<< * cdef size_t rows = data.shape[1] * cdef size_t depth = data.shape[2] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cols = __pyx_t_9; - /* "dijkstra3d.pyx":154 + /* "dijkstra3d.pyx":156 * * cdef size_t cols = data.shape[0] * cdef size_t rows = data.shape[1] # <<<<<<<<<<<<<< * cdef size_t depth = data.shape[2] * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_rows = __pyx_t_9; - /* "dijkstra3d.pyx":155 + /* "dijkstra3d.pyx":157 * cdef size_t cols = data.shape[0] * cdef size_t rows = data.shape[1] * cdef size_t depth = data.shape[2] # <<<<<<<<<<<<<< * * path = _execute_dijkstra( */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_depth = __pyx_t_9; - /* "dijkstra3d.pyx":157 + /* "dijkstra3d.pyx":159 * cdef size_t depth = data.shape[2] * * path = _execute_dijkstra( # <<<<<<<<<<<<<< * data, source, target, connectivity, * bidirectional, compass, compass_norm */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_execute_dijkstra); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_execute_dijkstra); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "dijkstra3d.pyx":159 + /* "dijkstra3d.pyx":161 * path = _execute_dijkstra( * data, source, target, connectivity, * bidirectional, compass, compass_norm # <<<<<<<<<<<<<< @@ -3852,7 +3875,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[8] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_target, __pyx_v_connectivity, __pyx_v_bidirectional, __pyx_v_compass, __pyx_v_compass_norm}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 7+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 7+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -3860,13 +3883,13 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[8] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_target, __pyx_v_connectivity, __pyx_v_bidirectional, __pyx_v_compass, __pyx_v_compass_norm}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 7+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 7+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(7+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(7+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -3892,7 +3915,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_v_compass_norm); __Pyx_GIVEREF(__pyx_v_compass_norm); PyTuple_SET_ITEM(__pyx_t_7, 6+__pyx_t_8, __pyx_v_compass_norm); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -3900,7 +3923,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __pyx_v_path = __pyx_t_1; __pyx_t_1 = 0; - /* "dijkstra3d.pyx":162 + /* "dijkstra3d.pyx":164 * ) * * return _path_to_point_cloud(path, dims, rows, cols) # <<<<<<<<<<<<<< @@ -3908,11 +3931,11 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se * def distance_field(data, source): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_path_to_point_cloud); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_path_to_point_cloud); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_rows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_rows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_cols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_cols); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = NULL; __pyx_t_8 = 0; @@ -3929,7 +3952,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_path, __pyx_v_dims, __pyx_t_7, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -3939,7 +3962,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_path, __pyx_v_dims, __pyx_t_7, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -3947,7 +3970,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se } else #endif { - __pyx_t_11 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -3964,7 +3987,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_8, __pyx_t_6); __pyx_t_7 = 0; __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } @@ -3973,7 +3996,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_1 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":83 + /* "dijkstra3d.pyx":85 * ) * * def dijkstra( # <<<<<<<<<<<<<< @@ -4003,7 +4026,7 @@ static PyObject *__pyx_pf_10dijkstra3d_dijkstra(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "dijkstra3d.pyx":164 +/* "dijkstra3d.pyx":166 * return _path_to_point_cloud(path, dims, rows, cols) * * def distance_field(data, source): # <<<<<<<<<<<<<< @@ -4018,6 +4041,9 @@ static PyMethodDef __pyx_mdef_10dijkstra3d_3distance_field = {"distance_field", static PyObject *__pyx_pw_10dijkstra3d_3distance_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_source = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance_field (wrapper)", 0); @@ -4044,11 +4070,11 @@ static PyObject *__pyx_pw_10dijkstra3d_3distance_field(PyObject *__pyx_self, PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("distance_field", 1, 2, 2, 1); __PYX_ERR(0, 164, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("distance_field", 1, 2, 2, 1); __PYX_ERR(0, 166, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance_field") < 0)) __PYX_ERR(0, 164, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "distance_field") < 0)) __PYX_ERR(0, 166, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4061,7 +4087,7 @@ static PyObject *__pyx_pw_10dijkstra3d_3distance_field(PyObject *__pyx_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("distance_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 164, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("distance_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 166, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d.distance_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4087,27 +4113,30 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance_field", 0); __Pyx_INCREF(__pyx_v_data); __Pyx_INCREF(__pyx_v_source); - /* "dijkstra3d.pyx":185 + /* "dijkstra3d.pyx":187 * containing its distance from the source voxel. * """ * dims = len(data.shape) # <<<<<<<<<<<<<< * if dims not in (2,3): * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dims = __pyx_t_1; __pyx_t_1 = 0; - /* "dijkstra3d.pyx":186 + /* "dijkstra3d.pyx":188 * """ * dims = len(data.shape) * if dims not in (2,3): # <<<<<<<<<<<<<< @@ -4116,18 +4145,18 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ __Pyx_INCREF(__pyx_v_dims); __pyx_t_1 = __pyx_v_dims; - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -4135,18 +4164,18 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __pyx_t_5 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_5)) { - /* "dijkstra3d.pyx":187 + /* "dijkstra3d.pyx":189 * dims = len(data.shape) * if dims not in (2,3): * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) # <<<<<<<<<<<<<< * * if data.size == 0: */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_2D_and_3D_image_sources_are, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_2D_and_3D_image_sources_are, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -4162,14 +4191,14 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 187, __pyx_L1_error) + __PYX_ERR(0, 189, __pyx_L1_error) - /* "dijkstra3d.pyx":186 + /* "dijkstra3d.pyx":188 * """ * dims = len(data.shape) * if dims not in (2,3): # <<<<<<<<<<<<<< @@ -4178,23 +4207,23 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":189 + /* "dijkstra3d.pyx":191 * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) * * if data.size == 0: # <<<<<<<<<<<<<< * return np.zeros(shape=(0,), dtype=np.float32) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":190 + /* "dijkstra3d.pyx":192 * * if data.size == 0: * return np.zeros(shape=(0,), dtype=np.float32) # <<<<<<<<<<<<<< @@ -4202,22 +4231,22 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ * if dims == 1: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4225,7 +4254,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __pyx_t_6 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":189 + /* "dijkstra3d.pyx":191 * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) * * if data.size == 0: # <<<<<<<<<<<<<< @@ -4234,37 +4263,37 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":192 + /* "dijkstra3d.pyx":194 * return np.zeros(shape=(0,), dtype=np.float32) * * if dims == 1: # <<<<<<<<<<<<<< * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) */ - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":193 + /* "dijkstra3d.pyx":195 * * if dims == 1: * data = data[:, np.newaxis, np.newaxis] # <<<<<<<<<<<<<< * source = ( source[0], 0, 0 ) * if dims == 2: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -4275,22 +4304,22 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":194 + /* "dijkstra3d.pyx":196 * if dims == 1: * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) # <<<<<<<<<<<<<< * if dims == 2: * data = data[:, :, np.newaxis] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); @@ -4304,7 +4333,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":192 + /* "dijkstra3d.pyx":194 * return np.zeros(shape=(0,), dtype=np.float32) * * if dims == 1: # <<<<<<<<<<<<<< @@ -4313,32 +4342,32 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":195 + /* "dijkstra3d.pyx":197 * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) * if dims == 2: # <<<<<<<<<<<<<< * data = data[:, :, np.newaxis] * source = ( source[0], source[1], 0 ) */ - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":196 + /* "dijkstra3d.pyx":198 * source = ( source[0], 0, 0 ) * if dims == 2: * data = data[:, :, np.newaxis] # <<<<<<<<<<<<<< * source = ( source[0], source[1], 0 ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -4349,24 +4378,24 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":197 + /* "dijkstra3d.pyx":199 * if dims == 2: * data = data[:, :, np.newaxis] * source = ( source[0], source[1], 0 ) # <<<<<<<<<<<<<< * * _validate_coord(data, source) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -4380,7 +4409,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":195 + /* "dijkstra3d.pyx":197 * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) * if dims == 2: # <<<<<<<<<<<<<< @@ -4389,14 +4418,14 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":199 + /* "dijkstra3d.pyx":201 * source = ( source[0], source[1], 0 ) * * _validate_coord(data, source) # <<<<<<<<<<<<<< * * data = np.asfortranarray(data) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_8 = 0; @@ -4413,7 +4442,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -4421,13 +4450,13 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -4438,23 +4467,23 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_source); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":201 + /* "dijkstra3d.pyx":203 * _validate_coord(data, source) * * data = np.asfortranarray(data) # <<<<<<<<<<<<<< * * field = _execute_distance_field(data, source) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -4469,20 +4498,20 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":203 + /* "dijkstra3d.pyx":205 * data = np.asfortranarray(data) * * field = _execute_distance_field(data, source) # <<<<<<<<<<<<<< * if dims < 3: * field = np.squeeze(field, axis=2) */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_execute_distance_field); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_execute_distance_field); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_8 = 0; @@ -4499,7 +4528,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_data, __pyx_v_source}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -4507,13 +4536,13 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_data, __pyx_v_source}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -4524,7 +4553,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_v_source); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -4532,39 +4561,39 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __pyx_v_field = __pyx_t_4; __pyx_t_4 = 0; - /* "dijkstra3d.pyx":204 + /* "dijkstra3d.pyx":206 * * field = _execute_distance_field(data, source) * if dims < 3: # <<<<<<<<<<<<<< * field = np.squeeze(field, axis=2) * if dims < 2: */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":205 + /* "dijkstra3d.pyx":207 * field = _execute_distance_field(data, source) * if dims < 3: * field = np.squeeze(field, axis=2) # <<<<<<<<<<<<<< * if dims < 2: * field = np.squeeze(field, axis=1) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_field); - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 205, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4572,7 +4601,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":204 + /* "dijkstra3d.pyx":206 * * field = _execute_distance_field(data, source) * if dims < 3: # <<<<<<<<<<<<<< @@ -4581,39 +4610,39 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":206 + /* "dijkstra3d.pyx":208 * if dims < 3: * field = np.squeeze(field, axis=2) * if dims < 2: # <<<<<<<<<<<<<< * field = np.squeeze(field, axis=1) * */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 206, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":207 + /* "dijkstra3d.pyx":209 * field = np.squeeze(field, axis=2) * if dims < 2: * field = np.squeeze(field, axis=1) # <<<<<<<<<<<<<< * * return field */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_field); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -4621,7 +4650,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_7); __pyx_t_7 = 0; - /* "dijkstra3d.pyx":206 + /* "dijkstra3d.pyx":208 * if dims < 3: * field = np.squeeze(field, axis=2) * if dims < 2: # <<<<<<<<<<<<<< @@ -4630,7 +4659,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":209 + /* "dijkstra3d.pyx":211 * field = np.squeeze(field, axis=1) * * return field # <<<<<<<<<<<<<< @@ -4642,7 +4671,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ __pyx_r = __pyx_v_field; goto __pyx_L0; - /* "dijkstra3d.pyx":164 + /* "dijkstra3d.pyx":166 * return _path_to_point_cloud(path, dims, rows, cols) * * def distance_field(data, source): # <<<<<<<<<<<<<< @@ -4668,7 +4697,7 @@ static PyObject *__pyx_pf_10dijkstra3d_2distance_field(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "dijkstra3d.pyx":211 +/* "dijkstra3d.pyx":213 * return field * * def path_from_parents(parents, target): # <<<<<<<<<<<<<< @@ -4682,6 +4711,9 @@ static PyMethodDef __pyx_mdef_10dijkstra3d_5path_from_parents = {"path_from_pare static PyObject *__pyx_pw_10dijkstra3d_5path_from_parents(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_parents = 0; PyObject *__pyx_v_target = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("path_from_parents (wrapper)", 0); @@ -4708,11 +4740,11 @@ static PyObject *__pyx_pw_10dijkstra3d_5path_from_parents(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("path_from_parents", 1, 2, 2, 1); __PYX_ERR(0, 211, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("path_from_parents", 1, 2, 2, 1); __PYX_ERR(0, 213, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "path_from_parents") < 0)) __PYX_ERR(0, 211, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "path_from_parents") < 0)) __PYX_ERR(0, 213, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4725,7 +4757,7 @@ static PyObject *__pyx_pw_10dijkstra3d_5path_from_parents(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("path_from_parents", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 211, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("path_from_parents", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 213, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d.path_from_parents", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4771,131 +4803,131 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject struct __pyx_array_obj *__pyx_t_14 = NULL; __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_17; - Py_ssize_t __pyx_t_18; - Py_ssize_t __pyx_t_19; - __Pyx_memviewslice __pyx_t_20 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("path_from_parents", 0); - /* "dijkstra3d.pyx":212 + /* "dijkstra3d.pyx":214 * * def path_from_parents(parents, target): * cdef size_t sx = parents.shape[0] # <<<<<<<<<<<<<< * cdef size_t sy = parents.shape[1] * cdef size_t sz = parents.shape[2] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sx = __pyx_t_3; - /* "dijkstra3d.pyx":213 + /* "dijkstra3d.pyx":215 * def path_from_parents(parents, target): * cdef size_t sx = parents.shape[0] * cdef size_t sy = parents.shape[1] # <<<<<<<<<<<<<< * cdef size_t sz = parents.shape[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sy = __pyx_t_3; - /* "dijkstra3d.pyx":214 + /* "dijkstra3d.pyx":216 * cdef size_t sx = parents.shape[0] * cdef size_t sy = parents.shape[1] * cdef size_t sz = parents.shape[2] # <<<<<<<<<<<<<< * * cdef size_t targ = target[0] + sx * (target[1] + sy * target[2]) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sz = __pyx_t_3; - /* "dijkstra3d.pyx":216 + /* "dijkstra3d.pyx":218 * cdef size_t sz = parents.shape[2] * * cdef size_t targ = target[0] + sx * (target[1] + sy * target[2]) # <<<<<<<<<<<<<< * * cdef uint32_t[:,:,:] arr_memview32 */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_targ = __pyx_t_3; - /* "dijkstra3d.pyx":228 + /* "dijkstra3d.pyx":230 * cdef uint64_t[:] vec_view64 * * if parents.dtype == np.uint64: # <<<<<<<<<<<<<< * arr_memview64 = parents * path64 = query_shortest_path[uint64_t](&arr_memview64[0,0,0], targ) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_parents, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":229 + /* "dijkstra3d.pyx":231 * * if parents.dtype == np.uint64: * arr_memview64 = parents # <<<<<<<<<<<<<< * path64 = query_shortest_path[uint64_t](&arr_memview64[0,0,0], targ) * path_ptr64 = &path64[0] */ - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_v_parents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 229, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_v_parents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 231, __pyx_L1_error) __pyx_v_arr_memview64 = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "dijkstra3d.pyx":230 + /* "dijkstra3d.pyx":232 * if parents.dtype == np.uint64: * arr_memview64 = parents * path64 = query_shortest_path[uint64_t](&arr_memview64[0,0,0], targ) # <<<<<<<<<<<<<< @@ -4920,11 +4952,11 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 230, __pyx_L1_error) + __PYX_ERR(0, 232, __pyx_L1_error) } __pyx_v_path64 = ((std::vector )dijkstra::query_shortest_path((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_10 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_targ)); - /* "dijkstra3d.pyx":231 + /* "dijkstra3d.pyx":233 * arr_memview64 = parents * path64 = query_shortest_path[uint64_t](&arr_memview64[0,0,0], targ) * path_ptr64 = &path64[0] # <<<<<<<<<<<<<< @@ -4933,7 +4965,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject */ __pyx_v_path_ptr64 = ((uint64_t *)(&(__pyx_v_path64[0]))); - /* "dijkstra3d.pyx":232 + /* "dijkstra3d.pyx":234 * path64 = query_shortest_path[uint64_t](&arr_memview64[0,0,0], targ) * path_ptr64 = &path64[0] * vec_view64 = path_ptr64 # <<<<<<<<<<<<<< @@ -4942,77 +4974,76 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject */ if (!__pyx_v_path_ptr64) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); - __PYX_ERR(0, 232, __pyx_L1_error) + __PYX_ERR(0, 234, __pyx_L1_error) } - __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint64_t); - __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_path64.size())); - if (unlikely(!__pyx_t_2 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint64_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_path64.size())); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_14 = __pyx_array_new(__pyx_t_7, sizeof(uint64_t), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_v_path_ptr64); - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 232, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(((PyObject *)__pyx_t_14), PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(((PyObject *)__pyx_t_14), PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; __pyx_v_vec_view64 = __pyx_t_15; __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL; - /* "dijkstra3d.pyx":233 + /* "dijkstra3d.pyx":235 * path_ptr64 = &path64[0] * vec_view64 = path_ptr64 * buf = bytearray(vec_view64[:]) # <<<<<<<<<<<<<< * numpy_path = np.frombuffer(buf, dtype=np.uint64)[::-1] * else: */ - __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_vec_view64, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_vec_view64, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_buf = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "dijkstra3d.pyx":234 + /* "dijkstra3d.pyx":236 * vec_view64 = path_ptr64 * buf = bytearray(vec_view64[:]) * numpy_path = np.frombuffer(buf, dtype=np.uint64)[::-1] # <<<<<<<<<<<<<< * else: * arr_memview32 = parents */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_buf); - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 234, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_slice__3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_slice__3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_numpy_path = __pyx_t_6; __pyx_t_6 = 0; - /* "dijkstra3d.pyx":228 + /* "dijkstra3d.pyx":230 * cdef uint64_t[:] vec_view64 * * if parents.dtype == np.uint64: # <<<<<<<<<<<<<< @@ -5022,7 +5053,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject goto __pyx_L3; } - /* "dijkstra3d.pyx":236 + /* "dijkstra3d.pyx":238 * numpy_path = np.frombuffer(buf, dtype=np.uint64)[::-1] * else: * arr_memview32 = parents # <<<<<<<<<<<<<< @@ -5030,41 +5061,41 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject * path_ptr32 = &path32[0] */ /*else*/ { - __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_v_parents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_v_parents, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 238, __pyx_L1_error) __pyx_v_arr_memview32 = __pyx_t_16; __pyx_t_16.memview = NULL; __pyx_t_16.data = NULL; - /* "dijkstra3d.pyx":237 + /* "dijkstra3d.pyx":239 * else: * arr_memview32 = parents * path32 = query_shortest_path[uint32_t](&arr_memview32[0,0,0], targ) # <<<<<<<<<<<<<< * path_ptr32 = &path32[0] * vec_view32 = path_ptr32 */ - __pyx_t_17 = 0; - __pyx_t_18 = 0; - __pyx_t_19 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_17 < 0) { - __pyx_t_17 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_18 < 0) { - __pyx_t_18 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 237, __pyx_L1_error) + __PYX_ERR(0, 239, __pyx_L1_error) } - __pyx_v_path32 = ((std::vector )dijkstra::query_shortest_path((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_17 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_18 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_targ)); + __pyx_v_path32 = ((std::vector )dijkstra::query_shortest_path((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_12 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_targ)); - /* "dijkstra3d.pyx":238 + /* "dijkstra3d.pyx":240 * arr_memview32 = parents * path32 = query_shortest_path[uint32_t](&arr_memview32[0,0,0], targ) * path_ptr32 = &path32[0] # <<<<<<<<<<<<<< @@ -5073,7 +5104,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject */ __pyx_v_path_ptr32 = ((uint32_t *)(&(__pyx_v_path32[0]))); - /* "dijkstra3d.pyx":239 + /* "dijkstra3d.pyx":241 * path32 = query_shortest_path[uint32_t](&arr_memview32[0,0,0], targ) * path_ptr32 = &path32[0] * vec_view32 = path_ptr32 # <<<<<<<<<<<<<< @@ -5082,71 +5113,70 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject */ if (!__pyx_v_path_ptr32) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); - __PYX_ERR(0, 239, __pyx_L1_error) + __PYX_ERR(0, 241, __pyx_L1_error) } - __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint32_t); - __pyx_t_6 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_path32.size())); - if (unlikely(!__pyx_t_4 || !__pyx_t_6 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint32_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_path32.size())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = __pyx_array_new(__pyx_t_6, sizeof(uint32_t), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_v_path_ptr32); - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 239, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_20 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(((PyObject *)__pyx_t_14), PyBUF_WRITABLE); if (unlikely(!__pyx_t_20.memview)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(((PyObject *)__pyx_t_14), PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0; - __pyx_v_vec_view32 = __pyx_t_20; - __pyx_t_20.memview = NULL; - __pyx_t_20.data = NULL; + __pyx_v_vec_view32 = __pyx_t_17; + __pyx_t_17.memview = NULL; + __pyx_t_17.data = NULL; - /* "dijkstra3d.pyx":240 + /* "dijkstra3d.pyx":242 * path_ptr32 = &path32[0] * vec_view32 = path_ptr32 * buf = bytearray(vec_view32[:]) # <<<<<<<<<<<<<< * numpy_path = np.frombuffer(buf, dtype=np.uint32)[::-1] * */ - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_vec_view32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_vec_view32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_buf = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":241 + /* "dijkstra3d.pyx":243 * vec_view32 = path_ptr32 * buf = bytearray(vec_view32[:]) * numpy_path = np.frombuffer(buf, dtype=np.uint32)[::-1] # <<<<<<<<<<<<<< * * return _path_to_point_cloud(numpy_path, 3, sy, sx) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_buf); - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 241, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_slice__3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_slice__3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_numpy_path = __pyx_t_7; @@ -5154,7 +5184,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject } __pyx_L3:; - /* "dijkstra3d.pyx":243 + /* "dijkstra3d.pyx":245 * numpy_path = np.frombuffer(buf, dtype=np.uint32)[::-1] * * return _path_to_point_cloud(numpy_path, 3, sy, sx) # <<<<<<<<<<<<<< @@ -5162,11 +5192,11 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject * def parental_field(data, source, connectivity=26): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_path_to_point_cloud); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_path_to_point_cloud); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; __pyx_t_13 = 0; @@ -5183,7 +5213,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_numpy_path, __pyx_int_3, __pyx_t_6, __pyx_t_4}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -5193,7 +5223,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_numpy_path, __pyx_int_3, __pyx_t_6, __pyx_t_4}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -5201,7 +5231,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject } else #endif { - __pyx_t_5 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -5218,7 +5248,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_13, __pyx_t_4); __pyx_t_6 = 0; __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -5227,7 +5257,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject __pyx_t_7 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":211 + /* "dijkstra3d.pyx":213 * return field * * def path_from_parents(parents, target): # <<<<<<<<<<<<<< @@ -5247,7 +5277,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject __Pyx_XDECREF(((PyObject *)__pyx_t_14)); __PYX_XDEC_MEMVIEW(&__pyx_t_15, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_20, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1); __Pyx_AddTraceback("dijkstra3d.path_from_parents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -5262,7 +5292,7 @@ static PyObject *__pyx_pf_10dijkstra3d_4path_from_parents(CYTHON_UNUSED PyObject return __pyx_r; } -/* "dijkstra3d.pyx":245 +/* "dijkstra3d.pyx":247 * return _path_to_point_cloud(numpy_path, 3, sy, sx) * * def parental_field(data, source, connectivity=26): # <<<<<<<<<<<<<< @@ -5278,6 +5308,9 @@ static PyObject *__pyx_pw_10dijkstra3d_7parental_field(PyObject *__pyx_self, PyO PyObject *__pyx_v_data = 0; PyObject *__pyx_v_source = 0; PyObject *__pyx_v_connectivity = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parental_field (wrapper)", 0); @@ -5307,7 +5340,7 @@ static PyObject *__pyx_pw_10dijkstra3d_7parental_field(PyObject *__pyx_self, PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("parental_field", 0, 2, 3, 1); __PYX_ERR(0, 245, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parental_field", 0, 2, 3, 1); __PYX_ERR(0, 247, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -5317,7 +5350,7 @@ static PyObject *__pyx_pw_10dijkstra3d_7parental_field(PyObject *__pyx_self, PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parental_field") < 0)) __PYX_ERR(0, 245, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parental_field") < 0)) __PYX_ERR(0, 247, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5335,7 +5368,7 @@ static PyObject *__pyx_pw_10dijkstra3d_7parental_field(PyObject *__pyx_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parental_field", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 245, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parental_field", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 247, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d.parental_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5361,28 +5394,31 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parental_field", 0); __Pyx_INCREF(__pyx_v_data); __Pyx_INCREF(__pyx_v_source); __Pyx_INCREF(__pyx_v_connectivity); - /* "dijkstra3d.pyx":267 + /* "dijkstra3d.pyx":269 * of a path has index 0. * """ * dims = len(data.shape) # <<<<<<<<<<<<<< * if dims not in (2,3): * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dims = __pyx_t_1; __pyx_t_1 = 0; - /* "dijkstra3d.pyx":268 + /* "dijkstra3d.pyx":270 * """ * dims = len(data.shape) * if dims not in (2,3): # <<<<<<<<<<<<<< @@ -5391,18 +5427,18 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ __Pyx_INCREF(__pyx_v_dims); __pyx_t_1 = __pyx_v_dims; - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -5410,18 +5446,18 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __pyx_t_5 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_5)) { - /* "dijkstra3d.pyx":269 + /* "dijkstra3d.pyx":271 * dims = len(data.shape) * if dims not in (2,3): * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) # <<<<<<<<<<<<<< * * if dims == 2: */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_DimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_2D_and_3D_image_sources_are, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_2D_and_3D_image_sources_are, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -5437,14 +5473,14 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 269, __pyx_L1_error) + __PYX_ERR(0, 271, __pyx_L1_error) - /* "dijkstra3d.pyx":268 + /* "dijkstra3d.pyx":270 * """ * dims = len(data.shape) * if dims not in (2,3): # <<<<<<<<<<<<<< @@ -5453,33 +5489,33 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":271 + /* "dijkstra3d.pyx":273 * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) * * if dims == 2: # <<<<<<<<<<<<<< * if connectivity == 4: * connectivity = 6 */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":272 + /* "dijkstra3d.pyx":274 * * if dims == 2: * if connectivity == 4: # <<<<<<<<<<<<<< * connectivity = 6 * elif connectivity == 8: */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":273 + /* "dijkstra3d.pyx":275 * if dims == 2: * if connectivity == 4: * connectivity = 6 # <<<<<<<<<<<<<< @@ -5489,7 +5525,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_int_6); __Pyx_DECREF_SET(__pyx_v_connectivity, __pyx_int_6); - /* "dijkstra3d.pyx":272 + /* "dijkstra3d.pyx":274 * * if dims == 2: * if connectivity == 4: # <<<<<<<<<<<<<< @@ -5499,20 +5535,20 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ goto __pyx_L7; } - /* "dijkstra3d.pyx":274 + /* "dijkstra3d.pyx":276 * if connectivity == 4: * connectivity = 6 * elif connectivity == 8: # <<<<<<<<<<<<<< * connectivity = 18 # or 26 but 18 might be faster * */ - __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_8, 8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_connectivity, __pyx_int_8, 8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "dijkstra3d.pyx":275 + /* "dijkstra3d.pyx":277 * connectivity = 6 * elif connectivity == 8: * connectivity = 18 # or 26 but 18 might be faster # <<<<<<<<<<<<<< @@ -5522,7 +5558,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_int_18); __Pyx_DECREF_SET(__pyx_v_connectivity, __pyx_int_18); - /* "dijkstra3d.pyx":274 + /* "dijkstra3d.pyx":276 * if connectivity == 4: * connectivity = 6 * elif connectivity == 8: # <<<<<<<<<<<<<< @@ -5532,7 +5568,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ } __pyx_L7:; - /* "dijkstra3d.pyx":271 + /* "dijkstra3d.pyx":273 * raise DimensionError("Only 2D and 3D image sources are supported. Got: " + str(dims)) * * if dims == 2: # <<<<<<<<<<<<<< @@ -5541,7 +5577,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":277 + /* "dijkstra3d.pyx":279 * connectivity = 18 # or 26 but 18 might be faster * * if connectivity not in (6,18,26): # <<<<<<<<<<<<<< @@ -5550,27 +5586,27 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ __Pyx_INCREF(__pyx_v_connectivity); __pyx_t_1 = __pyx_v_connectivity; - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { } else { __pyx_t_5 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_18, 18, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_18, 18, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { } else { __pyx_t_5 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_26, 26, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_26, 26, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_3; __pyx_L9_bool_binop_done:; @@ -5578,34 +5614,34 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __pyx_t_3 = (__pyx_t_5 != 0); if (unlikely(__pyx_t_3)) { - /* "dijkstra3d.pyx":279 + /* "dijkstra3d.pyx":281 * if connectivity not in (6,18,26): * raise ValueError( * "Only 6, 18, and 26 connectivities are supported. Got: " + str(connectivity) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_connectivity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_connectivity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_6_18_and_26_connectivities, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Only_6_18_and_26_connectivities, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":278 + /* "dijkstra3d.pyx":280 * * if connectivity not in (6,18,26): * raise ValueError( # <<<<<<<<<<<<<< * "Only 6, 18, and 26 connectivities are supported. Got: " + str(connectivity) * ) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 278, __pyx_L1_error) + __PYX_ERR(0, 280, __pyx_L1_error) - /* "dijkstra3d.pyx":277 + /* "dijkstra3d.pyx":279 * connectivity = 18 # or 26 but 18 might be faster * * if connectivity not in (6,18,26): # <<<<<<<<<<<<<< @@ -5614,23 +5650,23 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":282 + /* "dijkstra3d.pyx":284 * ) * * if data.size == 0: # <<<<<<<<<<<<<< * return np.zeros(shape=(0,), dtype=np.float32) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":283 + /* "dijkstra3d.pyx":285 * * if data.size == 0: * return np.zeros(shape=(0,), dtype=np.float32) # <<<<<<<<<<<<<< @@ -5638,22 +5674,22 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ * if dims == 1: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 283, __pyx_L1_error) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 283, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -5661,7 +5697,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __pyx_t_6 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":282 + /* "dijkstra3d.pyx":284 * ) * * if data.size == 0: # <<<<<<<<<<<<<< @@ -5670,37 +5706,37 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":285 + /* "dijkstra3d.pyx":287 * return np.zeros(shape=(0,), dtype=np.float32) * * if dims == 1: # <<<<<<<<<<<<<< * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) */ - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":286 + /* "dijkstra3d.pyx":288 * * if dims == 1: * data = data[:, np.newaxis, np.newaxis] # <<<<<<<<<<<<<< * source = ( source[0], 0, 0 ) * if dims == 2: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -5711,22 +5747,22 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":287 + /* "dijkstra3d.pyx":289 * if dims == 1: * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) # <<<<<<<<<<<<<< * if dims == 2: * data = data[:, :, np.newaxis] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); @@ -5740,7 +5776,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":285 + /* "dijkstra3d.pyx":287 * return np.zeros(shape=(0,), dtype=np.float32) * * if dims == 1: # <<<<<<<<<<<<<< @@ -5749,32 +5785,32 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":288 + /* "dijkstra3d.pyx":290 * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) * if dims == 2: # <<<<<<<<<<<<<< * data = data[:, :, np.newaxis] * source = ( source[0], source[1], 0 ) */ - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":289 + /* "dijkstra3d.pyx":291 * source = ( source[0], 0, 0 ) * if dims == 2: * data = data[:, :, np.newaxis] # <<<<<<<<<<<<<< * source = ( source[0], source[1], 0 ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -5785,24 +5821,24 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":290 + /* "dijkstra3d.pyx":292 * if dims == 2: * data = data[:, :, np.newaxis] * source = ( source[0], source[1], 0 ) # <<<<<<<<<<<<<< * * _validate_coord(data, source) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -5816,7 +5852,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":288 + /* "dijkstra3d.pyx":290 * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) * if dims == 2: # <<<<<<<<<<<<<< @@ -5825,14 +5861,14 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":292 + /* "dijkstra3d.pyx":294 * source = ( source[0], source[1], 0 ) * * _validate_coord(data, source) # <<<<<<<<<<<<<< * * data = np.asfortranarray(data) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 292, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_8 = 0; @@ -5849,7 +5885,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -5857,13 +5893,13 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -5874,23 +5910,23 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_source); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":294 + /* "dijkstra3d.pyx":296 * _validate_coord(data, source) * * data = np.asfortranarray(data) # <<<<<<<<<<<<<< * * field = _execute_parental_field(data, source, connectivity) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -5905,20 +5941,20 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":296 + /* "dijkstra3d.pyx":298 * data = np.asfortranarray(data) * * field = _execute_parental_field(data, source, connectivity) # <<<<<<<<<<<<<< * if dims < 3: * field = np.squeeze(field, axis=2) */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_execute_parental_field); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_execute_parental_field); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_8 = 0; @@ -5935,7 +5971,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_connectivity}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else @@ -5943,13 +5979,13 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_connectivity}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { - __pyx_t_1 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -5963,7 +5999,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_v_connectivity); __Pyx_GIVEREF(__pyx_v_connectivity); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_8, __pyx_v_connectivity); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -5971,39 +6007,39 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __pyx_v_field = __pyx_t_4; __pyx_t_4 = 0; - /* "dijkstra3d.pyx":297 + /* "dijkstra3d.pyx":299 * * field = _execute_parental_field(data, source, connectivity) * if dims < 3: # <<<<<<<<<<<<<< * field = np.squeeze(field, axis=2) * if dims < 2: */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":298 + /* "dijkstra3d.pyx":300 * field = _execute_parental_field(data, source, connectivity) * if dims < 3: * field = np.squeeze(field, axis=2) # <<<<<<<<<<<<<< * if dims < 2: * field = np.squeeze(field, axis=1) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_field); - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 298, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -6011,7 +6047,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":297 + /* "dijkstra3d.pyx":299 * * field = _execute_parental_field(data, source, connectivity) * if dims < 3: # <<<<<<<<<<<<<< @@ -6020,39 +6056,39 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":299 + /* "dijkstra3d.pyx":301 * if dims < 3: * field = np.squeeze(field, axis=2) * if dims < 2: # <<<<<<<<<<<<<< * field = np.squeeze(field, axis=1) * */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 299, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_dims, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "dijkstra3d.pyx":300 + /* "dijkstra3d.pyx":302 * field = np.squeeze(field, axis=2) * if dims < 2: * field = np.squeeze(field, axis=1) # <<<<<<<<<<<<<< * * return field */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_field); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 300, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -6060,7 +6096,7 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_7); __pyx_t_7 = 0; - /* "dijkstra3d.pyx":299 + /* "dijkstra3d.pyx":301 * if dims < 3: * field = np.squeeze(field, axis=2) * if dims < 2: # <<<<<<<<<<<<<< @@ -6069,19 +6105,19 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ */ } - /* "dijkstra3d.pyx":302 + /* "dijkstra3d.pyx":304 * field = np.squeeze(field, axis=1) * * return field # <<<<<<<<<<<<<< * - * def euclidean_distance_field(data, source, anisotropy=(1,1,1)): + * def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_field); __pyx_r = __pyx_v_field; goto __pyx_L0; - /* "dijkstra3d.pyx":245 + /* "dijkstra3d.pyx":247 * return _path_to_point_cloud(numpy_path, 3, sy, sx) * * def parental_field(data, source, connectivity=26): # <<<<<<<<<<<<<< @@ -6108,33 +6144,40 @@ static PyObject *__pyx_pf_10dijkstra3d_6parental_field(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "dijkstra3d.pyx":304 +/* "dijkstra3d.pyx":306 * return field * - * def euclidean_distance_field(data, source, anisotropy=(1,1,1)): # <<<<<<<<<<<<<< + * def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ /* Python wrapper */ static PyObject *__pyx_pw_10dijkstra3d_9euclidean_distance_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_10dijkstra3d_8euclidean_distance_field[] = "\n Use dijkstra's shortest path algorithm\n on a 3D image grid to generate a weighted \n euclidean distance field from a source voxel \n from a binary image. Vertices are \n voxels and edges are the 26 nearest neighbors \n (except for the edges of the image where \n the number of edges is reduced).\n \n For given input voxels A and B, the edge\n weight from A to B is B and from B to A is\n A. All weights must be non-negative (incl. \n negative zero).\n \n Parameters:\n data: Input weights in a 2D or 3D numpy array. \n source: (x,y,z) coordinate of starting voxel\n anisotropy: (wx,wy,wz) weights for each axial direction.\n \n Returns: 2D or 3D numpy array with each index\n containing its distance from the source voxel.\n "; +static char __pyx_doc_10dijkstra3d_8euclidean_distance_field[] = "\n Use dijkstra's shortest path algorithm\n on a 3D image grid to generate a weighted \n euclidean distance field from a source voxel \n from a binary image. Vertices are \n voxels and edges are the 26 nearest neighbors \n (except for the edges of the image where \n the number of edges is reduced).\n \n For given input voxels A and B, the edge\n weight from A to B is B and from B to A is\n A. All weights must be non-negative (incl. \n negative zero).\n \n Parameters:\n data: Input weights in a 2D or 3D numpy array. \n source: (x,y,z) coordinate of starting voxel\n anisotropy: (wx,wy,wz) weights for each axial direction.\n free_space_radius: (float, optional) if you know that the \n region surrounding the source is free space, we can use\n a much faster algorithm to fill in that volume. Value\n is physical radius (can get this from the EDT). \n \n Returns: 2D or 3D numpy array with each index\n containing its distance from the source voxel.\n "; static PyMethodDef __pyx_mdef_10dijkstra3d_9euclidean_distance_field = {"euclidean_distance_field", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10dijkstra3d_9euclidean_distance_field, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10dijkstra3d_8euclidean_distance_field}; static PyObject *__pyx_pw_10dijkstra3d_9euclidean_distance_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_source = 0; PyObject *__pyx_v_anisotropy = 0; + PyObject *__pyx_v_free_space_radius = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("euclidean_distance_field (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_source,&__pyx_n_s_anisotropy,0}; - PyObject* values[3] = {0,0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_source,&__pyx_n_s_anisotropy,&__pyx_n_s_free_space_radius,0}; + PyObject* values[4] = {0,0,0,0}; values[2] = ((PyObject *)__pyx_tuple__4); + values[3] = ((PyObject *)__pyx_int_0); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -6153,7 +6196,7 @@ static PyObject *__pyx_pw_10dijkstra3d_9euclidean_distance_field(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("euclidean_distance_field", 0, 2, 3, 1); __PYX_ERR(0, 304, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("euclidean_distance_field", 0, 2, 4, 1); __PYX_ERR(0, 306, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -6161,12 +6204,20 @@ static PyObject *__pyx_pw_10dijkstra3d_9euclidean_distance_field(PyObject *__pyx PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anisotropy); if (value) { values[2] = value; kw_args--; } } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_space_radius); + if (value) { values[3] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "euclidean_distance_field") < 0)) __PYX_ERR(0, 304, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "euclidean_distance_field") < 0)) __PYX_ERR(0, 306, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -6178,23 +6229,24 @@ static PyObject *__pyx_pw_10dijkstra3d_9euclidean_distance_field(PyObject *__pyx __pyx_v_data = values[0]; __pyx_v_source = values[1]; __pyx_v_anisotropy = values[2]; + __pyx_v_free_space_radius = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("euclidean_distance_field", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 304, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("euclidean_distance_field", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 306, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d.euclidean_distance_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_10dijkstra3d_8euclidean_distance_field(__pyx_self, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy); + __pyx_r = __pyx_pf_10dijkstra3d_8euclidean_distance_field(__pyx_self, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy, __pyx_v_free_space_radius); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy) { +static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy, PyObject *__pyx_v_free_space_radius) { Py_ssize_t __pyx_v_dims; PyObject *__pyx_v_field = NULL; PyObject *__pyx_r = NULL; @@ -6206,24 +6258,27 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("euclidean_distance_field", 0); __Pyx_INCREF(__pyx_v_data); __Pyx_INCREF(__pyx_v_source); - /* "dijkstra3d.pyx":327 + /* "dijkstra3d.pyx":333 * containing its distance from the source voxel. * """ * dims = len(data.shape) # <<<<<<<<<<<<<< * assert dims <= 3 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dims = __pyx_t_2; - /* "dijkstra3d.pyx":328 + /* "dijkstra3d.pyx":334 * """ * dims = len(data.shape) * assert dims <= 3 # <<<<<<<<<<<<<< @@ -6234,28 +6289,28 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_dims <= 3) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 328, __pyx_L1_error) + __PYX_ERR(0, 334, __pyx_L1_error) } } #endif - /* "dijkstra3d.pyx":330 + /* "dijkstra3d.pyx":336 * assert dims <= 3 * * if data.size == 0: # <<<<<<<<<<<<<< * return np.zeros(shape=(0,), dtype=np.float32) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "dijkstra3d.pyx":331 + /* "dijkstra3d.pyx":337 * * if data.size == 0: * return np.zeros(shape=(0,), dtype=np.float32) # <<<<<<<<<<<<<< @@ -6263,22 +6318,22 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P * if dims == 1: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 331, __pyx_L1_error) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_shape, __pyx_tuple_) < 0) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 331, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -6286,7 +6341,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_t_6 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":330 + /* "dijkstra3d.pyx":336 * assert dims <= 3 * * if data.size == 0: # <<<<<<<<<<<<<< @@ -6295,7 +6350,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P */ } - /* "dijkstra3d.pyx":333 + /* "dijkstra3d.pyx":339 * return np.zeros(shape=(0,), dtype=np.float32) * * if dims == 1: # <<<<<<<<<<<<<< @@ -6305,24 +6360,24 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_t_4 = ((__pyx_v_dims == 1) != 0); if (__pyx_t_4) { - /* "dijkstra3d.pyx":334 + /* "dijkstra3d.pyx":340 * * if dims == 1: * data = data[:, np.newaxis, np.newaxis] # <<<<<<<<<<<<<< * source = ( source[0], 0, 0 ) * if dims == 2: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -6333,22 +6388,22 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":335 + /* "dijkstra3d.pyx":341 * if dims == 1: * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) # <<<<<<<<<<<<<< * if dims == 2: * data = data[:, :, np.newaxis] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); @@ -6362,7 +6417,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":333 + /* "dijkstra3d.pyx":339 * return np.zeros(shape=(0,), dtype=np.float32) * * if dims == 1: # <<<<<<<<<<<<<< @@ -6371,7 +6426,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P */ } - /* "dijkstra3d.pyx":336 + /* "dijkstra3d.pyx":342 * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) * if dims == 2: # <<<<<<<<<<<<<< @@ -6381,19 +6436,19 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_t_4 = ((__pyx_v_dims == 2) != 0); if (__pyx_t_4) { - /* "dijkstra3d.pyx":337 + /* "dijkstra3d.pyx":343 * source = ( source[0], 0, 0 ) * if dims == 2: * data = data[:, :, np.newaxis] # <<<<<<<<<<<<<< * source = ( source[0], source[1], 0 ) * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_newaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); @@ -6404,24 +6459,24 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":338 + /* "dijkstra3d.pyx":344 * if dims == 2: * data = data[:, :, np.newaxis] * source = ( source[0], source[1], 0 ) # <<<<<<<<<<<<<< * * _validate_coord(data, source) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -6435,7 +6490,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_DECREF_SET(__pyx_v_source, __pyx_t_3); __pyx_t_3 = 0; - /* "dijkstra3d.pyx":336 + /* "dijkstra3d.pyx":342 * data = data[:, np.newaxis, np.newaxis] * source = ( source[0], 0, 0 ) * if dims == 2: # <<<<<<<<<<<<<< @@ -6444,14 +6499,14 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P */ } - /* "dijkstra3d.pyx":340 + /* "dijkstra3d.pyx":346 * source = ( source[0], source[1], 0 ) * * _validate_coord(data, source) # <<<<<<<<<<<<<< * * data = np.asfortranarray(data) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_validate_coord); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; __pyx_t_7 = 0; @@ -6468,7 +6523,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -6476,13 +6531,13 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_data, __pyx_v_source}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -6493,23 +6548,23 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_source); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dijkstra3d.pyx":342 + /* "dijkstra3d.pyx":348 * _validate_coord(data, source) * * data = np.asfortranarray(data) # <<<<<<<<<<<<<< * - * field = _execute_euclidean_distance_field(data, source, anisotropy) + * field = _execute_euclidean_distance_field(data, source, anisotropy, free_space_radius) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asfortranarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -6524,20 +6579,20 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3); __pyx_t_3 = 0; - /* "dijkstra3d.pyx":344 + /* "dijkstra3d.pyx":350 * data = np.asfortranarray(data) * - * field = _execute_euclidean_distance_field(data, source, anisotropy) # <<<<<<<<<<<<<< + * field = _execute_euclidean_distance_field(data, source, anisotropy, free_space_radius) # <<<<<<<<<<<<<< * if dims < 3: * field = np.squeeze(field, axis=2) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_execute_euclidean_distance_fiel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_execute_euclidean_distance_fiel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -6553,22 +6608,22 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy, __pyx_v_free_space_radius}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy, __pyx_v_free_space_radius}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_1 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -6582,7 +6637,10 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_INCREF(__pyx_v_anisotropy); __Pyx_GIVEREF(__pyx_v_anisotropy); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_7, __pyx_v_anisotropy); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_INCREF(__pyx_v_free_space_radius); + __Pyx_GIVEREF(__pyx_v_free_space_radius); + PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_7, __pyx_v_free_space_radius); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -6590,9 +6648,9 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_v_field = __pyx_t_3; __pyx_t_3 = 0; - /* "dijkstra3d.pyx":345 + /* "dijkstra3d.pyx":351 * - * field = _execute_euclidean_distance_field(data, source, anisotropy) + * field = _execute_euclidean_distance_field(data, source, anisotropy, free_space_radius) * if dims < 3: # <<<<<<<<<<<<<< * field = np.squeeze(field, axis=2) * if dims < 2: @@ -6600,27 +6658,27 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_t_4 = ((__pyx_v_dims < 3) != 0); if (__pyx_t_4) { - /* "dijkstra3d.pyx":346 - * field = _execute_euclidean_distance_field(data, source, anisotropy) + /* "dijkstra3d.pyx":352 + * field = _execute_euclidean_distance_field(data, source, anisotropy, free_space_radius) * if dims < 3: * field = np.squeeze(field, axis=2) # <<<<<<<<<<<<<< * if dims < 2: * field = np.squeeze(field, axis=1) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_field); - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 346, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_2) < 0) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -6628,16 +6686,16 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":345 + /* "dijkstra3d.pyx":351 * - * field = _execute_euclidean_distance_field(data, source, anisotropy) + * field = _execute_euclidean_distance_field(data, source, anisotropy, free_space_radius) * if dims < 3: # <<<<<<<<<<<<<< * field = np.squeeze(field, axis=2) * if dims < 2: */ } - /* "dijkstra3d.pyx":347 + /* "dijkstra3d.pyx":353 * if dims < 3: * field = np.squeeze(field, axis=2) * if dims < 2: # <<<<<<<<<<<<<< @@ -6647,27 +6705,27 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_t_4 = ((__pyx_v_dims < 2) != 0); if (__pyx_t_4) { - /* "dijkstra3d.pyx":348 + /* "dijkstra3d.pyx":354 * field = np.squeeze(field, axis=2) * if dims < 2: * field = np.squeeze(field, axis=1) # <<<<<<<<<<<<<< * * return field */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_field); __Pyx_GIVEREF(__pyx_v_field); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_field); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 348, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 348, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -6675,7 +6733,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __Pyx_DECREF_SET(__pyx_v_field, __pyx_t_5); __pyx_t_5 = 0; - /* "dijkstra3d.pyx":347 + /* "dijkstra3d.pyx":353 * if dims < 3: * field = np.squeeze(field, axis=2) * if dims < 2: # <<<<<<<<<<<<<< @@ -6684,7 +6742,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P */ } - /* "dijkstra3d.pyx":350 + /* "dijkstra3d.pyx":356 * field = np.squeeze(field, axis=1) * * return field # <<<<<<<<<<<<<< @@ -6696,10 +6754,10 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P __pyx_r = __pyx_v_field; goto __pyx_L0; - /* "dijkstra3d.pyx":304 + /* "dijkstra3d.pyx":306 * return field * - * def euclidean_distance_field(data, source, anisotropy=(1,1,1)): # <<<<<<<<<<<<<< + * def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ @@ -6721,7 +6779,7 @@ static PyObject *__pyx_pf_10dijkstra3d_8euclidean_distance_field(CYTHON_UNUSED P return __pyx_r; } -/* "dijkstra3d.pyx":352 +/* "dijkstra3d.pyx":358 * return field * * def _validate_coord(data, coord): # <<<<<<<<<<<<<< @@ -6735,6 +6793,9 @@ static PyMethodDef __pyx_mdef_10dijkstra3d_11_validate_coord = {"_validate_coord static PyObject *__pyx_pw_10dijkstra3d_11_validate_coord(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_coord = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_validate_coord (wrapper)", 0); @@ -6761,11 +6822,11 @@ static PyObject *__pyx_pw_10dijkstra3d_11_validate_coord(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coord)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_validate_coord", 1, 2, 2, 1); __PYX_ERR(0, 352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_validate_coord", 1, 2, 2, 1); __PYX_ERR(0, 358, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_validate_coord") < 0)) __PYX_ERR(0, 352, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_validate_coord") < 0)) __PYX_ERR(0, 358, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6778,7 +6839,7 @@ static PyObject *__pyx_pw_10dijkstra3d_11_validate_coord(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_validate_coord", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_validate_coord", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 358, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d._validate_coord", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6807,42 +6868,45 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_validate_coord", 0); - /* "dijkstra3d.pyx":353 + /* "dijkstra3d.pyx":359 * * def _validate_coord(data, coord): * dims = len(data.shape) # <<<<<<<<<<<<<< * * if len(coord) != dims: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_dims = __pyx_t_2; - /* "dijkstra3d.pyx":355 + /* "dijkstra3d.pyx":361 * dims = len(data.shape) * * if len(coord) != dims: # <<<<<<<<<<<<<< * raise IndexError( * "Coordinates must have the same dimension as the data. coord: {}, data shape: {}" */ - __pyx_t_2 = PyObject_Length(__pyx_v_coord); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_v_coord); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 361, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 != __pyx_v_dims) != 0); if (unlikely(__pyx_t_3)) { - /* "dijkstra3d.pyx":358 + /* "dijkstra3d.pyx":364 * raise IndexError( * "Coordinates must have the same dimension as the data. coord: {}, data shape: {}" * .format(coord, data.shape) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Coordinates_must_have_the_same_d, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Coordinates_must_have_the_same_d, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -6859,7 +6923,7 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_coord, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -6868,14 +6932,14 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_coord, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -6886,27 +6950,27 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":356 + /* "dijkstra3d.pyx":362 * * if len(coord) != dims: * raise IndexError( # <<<<<<<<<<<<<< * "Coordinates must have the same dimension as the data. coord: {}, data shape: {}" * .format(coord, data.shape) */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 356, __pyx_L1_error) + __PYX_ERR(0, 362, __pyx_L1_error) - /* "dijkstra3d.pyx":355 + /* "dijkstra3d.pyx":361 * dims = len(data.shape) * * if len(coord) != dims: # <<<<<<<<<<<<<< @@ -6915,7 +6979,7 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject */ } - /* "dijkstra3d.pyx":361 + /* "dijkstra3d.pyx":367 * ) * * for i, size in enumerate(data.shape): # <<<<<<<<<<<<<< @@ -6924,15 +6988,15 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject */ __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8); __pyx_t_2 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 367, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6940,17 +7004,17 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 367, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 367, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6960,7 +7024,7 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 361, __pyx_L1_error) + else __PYX_ERR(0, 367, __pyx_L1_error) } break; } @@ -6970,48 +7034,48 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); - __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; - /* "dijkstra3d.pyx":362 + /* "dijkstra3d.pyx":368 * * for i, size in enumerate(data.shape): * if coord[i] < 0 or coord[i] >= size: # <<<<<<<<<<<<<< * raise IndexError("Selected voxel {} was not located inside the array.".format(coord)) * */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_coord, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_coord, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_10) { } else { __pyx_t_3 = __pyx_t_10; goto __pyx_L7_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_coord, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_coord, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_10; __pyx_L7_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "dijkstra3d.pyx":363 + /* "dijkstra3d.pyx":369 * for i, size in enumerate(data.shape): * if coord[i] < 0 or coord[i] >= size: * raise IndexError("Selected voxel {} was not located inside the array.".format(coord)) # <<<<<<<<<<<<<< * * def _path_to_point_cloud(path, dims, rows, cols): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Selected_voxel_was_not_located_i, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Selected_voxel_was_not_located_i, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -7025,17 +7089,17 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_coord) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_coord); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 363, __pyx_L1_error) + __PYX_ERR(0, 369, __pyx_L1_error) - /* "dijkstra3d.pyx":362 + /* "dijkstra3d.pyx":368 * * for i, size in enumerate(data.shape): * if coord[i] < 0 or coord[i] >= size: # <<<<<<<<<<<<<< @@ -7044,7 +7108,7 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject */ } - /* "dijkstra3d.pyx":361 + /* "dijkstra3d.pyx":367 * ) * * for i, size in enumerate(data.shape): # <<<<<<<<<<<<<< @@ -7055,7 +7119,7 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "dijkstra3d.pyx":352 + /* "dijkstra3d.pyx":358 * return field * * def _validate_coord(data, coord): # <<<<<<<<<<<<<< @@ -7082,7 +7146,7 @@ static PyObject *__pyx_pf_10dijkstra3d_10_validate_coord(CYTHON_UNUSED PyObject return __pyx_r; } -/* "dijkstra3d.pyx":365 +/* "dijkstra3d.pyx":371 * raise IndexError("Selected voxel {} was not located inside the array.".format(coord)) * * def _path_to_point_cloud(path, dims, rows, cols): # <<<<<<<<<<<<<< @@ -7098,6 +7162,9 @@ static PyObject *__pyx_pw_10dijkstra3d_13_path_to_point_cloud(PyObject *__pyx_se PyObject *__pyx_v_dims = 0; PyObject *__pyx_v_rows = 0; PyObject *__pyx_v_cols = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_path_to_point_cloud (wrapper)", 0); @@ -7128,23 +7195,23 @@ static PyObject *__pyx_pw_10dijkstra3d_13_path_to_point_cloud(PyObject *__pyx_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dims)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, 1); __PYX_ERR(0, 365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, 1); __PYX_ERR(0, 371, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rows)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, 2); __PYX_ERR(0, 365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, 2); __PYX_ERR(0, 371, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cols)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, 3); __PYX_ERR(0, 365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, 3); __PYX_ERR(0, 371, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_path_to_point_cloud") < 0)) __PYX_ERR(0, 365, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_path_to_point_cloud") < 0)) __PYX_ERR(0, 371, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -7161,7 +7228,7 @@ static PyObject *__pyx_pw_10dijkstra3d_13_path_to_point_cloud(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 365, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_path_to_point_cloud", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 371, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d._path_to_point_cloud", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7190,26 +7257,29 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb int __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_path_to_point_cloud", 0); - /* "dijkstra3d.pyx":366 + /* "dijkstra3d.pyx":372 * * def _path_to_point_cloud(path, dims, rows, cols): * ptlist = np.zeros((path.shape[0], dims), dtype=np.uint32) # <<<<<<<<<<<<<< * * cdef size_t sxy = rows * cols */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __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, 366, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_path, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -7217,21 +7287,21 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_GIVEREF(__pyx_v_dims); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dims); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 366, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -7239,33 +7309,33 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __pyx_v_ptlist = __pyx_t_5; __pyx_t_5 = 0; - /* "dijkstra3d.pyx":368 + /* "dijkstra3d.pyx":374 * ptlist = np.zeros((path.shape[0], dims), dtype=np.uint32) * * cdef size_t sxy = rows * cols # <<<<<<<<<<<<<< * * if dims == 3: */ - __pyx_t_5 = PyNumber_Multiply(__pyx_v_rows, __pyx_v_cols); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_t_5 = PyNumber_Multiply(__pyx_v_rows, __pyx_v_cols); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_sxy = __pyx_t_6; - /* "dijkstra3d.pyx":370 + /* "dijkstra3d.pyx":376 * cdef size_t sxy = rows * cols * * if dims == 3: # <<<<<<<<<<<<<< * for i, pt in enumerate(path): * ptlist[ i, 0 ] = pt % cols */ - __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_dims, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { - /* "dijkstra3d.pyx":371 + /* "dijkstra3d.pyx":377 * * if dims == 3: * for i, pt in enumerate(path): # <<<<<<<<<<<<<< @@ -7278,26 +7348,26 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 377, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 377, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 377, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -7307,7 +7377,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 371, __pyx_L1_error) + else __PYX_ERR(0, 377, __pyx_L1_error) } break; } @@ -7317,22 +7387,22 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; - /* "dijkstra3d.pyx":372 + /* "dijkstra3d.pyx":378 * if dims == 3: * for i, pt in enumerate(path): * ptlist[ i, 0 ] = pt % cols # <<<<<<<<<<<<<< * ptlist[ i, 1 ] = (pt % sxy) / cols * ptlist[ i, 2 ] = pt / sxy */ - __pyx_t_3 = PyNumber_Remainder(__pyx_v_pt, __pyx_v_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_3 = PyNumber_Remainder(__pyx_v_pt, __pyx_v_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); @@ -7340,26 +7410,26 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0); - if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_2, __pyx_t_3) < 0)) __PYX_ERR(0, 372, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_2, __pyx_t_3) < 0)) __PYX_ERR(0, 378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dijkstra3d.pyx":373 + /* "dijkstra3d.pyx":379 * for i, pt in enumerate(path): * ptlist[ i, 0 ] = pt % cols * ptlist[ i, 1 ] = (pt % sxy) / cols # <<<<<<<<<<<<<< * ptlist[ i, 2 ] = pt / sxy * else: */ - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_sxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_sxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Remainder(__pyx_v_pt, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_2 = PyNumber_Remainder(__pyx_v_pt, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_v_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_v_cols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); @@ -7367,23 +7437,23 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1); - if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_2, __pyx_t_3) < 0)) __PYX_ERR(0, 373, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_2, __pyx_t_3) < 0)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "dijkstra3d.pyx":374 + /* "dijkstra3d.pyx":380 * ptlist[ i, 0 ] = pt % cols * ptlist[ i, 1 ] = (pt % sxy) / cols * ptlist[ i, 2 ] = pt / sxy # <<<<<<<<<<<<<< * else: * for i, pt in enumerate(path): */ - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_sxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_sxy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_pt, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_pt, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); @@ -7391,11 +7461,11 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2); - if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 374, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dijkstra3d.pyx":371 + /* "dijkstra3d.pyx":377 * * if dims == 3: * for i, pt in enumerate(path): # <<<<<<<<<<<<<< @@ -7406,7 +7476,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "dijkstra3d.pyx":370 + /* "dijkstra3d.pyx":376 * cdef size_t sxy = rows * cols * * if dims == 3: # <<<<<<<<<<<<<< @@ -7416,7 +7486,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb goto __pyx_L3; } - /* "dijkstra3d.pyx":376 + /* "dijkstra3d.pyx":382 * ptlist[ i, 2 ] = pt / sxy * else: * for i, pt in enumerate(path): # <<<<<<<<<<<<<< @@ -7430,26 +7500,26 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 382, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 382, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 382, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -7459,7 +7529,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 376, __pyx_L1_error) + else __PYX_ERR(0, 382, __pyx_L1_error) } break; } @@ -7469,22 +7539,22 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __pyx_t_2 = 0; __Pyx_INCREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); - __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; - /* "dijkstra3d.pyx":377 + /* "dijkstra3d.pyx":383 * else: * for i, pt in enumerate(path): * ptlist[ i, 0 ] = pt % cols # <<<<<<<<<<<<<< * ptlist[ i, 1 ] = (pt % sxy) / cols * */ - __pyx_t_2 = PyNumber_Remainder(__pyx_v_pt, __pyx_v_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_2 = PyNumber_Remainder(__pyx_v_pt, __pyx_v_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); @@ -7492,26 +7562,26 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0); - if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 377, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dijkstra3d.pyx":378 + /* "dijkstra3d.pyx":384 * for i, pt in enumerate(path): * ptlist[ i, 0 ] = pt % cols * ptlist[ i, 1 ] = (pt % sxy) / cols # <<<<<<<<<<<<<< * * return ptlist */ - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_sxy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_sxy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Remainder(__pyx_v_pt, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_3 = PyNumber_Remainder(__pyx_v_pt, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_v_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_v_cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); @@ -7519,11 +7589,11 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_1); - if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 378, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_ptlist, __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "dijkstra3d.pyx":376 + /* "dijkstra3d.pyx":382 * ptlist[ i, 2 ] = pt / sxy * else: * for i, pt in enumerate(path): # <<<<<<<<<<<<<< @@ -7536,7 +7606,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb } __pyx_L3:; - /* "dijkstra3d.pyx":380 + /* "dijkstra3d.pyx":386 * ptlist[ i, 1 ] = (pt % sxy) / cols * * return ptlist # <<<<<<<<<<<<<< @@ -7548,7 +7618,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb __pyx_r = __pyx_v_ptlist; goto __pyx_L0; - /* "dijkstra3d.pyx":365 + /* "dijkstra3d.pyx":371 * raise IndexError("Selected voxel {} was not located inside the array.".format(coord)) * * def _path_to_point_cloud(path, dims, rows, cols): # <<<<<<<<<<<<<< @@ -7574,7 +7644,7 @@ static PyObject *__pyx_pf_10dijkstra3d_12_path_to_point_cloud(CYTHON_UNUSED PyOb return __pyx_r; } -/* "dijkstra3d.pyx":382 +/* "dijkstra3d.pyx":388 * return ptlist * * def _execute_dijkstra( # <<<<<<<<<<<<<< @@ -7593,6 +7663,9 @@ static PyObject *__pyx_pw_10dijkstra3d_15_execute_dijkstra(PyObject *__pyx_self, PyObject *__pyx_v_bidirectional = 0; PyObject *__pyx_v_compass = 0; float __pyx_v_compass_norm; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_execute_dijkstra (wrapper)", 0); @@ -7629,31 +7702,31 @@ static PyObject *__pyx_pw_10dijkstra3d_15_execute_dijkstra(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 1); __PYX_ERR(0, 382, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 1); __PYX_ERR(0, 388, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 2); __PYX_ERR(0, 382, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 2); __PYX_ERR(0, 388, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_connectivity)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 3); __PYX_ERR(0, 382, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 3); __PYX_ERR(0, 388, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bidirectional)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 4); __PYX_ERR(0, 382, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 4); __PYX_ERR(0, 388, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compass)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 5); __PYX_ERR(0, 382, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, 5); __PYX_ERR(0, 388, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: @@ -7663,7 +7736,7 @@ static PyObject *__pyx_pw_10dijkstra3d_15_execute_dijkstra(PyObject *__pyx_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_dijkstra") < 0)) __PYX_ERR(0, 382, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_dijkstra") < 0)) __PYX_ERR(0, 388, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -7682,18 +7755,18 @@ static PyObject *__pyx_pw_10dijkstra3d_15_execute_dijkstra(PyObject *__pyx_self, __pyx_v_data = values[0]; __pyx_v_source = values[1]; __pyx_v_target = values[2]; - __pyx_v_connectivity = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_connectivity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 383, __pyx_L3_error) + __pyx_v_connectivity = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_connectivity == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 389, __pyx_L3_error) __pyx_v_bidirectional = values[4]; __pyx_v_compass = values[5]; if (values[6]) { - __pyx_v_compass_norm = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_compass_norm == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 384, __pyx_L3_error) + __pyx_v_compass_norm = __pyx_PyFloat_AsFloat(values[6]); if (unlikely((__pyx_v_compass_norm == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 390, __pyx_L3_error) } else { __pyx_v_compass_norm = ((float)-1.0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 382, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_dijkstra", 0, 6, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 388, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d._execute_dijkstra", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7743,261 +7816,159 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; - Py_ssize_t __pyx_t_14; - Py_ssize_t __pyx_t_15; - Py_ssize_t __pyx_t_16; - Py_ssize_t __pyx_t_17; - Py_ssize_t __pyx_t_18; - Py_ssize_t __pyx_t_19; - Py_ssize_t __pyx_t_20; - Py_ssize_t __pyx_t_21; - Py_ssize_t __pyx_t_22; - Py_ssize_t __pyx_t_23; - Py_ssize_t __pyx_t_24; - Py_ssize_t __pyx_t_25; - Py_ssize_t __pyx_t_26; - Py_ssize_t __pyx_t_27; - Py_ssize_t __pyx_t_28; - __Pyx_memviewslice __pyx_t_29 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_30; - Py_ssize_t __pyx_t_31; - Py_ssize_t __pyx_t_32; - Py_ssize_t __pyx_t_33; - Py_ssize_t __pyx_t_34; - Py_ssize_t __pyx_t_35; - Py_ssize_t __pyx_t_36; - Py_ssize_t __pyx_t_37; - Py_ssize_t __pyx_t_38; - Py_ssize_t __pyx_t_39; - Py_ssize_t __pyx_t_40; - Py_ssize_t __pyx_t_41; - Py_ssize_t __pyx_t_42; - 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; - int __pyx_t_48; - __Pyx_memviewslice __pyx_t_49 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_50; - Py_ssize_t __pyx_t_51; - Py_ssize_t __pyx_t_52; - Py_ssize_t __pyx_t_53; - Py_ssize_t __pyx_t_54; - Py_ssize_t __pyx_t_55; - Py_ssize_t __pyx_t_56; - Py_ssize_t __pyx_t_57; - Py_ssize_t __pyx_t_58; - Py_ssize_t __pyx_t_59; - Py_ssize_t __pyx_t_60; - Py_ssize_t __pyx_t_61; - Py_ssize_t __pyx_t_62; - Py_ssize_t __pyx_t_63; - Py_ssize_t __pyx_t_64; - Py_ssize_t __pyx_t_65; - Py_ssize_t __pyx_t_66; - Py_ssize_t __pyx_t_67; - __Pyx_memviewslice __pyx_t_68 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_69; - Py_ssize_t __pyx_t_70; - Py_ssize_t __pyx_t_71; - Py_ssize_t __pyx_t_72; - Py_ssize_t __pyx_t_73; - Py_ssize_t __pyx_t_74; - Py_ssize_t __pyx_t_75; - Py_ssize_t __pyx_t_76; - Py_ssize_t __pyx_t_77; - Py_ssize_t __pyx_t_78; - Py_ssize_t __pyx_t_79; - Py_ssize_t __pyx_t_80; - Py_ssize_t __pyx_t_81; - Py_ssize_t __pyx_t_82; - Py_ssize_t __pyx_t_83; - Py_ssize_t __pyx_t_84; - Py_ssize_t __pyx_t_85; - Py_ssize_t __pyx_t_86; - __Pyx_memviewslice __pyx_t_87 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_88; - Py_ssize_t __pyx_t_89; - Py_ssize_t __pyx_t_90; - Py_ssize_t __pyx_t_91; - Py_ssize_t __pyx_t_92; - Py_ssize_t __pyx_t_93; - Py_ssize_t __pyx_t_94; - Py_ssize_t __pyx_t_95; - Py_ssize_t __pyx_t_96; - Py_ssize_t __pyx_t_97; - Py_ssize_t __pyx_t_98; - Py_ssize_t __pyx_t_99; - Py_ssize_t __pyx_t_100; - Py_ssize_t __pyx_t_101; - Py_ssize_t __pyx_t_102; - Py_ssize_t __pyx_t_103; - Py_ssize_t __pyx_t_104; - Py_ssize_t __pyx_t_105; - __Pyx_memviewslice __pyx_t_106 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_107; - Py_ssize_t __pyx_t_108; - Py_ssize_t __pyx_t_109; - Py_ssize_t __pyx_t_110; - Py_ssize_t __pyx_t_111; - Py_ssize_t __pyx_t_112; - Py_ssize_t __pyx_t_113; - Py_ssize_t __pyx_t_114; - Py_ssize_t __pyx_t_115; - Py_ssize_t __pyx_t_116; - Py_ssize_t __pyx_t_117; - Py_ssize_t __pyx_t_118; - Py_ssize_t __pyx_t_119; - Py_ssize_t __pyx_t_120; - Py_ssize_t __pyx_t_121; - Py_ssize_t __pyx_t_122; - Py_ssize_t __pyx_t_123; - Py_ssize_t __pyx_t_124; - struct __pyx_array_obj *__pyx_t_125 = NULL; - __Pyx_memviewslice __pyx_t_126 = { 0, 0, { 0 }, { 0 }, { 0 } }; - __Pyx_memviewslice __pyx_t_127 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_t_15; + __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } }; + struct __pyx_array_obj *__pyx_t_20 = NULL; + __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_22 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_execute_dijkstra", 0); - /* "dijkstra3d.pyx":393 + /* "dijkstra3d.pyx":399 * cdef double[:,:,:] arr_memviewdouble * * cdef size_t sx = data.shape[0] # <<<<<<<<<<<<<< * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sx = __pyx_t_3; - /* "dijkstra3d.pyx":394 + /* "dijkstra3d.pyx":400 * * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] # <<<<<<<<<<<<<< * cdef size_t sz = data.shape[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sy = __pyx_t_3; - /* "dijkstra3d.pyx":395 + /* "dijkstra3d.pyx":401 * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] # <<<<<<<<<<<<<< * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sz = __pyx_t_3; - /* "dijkstra3d.pyx":397 + /* "dijkstra3d.pyx":403 * cdef size_t sz = data.shape[2] * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) # <<<<<<<<<<<<<< * cdef size_t sink = target[0] + sx * (target[1] + sy * target[2]) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_src = __pyx_t_3; - /* "dijkstra3d.pyx":398 + /* "dijkstra3d.pyx":404 * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) * cdef size_t sink = target[0] + sx * (target[1] + sy * target[2]) # <<<<<<<<<<<<<< * * cdef vector[uint32_t] output32 */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_sink = __pyx_t_3; - /* "dijkstra3d.pyx":403 + /* "dijkstra3d.pyx":409 * cdef vector[uint64_t] output64 * * sixtyfourbit = data.size > np.iinfo(np.uint32).max # <<<<<<<<<<<<<< * * dtype = data.dtype */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -8013,81 +7984,81 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_max); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_max); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_sixtyfourbit = __pyx_t_5; __pyx_t_5 = 0; - /* "dijkstra3d.pyx":405 + /* "dijkstra3d.pyx":411 * sixtyfourbit = data.size > np.iinfo(np.uint32).max * * dtype = data.dtype # <<<<<<<<<<<<<< * * if dtype == np.float32: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_dtype = __pyx_t_5; __pyx_t_5 = 0; - /* "dijkstra3d.pyx":407 + /* "dijkstra3d.pyx":413 * dtype = data.dtype * * if dtype == np.float32: # <<<<<<<<<<<<<< * arr_memviewfloat = data * if bidirectional: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":408 + /* "dijkstra3d.pyx":414 * * if dtype == np.float32: * arr_memviewfloat = data # <<<<<<<<<<<<<< * if bidirectional: * if sixtyfourbit: */ - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 414, __pyx_L1_error) __pyx_v_arr_memviewfloat = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "dijkstra3d.pyx":409 + /* "dijkstra3d.pyx":415 * if dtype == np.float32: * arr_memviewfloat = data * if bidirectional: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[float, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 415, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":410 + /* "dijkstra3d.pyx":416 * arr_memviewfloat = data * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = bidirectional_dijkstra3d[float, uint64_t]( * &arr_memviewfloat[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 416, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":412 + /* "dijkstra3d.pyx":418 * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[float, uint64_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< @@ -8112,10 +8083,10 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 412, __pyx_L1_error) + __PYX_ERR(0, 418, __pyx_L1_error) } - /* "dijkstra3d.pyx":411 + /* "dijkstra3d.pyx":417 * if bidirectional: * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[float, uint64_t]( # <<<<<<<<<<<<<< @@ -8124,7 +8095,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":410 + /* "dijkstra3d.pyx":416 * arr_memviewfloat = data * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8134,7 +8105,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L5; } - /* "dijkstra3d.pyx":417 + /* "dijkstra3d.pyx":423 * ) * else: * output32 = bidirectional_dijkstra3d[float, uint32_t]( # <<<<<<<<<<<<<< @@ -8143,46 +8114,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":418 + /* "dijkstra3d.pyx":424 * else: * output32 = bidirectional_dijkstra3d[float, uint32_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_14 = 0; - __pyx_t_15 = 0; - __pyx_t_16 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_14 < 0) { - __pyx_t_14 += __pyx_v_arr_memviewfloat.shape[0]; - if (unlikely(__pyx_t_14 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_14 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_15 < 0) { - __pyx_t_15 += __pyx_v_arr_memviewfloat.shape[1]; - if (unlikely(__pyx_t_15 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_15 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_16 < 0) { - __pyx_t_16 += __pyx_v_arr_memviewfloat.shape[2]; - if (unlikely(__pyx_t_16 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewfloat.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewfloat.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewfloat.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 418, __pyx_L1_error) + __PYX_ERR(0, 424, __pyx_L1_error) } - /* "dijkstra3d.pyx":417 + /* "dijkstra3d.pyx":423 * ) * else: * output32 = bidirectional_dijkstra3d[float, uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewfloat[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_14 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_15 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_16 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L5:; - /* "dijkstra3d.pyx":409 + /* "dijkstra3d.pyx":415 * if dtype == np.float32: * arr_memviewfloat = data * if bidirectional: # <<<<<<<<<<<<<< @@ -8192,64 +8163,64 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L4; } - /* "dijkstra3d.pyx":422 + /* "dijkstra3d.pyx":428 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[float, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 428, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":423 + /* "dijkstra3d.pyx":429 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = compass_guided_dijkstra3d[float, uint64_t]( * &arr_memviewfloat[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 429, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":425 + /* "dijkstra3d.pyx":431 * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[float, uint64_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_17 = 0; - __pyx_t_18 = 0; - __pyx_t_19 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_17 < 0) { - __pyx_t_17 += __pyx_v_arr_memviewfloat.shape[0]; - if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_18 < 0) { - __pyx_t_18 += __pyx_v_arr_memviewfloat.shape[1]; - if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_v_arr_memviewfloat.shape[2]; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewfloat.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewfloat.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewfloat.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 425, __pyx_L1_error) + __PYX_ERR(0, 431, __pyx_L1_error) } - /* "dijkstra3d.pyx":424 + /* "dijkstra3d.pyx":430 * elif compass: * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[float, uint64_t]( # <<<<<<<<<<<<<< * &arr_memviewfloat[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_17 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_18 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); - /* "dijkstra3d.pyx":423 + /* "dijkstra3d.pyx":429 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8259,7 +8230,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L6; } - /* "dijkstra3d.pyx":431 + /* "dijkstra3d.pyx":437 * ) * else: * output32 = compass_guided_dijkstra3d[float, uint32_t]( # <<<<<<<<<<<<<< @@ -8268,46 +8239,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":432 + /* "dijkstra3d.pyx":438 * else: * output32 = compass_guided_dijkstra3d[float, uint32_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_20 = 0; - __pyx_t_21 = 0; - __pyx_t_22 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_v_arr_memviewfloat.shape[0]; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_21 < 0) { - __pyx_t_21 += __pyx_v_arr_memviewfloat.shape[1]; - if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_22 < 0) { - __pyx_t_22 += __pyx_v_arr_memviewfloat.shape[2]; - if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_22 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewfloat.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewfloat.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewfloat.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 432, __pyx_L1_error) + __PYX_ERR(0, 438, __pyx_L1_error) } - /* "dijkstra3d.pyx":431 + /* "dijkstra3d.pyx":437 * ) * else: * output32 = compass_guided_dijkstra3d[float, uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewfloat[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_20 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_21 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_22 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); } __pyx_L6:; - /* "dijkstra3d.pyx":422 + /* "dijkstra3d.pyx":428 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< @@ -8317,7 +8288,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L4; } - /* "dijkstra3d.pyx":438 + /* "dijkstra3d.pyx":444 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8325,47 +8296,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec * &arr_memviewfloat[0,0,0], */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 444, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":440 + /* "dijkstra3d.pyx":446 * if sixtyfourbit: * output64 = dijkstra3d[float, uint64_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_23 = 0; - __pyx_t_24 = 0; - __pyx_t_25 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_23 < 0) { - __pyx_t_23 += __pyx_v_arr_memviewfloat.shape[0]; - if (unlikely(__pyx_t_23 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_23 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_24 < 0) { - __pyx_t_24 += __pyx_v_arr_memviewfloat.shape[1]; - if (unlikely(__pyx_t_24 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_24 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_25 < 0) { - __pyx_t_25 += __pyx_v_arr_memviewfloat.shape[2]; - if (unlikely(__pyx_t_25 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_25 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewfloat.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewfloat.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewfloat.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 440, __pyx_L1_error) + __PYX_ERR(0, 446, __pyx_L1_error) } - /* "dijkstra3d.pyx":439 + /* "dijkstra3d.pyx":445 * else: * if sixtyfourbit: * output64 = dijkstra3d[float, uint64_t]( # <<<<<<<<<<<<<< * &arr_memviewfloat[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_23 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_24 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_25 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":438 + /* "dijkstra3d.pyx":444 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8375,7 +8346,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L7; } - /* "dijkstra3d.pyx":445 + /* "dijkstra3d.pyx":451 * ) * else: * output32 = dijkstra3d[float, uint32_t]( # <<<<<<<<<<<<<< @@ -8384,48 +8355,48 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":446 + /* "dijkstra3d.pyx":452 * else: * output32 = dijkstra3d[float, uint32_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_26 = 0; - __pyx_t_27 = 0; - __pyx_t_28 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_26 < 0) { - __pyx_t_26 += __pyx_v_arr_memviewfloat.shape[0]; - if (unlikely(__pyx_t_26 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_26 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_27 < 0) { - __pyx_t_27 += __pyx_v_arr_memviewfloat.shape[1]; - if (unlikely(__pyx_t_27 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_27 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_28 < 0) { - __pyx_t_28 += __pyx_v_arr_memviewfloat.shape[2]; - if (unlikely(__pyx_t_28 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_28 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewfloat.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewfloat.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewfloat.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 446, __pyx_L1_error) + __PYX_ERR(0, 452, __pyx_L1_error) } - /* "dijkstra3d.pyx":445 + /* "dijkstra3d.pyx":451 * ) * else: * output32 = dijkstra3d[float, uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewfloat[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_26 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_27 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_28 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L7:; } __pyx_L4:; - /* "dijkstra3d.pyx":407 + /* "dijkstra3d.pyx":413 * dtype = data.dtype * * if dtype == np.float32: # <<<<<<<<<<<<<< @@ -8435,94 +8406,94 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L3; } - /* "dijkstra3d.pyx":450 + /* "dijkstra3d.pyx":456 * src, sink, connectivity * ) * elif dtype == np.float64: # <<<<<<<<<<<<<< * arr_memviewdouble = data * if bidirectional: */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":451 + /* "dijkstra3d.pyx":457 * ) * elif dtype == np.float64: * arr_memviewdouble = data # <<<<<<<<<<<<<< * if bidirectional: * if sixtyfourbit: */ - __pyx_t_29 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_29.memview)) __PYX_ERR(0, 451, __pyx_L1_error) - __pyx_v_arr_memviewdouble = __pyx_t_29; - __pyx_t_29.memview = NULL; - __pyx_t_29.data = NULL; + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_v_arr_memviewdouble = __pyx_t_14; + __pyx_t_14.memview = NULL; + __pyx_t_14.data = NULL; - /* "dijkstra3d.pyx":452 + /* "dijkstra3d.pyx":458 * elif dtype == np.float64: * arr_memviewdouble = data * if bidirectional: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[double, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 458, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":453 + /* "dijkstra3d.pyx":459 * arr_memviewdouble = data * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = bidirectional_dijkstra3d[double, uint64_t]( * &arr_memviewdouble[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 453, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 459, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":455 + /* "dijkstra3d.pyx":461 * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[double, uint64_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_30 = 0; - __pyx_t_31 = 0; - __pyx_t_32 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_30 < 0) { - __pyx_t_30 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_30 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_30 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_31 < 0) { - __pyx_t_31 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_31 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_31 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_32 < 0) { - __pyx_t_32 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_32 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_32 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 455, __pyx_L1_error) + __PYX_ERR(0, 461, __pyx_L1_error) } - /* "dijkstra3d.pyx":454 + /* "dijkstra3d.pyx":460 * if bidirectional: * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[double, uint64_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_30 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_31 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_32 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":453 + /* "dijkstra3d.pyx":459 * arr_memviewdouble = data * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8532,7 +8503,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L9; } - /* "dijkstra3d.pyx":460 + /* "dijkstra3d.pyx":466 * ) * else: * output32 = bidirectional_dijkstra3d[double, uint32_t]( # <<<<<<<<<<<<<< @@ -8541,46 +8512,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":461 + /* "dijkstra3d.pyx":467 * else: * output32 = bidirectional_dijkstra3d[double, uint32_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_33 = 0; - __pyx_t_34 = 0; - __pyx_t_35 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_33 < 0) { - __pyx_t_33 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_33 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_33 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_34 < 0) { - __pyx_t_34 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_34 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_34 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_35 < 0) { - __pyx_t_35 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_35 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_35 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 461, __pyx_L1_error) + __PYX_ERR(0, 467, __pyx_L1_error) } - /* "dijkstra3d.pyx":460 + /* "dijkstra3d.pyx":466 * ) * else: * output32 = bidirectional_dijkstra3d[double, uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_33 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_34 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_35 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L9:; - /* "dijkstra3d.pyx":452 + /* "dijkstra3d.pyx":458 * elif dtype == np.float64: * arr_memviewdouble = data * if bidirectional: # <<<<<<<<<<<<<< @@ -8590,64 +8561,64 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L8; } - /* "dijkstra3d.pyx":465 + /* "dijkstra3d.pyx":471 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[double, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 471, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":466 + /* "dijkstra3d.pyx":472 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = compass_guided_dijkstra3d[double, uint64_t]( * &arr_memviewdouble[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 472, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":468 + /* "dijkstra3d.pyx":474 * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[double, uint64_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_36 = 0; - __pyx_t_37 = 0; - __pyx_t_38 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_36 < 0) { - __pyx_t_36 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_36 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_36 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_37 < 0) { - __pyx_t_37 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_37 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_37 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_38 < 0) { - __pyx_t_38 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_38 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_38 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 468, __pyx_L1_error) + __PYX_ERR(0, 474, __pyx_L1_error) } - /* "dijkstra3d.pyx":467 + /* "dijkstra3d.pyx":473 * elif compass: * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[double, uint64_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_36 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_37 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_38 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); - /* "dijkstra3d.pyx":466 + /* "dijkstra3d.pyx":472 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8657,7 +8628,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L10; } - /* "dijkstra3d.pyx":474 + /* "dijkstra3d.pyx":480 * ) * else: * output32 = compass_guided_dijkstra3d[double, uint32_t]( # <<<<<<<<<<<<<< @@ -8666,46 +8637,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":475 + /* "dijkstra3d.pyx":481 * else: * output32 = compass_guided_dijkstra3d[double, uint32_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_39 = 0; - __pyx_t_40 = 0; - __pyx_t_41 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_39 < 0) { - __pyx_t_39 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_39 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_39 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_40 < 0) { - __pyx_t_40 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_40 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_40 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_41 < 0) { - __pyx_t_41 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_41 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_41 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 475, __pyx_L1_error) + __PYX_ERR(0, 481, __pyx_L1_error) } - /* "dijkstra3d.pyx":474 + /* "dijkstra3d.pyx":480 * ) * else: * output32 = compass_guided_dijkstra3d[double, uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_39 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_40 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_41 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); } __pyx_L10:; - /* "dijkstra3d.pyx":465 + /* "dijkstra3d.pyx":471 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< @@ -8715,7 +8686,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L8; } - /* "dijkstra3d.pyx":481 + /* "dijkstra3d.pyx":487 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8723,47 +8694,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec * &arr_memviewdouble[0,0,0], */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 487, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":483 + /* "dijkstra3d.pyx":489 * if sixtyfourbit: * output64 = dijkstra3d[double, uint64_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_42 = 0; - __pyx_t_43 = 0; - __pyx_t_44 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_42 < 0) { - __pyx_t_42 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_42 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_42 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_43 < 0) { - __pyx_t_43 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_43 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_43 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_44 < 0) { - __pyx_t_44 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_44 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_44 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 483, __pyx_L1_error) + __PYX_ERR(0, 489, __pyx_L1_error) } - /* "dijkstra3d.pyx":482 + /* "dijkstra3d.pyx":488 * else: * if sixtyfourbit: * output64 = dijkstra3d[double, uint64_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_42 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_43 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_44 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":481 + /* "dijkstra3d.pyx":487 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8773,7 +8744,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L11; } - /* "dijkstra3d.pyx":488 + /* "dijkstra3d.pyx":494 * ) * else: * output32 = dijkstra3d[double, uint32_t]( # <<<<<<<<<<<<<< @@ -8782,48 +8753,48 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":489 + /* "dijkstra3d.pyx":495 * else: * output32 = dijkstra3d[double, uint32_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_45 = 0; - __pyx_t_46 = 0; - __pyx_t_47 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_45 < 0) { - __pyx_t_45 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_45 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_45 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_46 < 0) { - __pyx_t_46 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_46 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_46 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_47 < 0) { - __pyx_t_47 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_47 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_47 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 489, __pyx_L1_error) + __PYX_ERR(0, 495, __pyx_L1_error) } - /* "dijkstra3d.pyx":488 + /* "dijkstra3d.pyx":494 * ) * else: * output32 = dijkstra3d[double, uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_45 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_46 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_47 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L11:; } __pyx_L8:; - /* "dijkstra3d.pyx":450 + /* "dijkstra3d.pyx":456 * src, sink, connectivity * ) * elif dtype == np.float64: # <<<<<<<<<<<<<< @@ -8833,7 +8804,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L3; } - /* "dijkstra3d.pyx":493 + /* "dijkstra3d.pyx":499 * src, sink, connectivity * ) * elif dtype in (np.int64, np.uint64): # <<<<<<<<<<<<<< @@ -8842,47 +8813,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_5 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!__pyx_t_48) { + if (!__pyx_t_15) { } else { - __pyx_t_8 = __pyx_t_48; + __pyx_t_8 = __pyx_t_15; goto __pyx_L12_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __pyx_t_48; + __pyx_t_8 = __pyx_t_15; __pyx_L12_bool_binop_done:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_48 = (__pyx_t_8 != 0); - if (__pyx_t_48) { + __pyx_t_15 = (__pyx_t_8 != 0); + if (__pyx_t_15) { - /* "dijkstra3d.pyx":494 + /* "dijkstra3d.pyx":500 * ) * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) # <<<<<<<<<<<<<< * if bidirectional: * if sixtyfourbit: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -8898,73 +8869,73 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_49 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_49.memview)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_arr_memview64 = __pyx_t_49; - __pyx_t_49.memview = NULL; - __pyx_t_49.data = NULL; + __pyx_v_arr_memview64 = __pyx_t_16; + __pyx_t_16.memview = NULL; + __pyx_t_16.data = NULL; - /* "dijkstra3d.pyx":495 + /* "dijkstra3d.pyx":501 * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) * if bidirectional: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint64_t, uint64_t]( */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 495, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 501, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":496 + /* "dijkstra3d.pyx":502 * arr_memview64 = data.astype(np.uint64) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = bidirectional_dijkstra3d[uint64_t, uint64_t]( * &arr_memview64[0,0,0], */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 496, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 502, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":498 + /* "dijkstra3d.pyx":504 * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint64_t, uint64_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_50 = 0; - __pyx_t_51 = 0; - __pyx_t_52 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_50 < 0) { - __pyx_t_50 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_50 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_50 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_51 < 0) { - __pyx_t_51 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_51 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_51 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_52 < 0) { - __pyx_t_52 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_52 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_52 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 498, __pyx_L1_error) + __PYX_ERR(0, 504, __pyx_L1_error) } - /* "dijkstra3d.pyx":497 + /* "dijkstra3d.pyx":503 * if bidirectional: * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint64_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_50 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_51 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_52 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_10 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":496 + /* "dijkstra3d.pyx":502 * arr_memview64 = data.astype(np.uint64) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -8974,7 +8945,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L15; } - /* "dijkstra3d.pyx":503 + /* "dijkstra3d.pyx":509 * ) * else: * output32 = bidirectional_dijkstra3d[uint64_t, uint32_t]( # <<<<<<<<<<<<<< @@ -8983,46 +8954,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":504 + /* "dijkstra3d.pyx":510 * else: * output32 = bidirectional_dijkstra3d[uint64_t, uint32_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_53 = 0; - __pyx_t_54 = 0; - __pyx_t_55 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_53 < 0) { - __pyx_t_53 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_53 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_53 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_54 < 0) { - __pyx_t_54 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_54 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_54 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_55 < 0) { - __pyx_t_55 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_55 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_55 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 504, __pyx_L1_error) + __PYX_ERR(0, 510, __pyx_L1_error) } - /* "dijkstra3d.pyx":503 + /* "dijkstra3d.pyx":509 * ) * else: * output32 = bidirectional_dijkstra3d[uint64_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_53 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_54 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_55 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_12 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L15:; - /* "dijkstra3d.pyx":495 + /* "dijkstra3d.pyx":501 * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) * if bidirectional: # <<<<<<<<<<<<<< @@ -9032,64 +9003,64 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L14; } - /* "dijkstra3d.pyx":508 + /* "dijkstra3d.pyx":514 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint64_t, uint64_t]( */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 508, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 514, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":509 + /* "dijkstra3d.pyx":515 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = compass_guided_dijkstra3d[uint64_t, uint64_t]( * &arr_memview64[0,0,0], */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 509, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 515, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":511 + /* "dijkstra3d.pyx":517 * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint64_t, uint64_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_56 = 0; - __pyx_t_57 = 0; - __pyx_t_58 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_56 < 0) { - __pyx_t_56 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_56 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_56 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_57 < 0) { - __pyx_t_57 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_57 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_57 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_58 < 0) { - __pyx_t_58 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_58 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_58 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 511, __pyx_L1_error) + __PYX_ERR(0, 517, __pyx_L1_error) } - /* "dijkstra3d.pyx":510 + /* "dijkstra3d.pyx":516 * elif compass: * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint64_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_56 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_57 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_58 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_10 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); - /* "dijkstra3d.pyx":509 + /* "dijkstra3d.pyx":515 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9099,7 +9070,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L16; } - /* "dijkstra3d.pyx":517 + /* "dijkstra3d.pyx":523 * ) * else: * output32 = compass_guided_dijkstra3d[uint64_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9108,46 +9079,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":518 + /* "dijkstra3d.pyx":524 * else: * output32 = compass_guided_dijkstra3d[uint64_t, uint32_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_59 = 0; - __pyx_t_60 = 0; - __pyx_t_61 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_59 < 0) { - __pyx_t_59 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_59 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_59 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_60 < 0) { - __pyx_t_60 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_60 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_60 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_61 < 0) { - __pyx_t_61 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_61 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_61 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 518, __pyx_L1_error) + __PYX_ERR(0, 524, __pyx_L1_error) } - /* "dijkstra3d.pyx":517 + /* "dijkstra3d.pyx":523 * ) * else: * output32 = compass_guided_dijkstra3d[uint64_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_59 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_60 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_61 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_12 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); } __pyx_L16:; - /* "dijkstra3d.pyx":508 + /* "dijkstra3d.pyx":514 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< @@ -9157,7 +9128,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L14; } - /* "dijkstra3d.pyx":524 + /* "dijkstra3d.pyx":530 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9165,47 +9136,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec * &arr_memview64[0,0,0], */ /*else*/ { - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 524, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 530, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":526 + /* "dijkstra3d.pyx":532 * if sixtyfourbit: * output64 = dijkstra3d[uint64_t, uint64_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_62 = 0; - __pyx_t_63 = 0; - __pyx_t_64 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_62 < 0) { - __pyx_t_62 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_62 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_62 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_63 < 0) { - __pyx_t_63 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_63 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_63 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_64 < 0) { - __pyx_t_64 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_64 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_64 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 526, __pyx_L1_error) + __PYX_ERR(0, 532, __pyx_L1_error) } - /* "dijkstra3d.pyx":525 + /* "dijkstra3d.pyx":531 * else: * if sixtyfourbit: * output64 = dijkstra3d[uint64_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_62 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_63 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_64 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_10 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":524 + /* "dijkstra3d.pyx":530 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9215,7 +9186,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L17; } - /* "dijkstra3d.pyx":531 + /* "dijkstra3d.pyx":537 * ) * else: * output32 = dijkstra3d[uint64_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9224,48 +9195,48 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":532 + /* "dijkstra3d.pyx":538 * else: * output32 = dijkstra3d[uint64_t, uint32_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_65 = 0; - __pyx_t_66 = 0; - __pyx_t_67 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_65 < 0) { - __pyx_t_65 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_65 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_65 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_66 < 0) { - __pyx_t_66 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_66 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_66 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_67 < 0) { - __pyx_t_67 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_67 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_67 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 532, __pyx_L1_error) + __PYX_ERR(0, 538, __pyx_L1_error) } - /* "dijkstra3d.pyx":531 + /* "dijkstra3d.pyx":537 * ) * else: * output32 = dijkstra3d[uint64_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_65 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_66 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_67 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_12 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L17:; } __pyx_L14:; - /* "dijkstra3d.pyx":493 + /* "dijkstra3d.pyx":499 * src, sink, connectivity * ) * elif dtype in (np.int64, np.uint64): # <<<<<<<<<<<<<< @@ -9275,7 +9246,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L3; } - /* "dijkstra3d.pyx":536 + /* "dijkstra3d.pyx":542 * src, sink, connectivity * ) * elif dtype in (np.int32, np.uint32): # <<<<<<<<<<<<<< @@ -9284,47 +9255,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_5 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_8) { } else { - __pyx_t_48 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; goto __pyx_L18_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_48 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; __pyx_L18_bool_binop_done:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = (__pyx_t_48 != 0); + __pyx_t_8 = (__pyx_t_15 != 0); if (__pyx_t_8) { - /* "dijkstra3d.pyx":537 + /* "dijkstra3d.pyx":543 * ) * elif dtype in (np.int32, np.uint32): * arr_memview32 = data.astype(np.uint32) # <<<<<<<<<<<<<< * if bidirectional: * if sixtyfourbit: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -9340,73 +9311,73 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 537, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_68 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_68.memview)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_arr_memview32 = __pyx_t_68; - __pyx_t_68.memview = NULL; - __pyx_t_68.data = NULL; + __pyx_v_arr_memview32 = __pyx_t_17; + __pyx_t_17.memview = NULL; + __pyx_t_17.data = NULL; - /* "dijkstra3d.pyx":538 + /* "dijkstra3d.pyx":544 * elif dtype in (np.int32, np.uint32): * arr_memview32 = data.astype(np.uint32) * if bidirectional: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint32_t, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 544, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":539 + /* "dijkstra3d.pyx":545 * arr_memview32 = data.astype(np.uint32) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = bidirectional_dijkstra3d[uint32_t, uint64_t]( * &arr_memview32[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 545, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":541 + /* "dijkstra3d.pyx":547 * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint32_t, uint64_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_69 = 0; - __pyx_t_70 = 0; - __pyx_t_71 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_69 < 0) { - __pyx_t_69 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_69 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_69 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_70 < 0) { - __pyx_t_70 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_70 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_70 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_71 < 0) { - __pyx_t_71 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_71 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_71 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 541, __pyx_L1_error) + __PYX_ERR(0, 547, __pyx_L1_error) } - /* "dijkstra3d.pyx":540 + /* "dijkstra3d.pyx":546 * if bidirectional: * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint32_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_69 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_70 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_71 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_10 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":539 + /* "dijkstra3d.pyx":545 * arr_memview32 = data.astype(np.uint32) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9416,7 +9387,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L21; } - /* "dijkstra3d.pyx":546 + /* "dijkstra3d.pyx":552 * ) * else: * output32 = bidirectional_dijkstra3d[uint32_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9425,46 +9396,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":547 + /* "dijkstra3d.pyx":553 * else: * output32 = bidirectional_dijkstra3d[uint32_t, uint32_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_72 = 0; - __pyx_t_73 = 0; - __pyx_t_74 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_72 < 0) { - __pyx_t_72 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_72 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_72 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_73 < 0) { - __pyx_t_73 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_73 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_73 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_74 < 0) { - __pyx_t_74 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_74 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_74 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 547, __pyx_L1_error) + __PYX_ERR(0, 553, __pyx_L1_error) } - /* "dijkstra3d.pyx":546 + /* "dijkstra3d.pyx":552 * ) * else: * output32 = bidirectional_dijkstra3d[uint32_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_72 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_73 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_74 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_12 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L21:; - /* "dijkstra3d.pyx":538 + /* "dijkstra3d.pyx":544 * elif dtype in (np.int32, np.uint32): * arr_memview32 = data.astype(np.uint32) * if bidirectional: # <<<<<<<<<<<<<< @@ -9474,64 +9445,64 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L20; } - /* "dijkstra3d.pyx":551 + /* "dijkstra3d.pyx":557 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint32_t, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 557, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":552 + /* "dijkstra3d.pyx":558 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = compass_guided_dijkstra3d[uint32_t, uint64_t]( * &arr_memview32[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 558, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":554 + /* "dijkstra3d.pyx":560 * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint32_t, uint64_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_75 = 0; - __pyx_t_76 = 0; - __pyx_t_77 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_75 < 0) { - __pyx_t_75 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_75 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_75 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_76 < 0) { - __pyx_t_76 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_76 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_76 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_77 < 0) { - __pyx_t_77 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_77 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_77 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 554, __pyx_L1_error) + __PYX_ERR(0, 560, __pyx_L1_error) } - /* "dijkstra3d.pyx":553 + /* "dijkstra3d.pyx":559 * elif compass: * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint32_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_75 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_76 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_77 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_10 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); - /* "dijkstra3d.pyx":552 + /* "dijkstra3d.pyx":558 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9541,7 +9512,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L22; } - /* "dijkstra3d.pyx":560 + /* "dijkstra3d.pyx":566 * ) * else: * output32 = compass_guided_dijkstra3d[uint32_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9550,46 +9521,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":561 + /* "dijkstra3d.pyx":567 * else: * output32 = compass_guided_dijkstra3d[uint32_t, uint32_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_78 = 0; - __pyx_t_79 = 0; - __pyx_t_80 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_78 < 0) { - __pyx_t_78 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_78 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_78 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_79 < 0) { - __pyx_t_79 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_79 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_79 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_80 < 0) { - __pyx_t_80 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_80 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_80 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 561, __pyx_L1_error) + __PYX_ERR(0, 567, __pyx_L1_error) } - /* "dijkstra3d.pyx":560 + /* "dijkstra3d.pyx":566 * ) * else: * output32 = compass_guided_dijkstra3d[uint32_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_78 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_79 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_80 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_12 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); } __pyx_L22:; - /* "dijkstra3d.pyx":551 + /* "dijkstra3d.pyx":557 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< @@ -9599,7 +9570,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L20; } - /* "dijkstra3d.pyx":567 + /* "dijkstra3d.pyx":573 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9607,47 +9578,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec * &arr_memview32[0,0,0], */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 573, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":569 + /* "dijkstra3d.pyx":575 * if sixtyfourbit: * output64 = dijkstra3d[uint32_t, uint64_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_81 = 0; - __pyx_t_82 = 0; - __pyx_t_83 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_81 < 0) { - __pyx_t_81 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_81 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_81 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_82 < 0) { - __pyx_t_82 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_82 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_82 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_83 < 0) { - __pyx_t_83 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_83 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_83 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 569, __pyx_L1_error) + __PYX_ERR(0, 575, __pyx_L1_error) } - /* "dijkstra3d.pyx":568 + /* "dijkstra3d.pyx":574 * else: * if sixtyfourbit: * output64 = dijkstra3d[uint32_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_81 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_82 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_83 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_10 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":567 + /* "dijkstra3d.pyx":573 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9657,7 +9628,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L23; } - /* "dijkstra3d.pyx":574 + /* "dijkstra3d.pyx":580 * ) * else: * output32 = dijkstra3d[uint32_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9666,48 +9637,48 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":575 + /* "dijkstra3d.pyx":581 * else: * output32 = dijkstra3d[uint32_t, uint32_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_84 = 0; - __pyx_t_85 = 0; - __pyx_t_86 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_84 < 0) { - __pyx_t_84 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_84 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_84 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_85 < 0) { - __pyx_t_85 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_85 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_85 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_86 < 0) { - __pyx_t_86 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_86 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_86 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 575, __pyx_L1_error) + __PYX_ERR(0, 581, __pyx_L1_error) } - /* "dijkstra3d.pyx":574 + /* "dijkstra3d.pyx":580 * ) * else: * output32 = dijkstra3d[uint32_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_84 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_85 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_86 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_12 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L23:; } __pyx_L20:; - /* "dijkstra3d.pyx":536 + /* "dijkstra3d.pyx":542 * src, sink, connectivity * ) * elif dtype in (np.int32, np.uint32): # <<<<<<<<<<<<<< @@ -9717,7 +9688,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L3; } - /* "dijkstra3d.pyx":579 + /* "dijkstra3d.pyx":585 * src, sink, connectivity * ) * elif dtype in (np.int16, np.uint16): # <<<<<<<<<<<<<< @@ -9726,47 +9697,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_5 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!__pyx_t_48) { + if (!__pyx_t_15) { } else { - __pyx_t_8 = __pyx_t_48; + __pyx_t_8 = __pyx_t_15; goto __pyx_L24_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __pyx_t_48; + __pyx_t_8 = __pyx_t_15; __pyx_L24_bool_binop_done:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_48 = (__pyx_t_8 != 0); - if (__pyx_t_48) { + __pyx_t_15 = (__pyx_t_8 != 0); + if (__pyx_t_15) { - /* "dijkstra3d.pyx":580 + /* "dijkstra3d.pyx":586 * ) * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) # <<<<<<<<<<<<<< * if bidirectional: * if sixtyfourbit: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -9782,73 +9753,73 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 580, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_87 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint16_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_87.memview)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint16_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_arr_memview16 = __pyx_t_87; - __pyx_t_87.memview = NULL; - __pyx_t_87.data = NULL; + __pyx_v_arr_memview16 = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; - /* "dijkstra3d.pyx":581 + /* "dijkstra3d.pyx":587 * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) * if bidirectional: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint16_t, uint64_t]( */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 581, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 587, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":582 + /* "dijkstra3d.pyx":588 * arr_memview16 = data.astype(np.uint16) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = bidirectional_dijkstra3d[uint16_t, uint64_t]( * &arr_memview16[0,0,0], */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 582, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 588, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":584 + /* "dijkstra3d.pyx":590 * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint16_t, uint64_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_88 = 0; - __pyx_t_89 = 0; - __pyx_t_90 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_88 < 0) { - __pyx_t_88 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_88 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_88 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_89 < 0) { - __pyx_t_89 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_89 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_89 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_90 < 0) { - __pyx_t_90 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_90 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_90 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 584, __pyx_L1_error) + __PYX_ERR(0, 590, __pyx_L1_error) } - /* "dijkstra3d.pyx":583 + /* "dijkstra3d.pyx":589 * if bidirectional: * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint16_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_88 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_89 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_90 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_10 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":582 + /* "dijkstra3d.pyx":588 * arr_memview16 = data.astype(np.uint16) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9858,7 +9829,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L27; } - /* "dijkstra3d.pyx":589 + /* "dijkstra3d.pyx":595 * ) * else: * output32 = bidirectional_dijkstra3d[uint16_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9867,46 +9838,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":590 + /* "dijkstra3d.pyx":596 * else: * output32 = bidirectional_dijkstra3d[uint16_t, uint32_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_91 = 0; - __pyx_t_92 = 0; - __pyx_t_93 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_91 < 0) { - __pyx_t_91 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_91 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_91 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_92 < 0) { - __pyx_t_92 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_92 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_92 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_93 < 0) { - __pyx_t_93 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_93 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_93 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 590, __pyx_L1_error) + __PYX_ERR(0, 596, __pyx_L1_error) } - /* "dijkstra3d.pyx":589 + /* "dijkstra3d.pyx":595 * ) * else: * output32 = bidirectional_dijkstra3d[uint16_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_91 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_92 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_93 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_12 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L27:; - /* "dijkstra3d.pyx":581 + /* "dijkstra3d.pyx":587 * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) * if bidirectional: # <<<<<<<<<<<<<< @@ -9916,64 +9887,64 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L26; } - /* "dijkstra3d.pyx":594 + /* "dijkstra3d.pyx":600 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint16_t, uint64_t]( */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 594, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 600, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":595 + /* "dijkstra3d.pyx":601 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = compass_guided_dijkstra3d[uint16_t, uint64_t]( * &arr_memview16[0,0,0], */ - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 595, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":597 + /* "dijkstra3d.pyx":603 * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint16_t, uint64_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_94 = 0; - __pyx_t_95 = 0; - __pyx_t_96 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_94 < 0) { - __pyx_t_94 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_94 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_94 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_95 < 0) { - __pyx_t_95 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_95 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_95 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_96 < 0) { - __pyx_t_96 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_96 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_96 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 597, __pyx_L1_error) + __PYX_ERR(0, 603, __pyx_L1_error) } - /* "dijkstra3d.pyx":596 + /* "dijkstra3d.pyx":602 * elif compass: * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint16_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_94 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_95 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_96 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_10 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); - /* "dijkstra3d.pyx":595 + /* "dijkstra3d.pyx":601 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -9983,7 +9954,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L28; } - /* "dijkstra3d.pyx":603 + /* "dijkstra3d.pyx":609 * ) * else: * output32 = compass_guided_dijkstra3d[uint16_t, uint32_t]( # <<<<<<<<<<<<<< @@ -9992,46 +9963,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":604 + /* "dijkstra3d.pyx":610 * else: * output32 = compass_guided_dijkstra3d[uint16_t, uint32_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_97 = 0; - __pyx_t_98 = 0; - __pyx_t_99 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_97 < 0) { - __pyx_t_97 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_97 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_97 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_98 < 0) { - __pyx_t_98 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_98 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_98 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_99 < 0) { - __pyx_t_99 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_99 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_99 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 604, __pyx_L1_error) + __PYX_ERR(0, 610, __pyx_L1_error) } - /* "dijkstra3d.pyx":603 + /* "dijkstra3d.pyx":609 * ) * else: * output32 = compass_guided_dijkstra3d[uint16_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_97 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_98 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_99 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_12 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); } __pyx_L28:; - /* "dijkstra3d.pyx":594 + /* "dijkstra3d.pyx":600 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< @@ -10041,7 +10012,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L26; } - /* "dijkstra3d.pyx":610 + /* "dijkstra3d.pyx":616 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10049,47 +10020,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec * &arr_memview16[0,0,0], */ /*else*/ { - __pyx_t_48 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_48 < 0)) __PYX_ERR(0, 610, __pyx_L1_error) - if (__pyx_t_48) { + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 616, __pyx_L1_error) + if (__pyx_t_15) { - /* "dijkstra3d.pyx":612 + /* "dijkstra3d.pyx":618 * if sixtyfourbit: * output64 = dijkstra3d[uint16_t, uint64_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_100 = 0; - __pyx_t_101 = 0; - __pyx_t_102 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_100 < 0) { - __pyx_t_100 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_100 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_100 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_101 < 0) { - __pyx_t_101 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_101 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_101 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_102 < 0) { - __pyx_t_102 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_102 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_102 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 612, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } - /* "dijkstra3d.pyx":611 + /* "dijkstra3d.pyx":617 * else: * if sixtyfourbit: * output64 = dijkstra3d[uint16_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_100 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_101 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_102 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_10 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":610 + /* "dijkstra3d.pyx":616 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10099,7 +10070,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L29; } - /* "dijkstra3d.pyx":617 + /* "dijkstra3d.pyx":623 * ) * else: * output32 = dijkstra3d[uint16_t, uint32_t]( # <<<<<<<<<<<<<< @@ -10108,48 +10079,48 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":618 + /* "dijkstra3d.pyx":624 * else: * output32 = dijkstra3d[uint16_t, uint32_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_103 = 0; - __pyx_t_104 = 0; - __pyx_t_105 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_103 < 0) { - __pyx_t_103 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_103 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_103 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_104 < 0) { - __pyx_t_104 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_104 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_104 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_105 < 0) { - __pyx_t_105 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_105 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_105 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 618, __pyx_L1_error) + __PYX_ERR(0, 624, __pyx_L1_error) } - /* "dijkstra3d.pyx":617 + /* "dijkstra3d.pyx":623 * ) * else: * output32 = dijkstra3d[uint16_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_103 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_104 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_105 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_12 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L29:; } __pyx_L26:; - /* "dijkstra3d.pyx":579 + /* "dijkstra3d.pyx":585 * src, sink, connectivity * ) * elif dtype in (np.int16, np.uint16): # <<<<<<<<<<<<<< @@ -10159,7 +10130,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L3; } - /* "dijkstra3d.pyx":622 + /* "dijkstra3d.pyx":628 * src, sink, connectivity * ) * elif dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -10168,61 +10139,61 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_5 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_8) { } else { - __pyx_t_48 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; goto __pyx_L30_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_8) { } else { - __pyx_t_48 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; goto __pyx_L30_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_48 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; __pyx_L30_bool_binop_done:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = (__pyx_t_48 != 0); + __pyx_t_8 = (__pyx_t_15 != 0); if (__pyx_t_8) { - /* "dijkstra3d.pyx":623 + /* "dijkstra3d.pyx":629 * ) * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) # <<<<<<<<<<<<<< * if bidirectional: * if sixtyfourbit: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -10238,73 +10209,73 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_106 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_106.memview)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_arr_memview8 = __pyx_t_106; - __pyx_t_106.memview = NULL; - __pyx_t_106.data = NULL; + __pyx_v_arr_memview8 = __pyx_t_19; + __pyx_t_19.memview = NULL; + __pyx_t_19.data = NULL; - /* "dijkstra3d.pyx":624 + /* "dijkstra3d.pyx":630 * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) * if bidirectional: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint8_t, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 630, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":625 + /* "dijkstra3d.pyx":631 * arr_memview8 = data.astype(np.uint8) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = bidirectional_dijkstra3d[uint8_t, uint64_t]( * &arr_memview8[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 631, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":627 + /* "dijkstra3d.pyx":633 * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint8_t, uint64_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_107 = 0; - __pyx_t_108 = 0; - __pyx_t_109 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_107 < 0) { - __pyx_t_107 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_107 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_107 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_108 < 0) { - __pyx_t_108 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_108 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_108 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_109 < 0) { - __pyx_t_109 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_109 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_109 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 627, __pyx_L1_error) + __PYX_ERR(0, 633, __pyx_L1_error) } - /* "dijkstra3d.pyx":626 + /* "dijkstra3d.pyx":632 * if bidirectional: * if sixtyfourbit: * output64 = bidirectional_dijkstra3d[uint8_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_107 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_108 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_109 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_10 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":625 + /* "dijkstra3d.pyx":631 * arr_memview8 = data.astype(np.uint8) * if bidirectional: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10314,7 +10285,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L34; } - /* "dijkstra3d.pyx":632 + /* "dijkstra3d.pyx":638 * ) * else: * output32 = bidirectional_dijkstra3d[uint8_t, uint32_t]( # <<<<<<<<<<<<<< @@ -10323,46 +10294,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":633 + /* "dijkstra3d.pyx":639 * else: * output32 = bidirectional_dijkstra3d[uint8_t, uint32_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_110 = 0; - __pyx_t_111 = 0; - __pyx_t_112 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_110 < 0) { - __pyx_t_110 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_110 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_110 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_111 < 0) { - __pyx_t_111 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_111 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_111 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_112 < 0) { - __pyx_t_112 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_112 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_112 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 633, __pyx_L1_error) + __PYX_ERR(0, 639, __pyx_L1_error) } - /* "dijkstra3d.pyx":632 + /* "dijkstra3d.pyx":638 * ) * else: * output32 = bidirectional_dijkstra3d[uint8_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_110 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_111 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_112 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::bidirectional_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_12 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L34:; - /* "dijkstra3d.pyx":624 + /* "dijkstra3d.pyx":630 * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) * if bidirectional: # <<<<<<<<<<<<<< @@ -10372,64 +10343,64 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L33; } - /* "dijkstra3d.pyx":637 + /* "dijkstra3d.pyx":643 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint8_t, uint64_t]( */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_compass); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 643, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":638 + /* "dijkstra3d.pyx":644 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< * output64 = compass_guided_dijkstra3d[uint8_t, uint64_t]( * &arr_memview8[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 644, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":640 + /* "dijkstra3d.pyx":646 * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint8_t, uint64_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_113 = 0; - __pyx_t_114 = 0; - __pyx_t_115 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_113 < 0) { - __pyx_t_113 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_113 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_113 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_114 < 0) { - __pyx_t_114 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_114 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_114 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_115 < 0) { - __pyx_t_115 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_115 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_115 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 640, __pyx_L1_error) + __PYX_ERR(0, 646, __pyx_L1_error) } - /* "dijkstra3d.pyx":639 + /* "dijkstra3d.pyx":645 * elif compass: * if sixtyfourbit: * output64 = compass_guided_dijkstra3d[uint8_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_113 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_114 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_115 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output64 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_10 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); - /* "dijkstra3d.pyx":638 + /* "dijkstra3d.pyx":644 * ) * elif compass: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10439,7 +10410,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L35; } - /* "dijkstra3d.pyx":646 + /* "dijkstra3d.pyx":652 * ) * else: * output32 = compass_guided_dijkstra3d[uint8_t, uint32_t]( # <<<<<<<<<<<<<< @@ -10448,46 +10419,46 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":647 + /* "dijkstra3d.pyx":653 * else: * output32 = compass_guided_dijkstra3d[uint8_t, uint32_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, */ - __pyx_t_116 = 0; - __pyx_t_117 = 0; - __pyx_t_118 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_116 < 0) { - __pyx_t_116 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_116 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_116 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_117 < 0) { - __pyx_t_117 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_117 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_117 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_118 < 0) { - __pyx_t_118 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_118 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_118 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 647, __pyx_L1_error) + __PYX_ERR(0, 653, __pyx_L1_error) } - /* "dijkstra3d.pyx":646 + /* "dijkstra3d.pyx":652 * ) * else: * output32 = compass_guided_dijkstra3d[uint8_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_116 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_117 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_118 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); + __pyx_v_output32 = ((std::vector )dijkstra::compass_guided_dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_12 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity, __pyx_v_compass_norm)); } __pyx_L35:; - /* "dijkstra3d.pyx":637 + /* "dijkstra3d.pyx":643 * src, sink, connectivity * ) * elif compass: # <<<<<<<<<<<<<< @@ -10497,7 +10468,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L33; } - /* "dijkstra3d.pyx":653 + /* "dijkstra3d.pyx":659 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10505,47 +10476,47 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec * &arr_memview8[0,0,0], */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 653, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 659, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":655 + /* "dijkstra3d.pyx":661 * if sixtyfourbit: * output64 = dijkstra3d[uint8_t, uint64_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_119 = 0; - __pyx_t_120 = 0; - __pyx_t_121 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_119 < 0) { - __pyx_t_119 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_119 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_119 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_120 < 0) { - __pyx_t_120 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_120 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_120 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_121 < 0) { - __pyx_t_121 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_121 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_121 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 655, __pyx_L1_error) + __PYX_ERR(0, 661, __pyx_L1_error) } - /* "dijkstra3d.pyx":654 + /* "dijkstra3d.pyx":660 * else: * if sixtyfourbit: * output64 = dijkstra3d[uint8_t, uint64_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_119 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_120 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_121 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output64 = ((std::vector )dijkstra::dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_10 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); - /* "dijkstra3d.pyx":653 + /* "dijkstra3d.pyx":659 * ) * else: * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10555,7 +10526,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L36; } - /* "dijkstra3d.pyx":660 + /* "dijkstra3d.pyx":666 * ) * else: * output32 = dijkstra3d[uint8_t, uint32_t]( # <<<<<<<<<<<<<< @@ -10564,48 +10535,48 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { - /* "dijkstra3d.pyx":661 + /* "dijkstra3d.pyx":667 * else: * output32 = dijkstra3d[uint8_t, uint32_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, sink, connectivity */ - __pyx_t_122 = 0; - __pyx_t_123 = 0; - __pyx_t_124 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_122 < 0) { - __pyx_t_122 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_122 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_122 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_123 < 0) { - __pyx_t_123 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_123 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_123 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_124 < 0) { - __pyx_t_124 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_124 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_124 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 661, __pyx_L1_error) + __PYX_ERR(0, 667, __pyx_L1_error) } - /* "dijkstra3d.pyx":660 + /* "dijkstra3d.pyx":666 * ) * else: * output32 = dijkstra3d[uint8_t, uint32_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_122 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_123 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_124 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); + __pyx_v_output32 = ((std::vector )dijkstra::dijkstra3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_12 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, __pyx_v_sink, __pyx_v_connectivity)); } __pyx_L36:; } __pyx_L33:; - /* "dijkstra3d.pyx":622 + /* "dijkstra3d.pyx":628 * src, sink, connectivity * ) * elif dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -10615,17 +10586,17 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec } __pyx_L3:; - /* "dijkstra3d.pyx":672 + /* "dijkstra3d.pyx":678 * cdef uint64_t[:] vec_view64 * * if sixtyfourbit: # <<<<<<<<<<<<<< * output_ptr64 = &output64[0] * vec_view64 = output_ptr64 */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 678, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":673 + /* "dijkstra3d.pyx":679 * * if sixtyfourbit: * output_ptr64 = &output64[0] # <<<<<<<<<<<<<< @@ -10634,7 +10605,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ __pyx_v_output_ptr64 = ((uint64_t *)(&(__pyx_v_output64[0]))); - /* "dijkstra3d.pyx":674 + /* "dijkstra3d.pyx":680 * if sixtyfourbit: * output_ptr64 = &output64[0] * vec_view64 = output_ptr64 # <<<<<<<<<<<<<< @@ -10643,66 +10614,65 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ if (!__pyx_v_output_ptr64) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); - __PYX_ERR(0, 674, __pyx_L1_error) + __PYX_ERR(0, 680, __pyx_L1_error) } - __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint64_t); - __pyx_t_5 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_output64.size())); - if (unlikely(!__pyx_t_7 || !__pyx_t_5 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint64_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_output64.size())); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_125 = __pyx_array_new(__pyx_t_5, sizeof(uint64_t), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_v_output_ptr64); - if (unlikely(!__pyx_t_125)) __PYX_ERR(0, 674, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_125); + __pyx_t_20 = __pyx_array_new(__pyx_t_5, sizeof(uint64_t), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_v_output_ptr64); + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_126 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(((PyObject *)__pyx_t_125), PyBUF_WRITABLE); if (unlikely(!__pyx_t_126.memview)) __PYX_ERR(0, 674, __pyx_L1_error) - __Pyx_DECREF(((PyObject *)__pyx_t_125)); __pyx_t_125 = 0; - __pyx_v_vec_view64 = __pyx_t_126; - __pyx_t_126.memview = NULL; - __pyx_t_126.data = NULL; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint64_t(((PyObject *)__pyx_t_20), PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 680, __pyx_L1_error) + __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; + __pyx_v_vec_view64 = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; - /* "dijkstra3d.pyx":675 + /* "dijkstra3d.pyx":681 * output_ptr64 = &output64[0] * vec_view64 = output_ptr64 * buf = bytearray(vec_view64[:]) # <<<<<<<<<<<<<< * output = np.frombuffer(buf, dtype=np.uint64) * else: */ - __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_vec_view64, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint64_t, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_vec_view64, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint64_t, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_buf = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "dijkstra3d.pyx":676 + /* "dijkstra3d.pyx":682 * vec_view64 = output_ptr64 * buf = bytearray(vec_view64[:]) * output = np.frombuffer(buf, dtype=np.uint64) # <<<<<<<<<<<<<< * else: * output_ptr32 = &output32[0] */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_buf); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 676, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -10710,7 +10680,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_v_output = __pyx_t_6; __pyx_t_6 = 0; - /* "dijkstra3d.pyx":672 + /* "dijkstra3d.pyx":678 * cdef uint64_t[:] vec_view64 * * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -10720,7 +10690,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec goto __pyx_L37; } - /* "dijkstra3d.pyx":678 + /* "dijkstra3d.pyx":684 * output = np.frombuffer(buf, dtype=np.uint64) * else: * output_ptr32 = &output32[0] # <<<<<<<<<<<<<< @@ -10730,7 +10700,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec /*else*/ { __pyx_v_output_ptr32 = ((uint32_t *)(&(__pyx_v_output32[0]))); - /* "dijkstra3d.pyx":679 + /* "dijkstra3d.pyx":685 * else: * output_ptr32 = &output32[0] * vec_view32 = output_ptr32 # <<<<<<<<<<<<<< @@ -10739,66 +10709,65 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ if (!__pyx_v_output_ptr32) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); - __PYX_ERR(0, 679, __pyx_L1_error) + __PYX_ERR(0, 685, __pyx_L1_error) } - __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint32_t); - __pyx_t_6 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_output32.size())); - if (unlikely(!__pyx_t_4 || !__pyx_t_6 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_nn_uint32_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_output32.size())); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_125 = __pyx_array_new(__pyx_t_6, sizeof(uint32_t), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_v_output_ptr32); - if (unlikely(!__pyx_t_125)) __PYX_ERR(0, 679, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_125); + __pyx_t_20 = __pyx_array_new(__pyx_t_6, sizeof(uint32_t), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_v_output_ptr32); + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_127 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(((PyObject *)__pyx_t_125), PyBUF_WRITABLE); if (unlikely(!__pyx_t_127.memview)) __PYX_ERR(0, 679, __pyx_L1_error) - __Pyx_DECREF(((PyObject *)__pyx_t_125)); __pyx_t_125 = 0; - __pyx_v_vec_view32 = __pyx_t_127; - __pyx_t_127.memview = NULL; - __pyx_t_127.data = NULL; + __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn_uint32_t(((PyObject *)__pyx_t_20), PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; + __pyx_v_vec_view32 = __pyx_t_22; + __pyx_t_22.memview = NULL; + __pyx_t_22.data = NULL; - /* "dijkstra3d.pyx":680 + /* "dijkstra3d.pyx":686 * output_ptr32 = &output32[0] * vec_view32 = output_ptr32 * buf = bytearray(vec_view32[:]) # <<<<<<<<<<<<<< * output = np.frombuffer(buf, dtype=np.uint32) * */ - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_vec_view32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_vec_view32, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn_uint32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn_uint32_t, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_buf = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "dijkstra3d.pyx":681 + /* "dijkstra3d.pyx":687 * vec_view32 = output_ptr32 * buf = bytearray(vec_view32[:]) * output = np.frombuffer(buf, dtype=np.uint32) # <<<<<<<<<<<<<< * * if bidirectional: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_buf); - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 681, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -10808,17 +10777,17 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec } __pyx_L37:; - /* "dijkstra3d.pyx":683 + /* "dijkstra3d.pyx":689 * output = np.frombuffer(buf, dtype=np.uint32) * * if bidirectional: # <<<<<<<<<<<<<< * return output * else: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_bidirectional); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 689, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":684 + /* "dijkstra3d.pyx":690 * * if bidirectional: * return output # <<<<<<<<<<<<<< @@ -10830,7 +10799,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __pyx_r = __pyx_v_output; goto __pyx_L0; - /* "dijkstra3d.pyx":683 + /* "dijkstra3d.pyx":689 * output = np.frombuffer(buf, dtype=np.uint32) * * if bidirectional: # <<<<<<<<<<<<<< @@ -10839,7 +10808,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ } - /* "dijkstra3d.pyx":686 + /* "dijkstra3d.pyx":692 * return output * else: * return output[::-1] # <<<<<<<<<<<<<< @@ -10848,14 +10817,14 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_output, __pyx_slice__3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_output, __pyx_slice__3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - /* "dijkstra3d.pyx":382 + /* "dijkstra3d.pyx":388 * return ptlist * * def _execute_dijkstra( # <<<<<<<<<<<<<< @@ -10872,14 +10841,14 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_29, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_49, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_68, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_87, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_106, 1); - __Pyx_XDECREF(((PyObject *)__pyx_t_125)); - __PYX_XDEC_MEMVIEW(&__pyx_t_126, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_127, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1); + __Pyx_XDECREF(((PyObject *)__pyx_t_20)); + __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_22, 1); __Pyx_AddTraceback("dijkstra3d._execute_dijkstra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -10900,7 +10869,7 @@ static PyObject *__pyx_pf_10dijkstra3d_14_execute_dijkstra(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "dijkstra3d.pyx":688 +/* "dijkstra3d.pyx":694 * return output[::-1] * * def _execute_distance_field(data, source): # <<<<<<<<<<<<<< @@ -10914,6 +10883,9 @@ static PyMethodDef __pyx_mdef_10dijkstra3d_17_execute_distance_field = {"_execut static PyObject *__pyx_pw_10dijkstra3d_17_execute_distance_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_data = 0; PyObject *__pyx_v_source = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_execute_distance_field (wrapper)", 0); @@ -10940,11 +10912,11 @@ static PyObject *__pyx_pw_10dijkstra3d_17_execute_distance_field(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_distance_field", 1, 2, 2, 1); __PYX_ERR(0, 688, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_distance_field", 1, 2, 2, 1); __PYX_ERR(0, 694, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_distance_field") < 0)) __PYX_ERR(0, 688, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_distance_field") < 0)) __PYX_ERR(0, 694, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -10957,7 +10929,7 @@ static PyObject *__pyx_pw_10dijkstra3d_17_execute_distance_field(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_execute_distance_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 688, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_distance_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 694, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d._execute_distance_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11002,158 +10974,146 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P Py_ssize_t __pyx_t_12; int __pyx_t_13; __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_15; - Py_ssize_t __pyx_t_16; - Py_ssize_t __pyx_t_17; - int __pyx_t_18; + int __pyx_t_15; + __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } }; __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_20; - Py_ssize_t __pyx_t_21; - Py_ssize_t __pyx_t_22; - __Pyx_memviewslice __pyx_t_23 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_24; - Py_ssize_t __pyx_t_25; - Py_ssize_t __pyx_t_26; - __Pyx_memviewslice __pyx_t_27 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_28; - Py_ssize_t __pyx_t_29; - Py_ssize_t __pyx_t_30; - __Pyx_memviewslice __pyx_t_31 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_32; - Py_ssize_t __pyx_t_33; - Py_ssize_t __pyx_t_34; - struct __pyx_array_obj *__pyx_t_35 = NULL; - __Pyx_memviewslice __pyx_t_36 = { 0, 0, { 0 }, { 0 }, { 0 } }; + struct __pyx_array_obj *__pyx_t_20 = NULL; + __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_execute_distance_field", 0); - /* "dijkstra3d.pyx":696 + /* "dijkstra3d.pyx":702 * cdef double[:,:,:] arr_memviewdouble * * cdef size_t sx = data.shape[0] # <<<<<<<<<<<<<< * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sx = __pyx_t_3; - /* "dijkstra3d.pyx":697 + /* "dijkstra3d.pyx":703 * * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] # <<<<<<<<<<<<<< * cdef size_t sz = data.shape[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sy = __pyx_t_3; - /* "dijkstra3d.pyx":698 + /* "dijkstra3d.pyx":704 * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] # <<<<<<<<<<<<<< * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sz = __pyx_t_3; - /* "dijkstra3d.pyx":700 + /* "dijkstra3d.pyx":706 * cdef size_t sz = data.shape[2] * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) # <<<<<<<<<<<<<< * * cdef float* dist */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_src = __pyx_t_3; - /* "dijkstra3d.pyx":704 + /* "dijkstra3d.pyx":710 * cdef float* dist * * dtype = data.dtype # <<<<<<<<<<<<<< * * if dtype == np.float32: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dtype = __pyx_t_6; __pyx_t_6 = 0; - /* "dijkstra3d.pyx":706 + /* "dijkstra3d.pyx":712 * dtype = data.dtype * * if dtype == np.float32: # <<<<<<<<<<<<<< * arr_memviewfloat = data * dist = distance_field3d[float]( */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":707 + /* "dijkstra3d.pyx":713 * * if dtype == np.float32: * arr_memviewfloat = data # <<<<<<<<<<<<<< * dist = distance_field3d[float]( * &arr_memviewfloat[0,0,0], */ - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 713, __pyx_L1_error) __pyx_v_arr_memviewfloat = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "dijkstra3d.pyx":709 + /* "dijkstra3d.pyx":715 * arr_memviewfloat = data * dist = distance_field3d[float]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< @@ -11178,10 +11138,10 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 709, __pyx_L1_error) + __PYX_ERR(0, 715, __pyx_L1_error) } - /* "dijkstra3d.pyx":708 + /* "dijkstra3d.pyx":714 * if dtype == np.float32: * arr_memviewfloat = data * dist = distance_field3d[float]( # <<<<<<<<<<<<<< @@ -11190,7 +11150,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ __pyx_v_dist = dijkstra::distance_field3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_10 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); - /* "dijkstra3d.pyx":706 + /* "dijkstra3d.pyx":712 * dtype = data.dtype * * if dtype == np.float32: # <<<<<<<<<<<<<< @@ -11200,74 +11160,74 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":713 + /* "dijkstra3d.pyx":719 * src * ) * elif dtype == np.float64: # <<<<<<<<<<<<<< * arr_memviewdouble = data * dist = distance_field3d[double]( */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":714 + /* "dijkstra3d.pyx":720 * ) * elif dtype == np.float64: * arr_memviewdouble = data # <<<<<<<<<<<<<< * dist = distance_field3d[double]( * &arr_memviewdouble[0,0,0], */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 720, __pyx_L1_error) __pyx_v_arr_memviewdouble = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "dijkstra3d.pyx":716 + /* "dijkstra3d.pyx":722 * arr_memviewdouble = data * dist = distance_field3d[double]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src */ - __pyx_t_15 = 0; - __pyx_t_16 = 0; - __pyx_t_17 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_15 < 0) { - __pyx_t_15 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_15 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_15 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_16 < 0) { - __pyx_t_16 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_16 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_17 < 0) { - __pyx_t_17 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 716, __pyx_L1_error) + __PYX_ERR(0, 722, __pyx_L1_error) } - /* "dijkstra3d.pyx":715 + /* "dijkstra3d.pyx":721 * elif dtype == np.float64: * arr_memviewdouble = data * dist = distance_field3d[double]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - __pyx_v_dist = dijkstra::distance_field3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_15 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_16 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_17 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); + __pyx_v_dist = dijkstra::distance_field3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_12 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); - /* "dijkstra3d.pyx":713 + /* "dijkstra3d.pyx":719 * src * ) * elif dtype == np.float64: # <<<<<<<<<<<<<< @@ -11277,7 +11237,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":720 + /* "dijkstra3d.pyx":726 * src * ) * elif dtype in (np.int64, np.uint64): # <<<<<<<<<<<<<< @@ -11286,47 +11246,47 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_6 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!__pyx_t_18) { + if (!__pyx_t_15) { } else { - __pyx_t_8 = __pyx_t_18; + __pyx_t_8 = __pyx_t_15; goto __pyx_L4_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __pyx_t_18; + __pyx_t_8 = __pyx_t_15; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_18 = (__pyx_t_8 != 0); - if (__pyx_t_18) { + __pyx_t_15 = (__pyx_t_8 != 0); + if (__pyx_t_15) { - /* "dijkstra3d.pyx":721 + /* "dijkstra3d.pyx":727 * ) * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) # <<<<<<<<<<<<<< * dist = distance_field3d[uint64_t]( * &arr_memview64[0,0,0], */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -11342,53 +11302,53 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 721, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_arr_memview64 = __pyx_t_19; - __pyx_t_19.memview = NULL; - __pyx_t_19.data = NULL; + __pyx_v_arr_memview64 = __pyx_t_16; + __pyx_t_16.memview = NULL; + __pyx_t_16.data = NULL; - /* "dijkstra3d.pyx":723 + /* "dijkstra3d.pyx":729 * arr_memview64 = data.astype(np.uint64) * dist = distance_field3d[uint64_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src */ - __pyx_t_20 = 0; - __pyx_t_21 = 0; - __pyx_t_22 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_21 < 0) { - __pyx_t_21 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_22 < 0) { - __pyx_t_22 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_22 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_22 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 723, __pyx_L1_error) + __PYX_ERR(0, 729, __pyx_L1_error) } - /* "dijkstra3d.pyx":722 + /* "dijkstra3d.pyx":728 * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) * dist = distance_field3d[uint64_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - __pyx_v_dist = dijkstra::distance_field3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_20 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_21 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_22 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); + __pyx_v_dist = dijkstra::distance_field3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_10 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); - /* "dijkstra3d.pyx":720 + /* "dijkstra3d.pyx":726 * src * ) * elif dtype in (np.int64, np.uint64): # <<<<<<<<<<<<<< @@ -11398,7 +11358,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":727 + /* "dijkstra3d.pyx":733 * src * ) * elif dtype in (np.uint32, np.int32): # <<<<<<<<<<<<<< @@ -11407,47 +11367,47 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_6 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_8) { } else { - __pyx_t_18 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; goto __pyx_L6_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_18 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = (__pyx_t_18 != 0); + __pyx_t_8 = (__pyx_t_15 != 0); if (__pyx_t_8) { - /* "dijkstra3d.pyx":728 + /* "dijkstra3d.pyx":734 * ) * elif dtype in (np.uint32, np.int32): * arr_memview32 = data.astype(np.uint32) # <<<<<<<<<<<<<< * dist = distance_field3d[uint32_t]( * &arr_memview32[0,0,0], */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -11463,53 +11423,53 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_23 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_23.memview)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_arr_memview32 = __pyx_t_23; - __pyx_t_23.memview = NULL; - __pyx_t_23.data = NULL; + __pyx_v_arr_memview32 = __pyx_t_17; + __pyx_t_17.memview = NULL; + __pyx_t_17.data = NULL; - /* "dijkstra3d.pyx":730 + /* "dijkstra3d.pyx":736 * arr_memview32 = data.astype(np.uint32) * dist = distance_field3d[uint32_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src */ - __pyx_t_24 = 0; - __pyx_t_25 = 0; - __pyx_t_26 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_24 < 0) { - __pyx_t_24 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_24 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_24 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_25 < 0) { - __pyx_t_25 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_25 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_25 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_26 < 0) { - __pyx_t_26 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_26 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_26 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 730, __pyx_L1_error) + __PYX_ERR(0, 736, __pyx_L1_error) } - /* "dijkstra3d.pyx":729 + /* "dijkstra3d.pyx":735 * elif dtype in (np.uint32, np.int32): * arr_memview32 = data.astype(np.uint32) * dist = distance_field3d[uint32_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - __pyx_v_dist = dijkstra::distance_field3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_24 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_25 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_26 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); + __pyx_v_dist = dijkstra::distance_field3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_12 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); - /* "dijkstra3d.pyx":727 + /* "dijkstra3d.pyx":733 * src * ) * elif dtype in (np.uint32, np.int32): # <<<<<<<<<<<<<< @@ -11519,7 +11479,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":734 + /* "dijkstra3d.pyx":740 * src * ) * elif dtype in (np.int16, np.uint16): # <<<<<<<<<<<<<< @@ -11528,47 +11488,47 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_6 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!__pyx_t_18) { + if (!__pyx_t_15) { } else { - __pyx_t_8 = __pyx_t_18; + __pyx_t_8 = __pyx_t_15; goto __pyx_L8_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __pyx_t_18; + __pyx_t_8 = __pyx_t_15; __pyx_L8_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_18 = (__pyx_t_8 != 0); - if (__pyx_t_18) { + __pyx_t_15 = (__pyx_t_8 != 0); + if (__pyx_t_15) { - /* "dijkstra3d.pyx":735 + /* "dijkstra3d.pyx":741 * ) * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) # <<<<<<<<<<<<<< * dist = distance_field3d[uint16_t]( * &arr_memview16[0,0,0], */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -11584,53 +11544,53 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint16_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint16_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_18.memview)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_arr_memview16 = __pyx_t_27; - __pyx_t_27.memview = NULL; - __pyx_t_27.data = NULL; + __pyx_v_arr_memview16 = __pyx_t_18; + __pyx_t_18.memview = NULL; + __pyx_t_18.data = NULL; - /* "dijkstra3d.pyx":737 + /* "dijkstra3d.pyx":743 * arr_memview16 = data.astype(np.uint16) * dist = distance_field3d[uint16_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src */ - __pyx_t_28 = 0; - __pyx_t_29 = 0; - __pyx_t_30 = 0; + __pyx_t_10 = 0; + __pyx_t_11 = 0; + __pyx_t_12 = 0; __pyx_t_13 = -1; - if (__pyx_t_28 < 0) { - __pyx_t_28 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_28 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_28 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_29 < 0) { - __pyx_t_29 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_29 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_29 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_30 < 0) { - __pyx_t_30 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_30 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_30 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 737, __pyx_L1_error) + __PYX_ERR(0, 743, __pyx_L1_error) } - /* "dijkstra3d.pyx":736 + /* "dijkstra3d.pyx":742 * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) * dist = distance_field3d[uint16_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - __pyx_v_dist = dijkstra::distance_field3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_28 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_29 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_30 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); + __pyx_v_dist = dijkstra::distance_field3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_10 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_12 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); - /* "dijkstra3d.pyx":734 + /* "dijkstra3d.pyx":740 * src * ) * elif dtype in (np.int16, np.uint16): # <<<<<<<<<<<<<< @@ -11640,7 +11600,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":741 + /* "dijkstra3d.pyx":747 * src * ) * elif dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -11649,61 +11609,61 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_6 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_8) { } else { - __pyx_t_18 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; goto __pyx_L10_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_8) { } else { - __pyx_t_18 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; goto __pyx_L10_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_18 = __pyx_t_8; + __pyx_t_15 = __pyx_t_8; __pyx_L10_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = (__pyx_t_18 != 0); + __pyx_t_8 = (__pyx_t_15 != 0); if (likely(__pyx_t_8)) { - /* "dijkstra3d.pyx":742 + /* "dijkstra3d.pyx":748 * ) * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) # <<<<<<<<<<<<<< * dist = distance_field3d[uint8_t]( * &arr_memview8[0,0,0], */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -11719,53 +11679,53 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 742, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_31 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_31.memview)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_arr_memview8 = __pyx_t_31; - __pyx_t_31.memview = NULL; - __pyx_t_31.data = NULL; + __pyx_v_arr_memview8 = __pyx_t_19; + __pyx_t_19.memview = NULL; + __pyx_t_19.data = NULL; - /* "dijkstra3d.pyx":744 + /* "dijkstra3d.pyx":750 * arr_memview8 = data.astype(np.uint8) * dist = distance_field3d[uint8_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src */ - __pyx_t_32 = 0; - __pyx_t_33 = 0; - __pyx_t_34 = 0; + __pyx_t_12 = 0; + __pyx_t_11 = 0; + __pyx_t_10 = 0; __pyx_t_13 = -1; - if (__pyx_t_32 < 0) { - __pyx_t_32 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_32 < 0)) __pyx_t_13 = 0; - } else if (unlikely(__pyx_t_32 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; - if (__pyx_t_33 < 0) { - __pyx_t_33 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_33 < 0)) __pyx_t_13 = 1; - } else if (unlikely(__pyx_t_33 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; - if (__pyx_t_34 < 0) { - __pyx_t_34 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_34 < 0)) __pyx_t_13 = 2; - } else if (unlikely(__pyx_t_34 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_13 = 0; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_11 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_13 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_13 = 2; if (unlikely(__pyx_t_13 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_13); - __PYX_ERR(0, 744, __pyx_L1_error) + __PYX_ERR(0, 750, __pyx_L1_error) } - /* "dijkstra3d.pyx":743 + /* "dijkstra3d.pyx":749 * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) * dist = distance_field3d[uint8_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - __pyx_v_dist = dijkstra::distance_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_32 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_33 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_34 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); + __pyx_v_dist = dijkstra::distance_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_12 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_11 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_10 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src); - /* "dijkstra3d.pyx":741 + /* "dijkstra3d.pyx":747 * src * ) * elif dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -11775,7 +11735,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":749 + /* "dijkstra3d.pyx":755 * ) * else: * raise TypeError("Type {} not currently supported.".format(dtype)) # <<<<<<<<<<<<<< @@ -11783,7 +11743,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P * cdef size_t voxels = sx * sy * sz */ /*else*/ { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Type_not_currently_supported, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Type_not_currently_supported, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -11797,19 +11757,19 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_v_dtype) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_dtype); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 749, __pyx_L1_error) + __PYX_ERR(0, 755, __pyx_L1_error) } __pyx_L3:; - /* "dijkstra3d.pyx":751 + /* "dijkstra3d.pyx":757 * raise TypeError("Type {} not currently supported.".format(dtype)) * * cdef size_t voxels = sx * sy * sz # <<<<<<<<<<<<<< @@ -11818,7 +11778,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ __pyx_v_voxels = ((__pyx_v_sx * __pyx_v_sy) * __pyx_v_sz); - /* "dijkstra3d.pyx":752 + /* "dijkstra3d.pyx":758 * * cdef size_t voxels = sx * sy * sz * cdef float[:] dist_view = dist # <<<<<<<<<<<<<< @@ -11827,40 +11787,39 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ if (!__pyx_v_dist) { PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer"); - __PYX_ERR(0, 752, __pyx_L1_error) + __PYX_ERR(0, 758, __pyx_L1_error) } - __pyx_t_6 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_float); - __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_voxels)); - if (unlikely(!__pyx_t_6 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_6))) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_6 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_float); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_voxels)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_35 = __pyx_array_new(__pyx_t_7, sizeof(float), PyBytes_AS_STRING(__pyx_t_6), (char *) "c", (char *) __pyx_v_dist); - if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); + __pyx_t_20 = __pyx_array_new(__pyx_t_7, sizeof(float), PyBytes_AS_STRING(__pyx_t_6), (char *) "c", (char *) __pyx_v_dist); + if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_36 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_t_35), PyBUF_WRITABLE); if (unlikely(!__pyx_t_36.memview)) __PYX_ERR(0, 752, __pyx_L1_error) - __Pyx_DECREF(((PyObject *)__pyx_t_35)); __pyx_t_35 = 0; - __pyx_v_dist_view = __pyx_t_36; - __pyx_t_36.memview = NULL; - __pyx_t_36.data = NULL; + __pyx_t_21 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_t_20), PyBUF_WRITABLE); if (unlikely(!__pyx_t_21.memview)) __PYX_ERR(0, 758, __pyx_L1_error) + __Pyx_DECREF(((PyObject *)__pyx_t_20)); __pyx_t_20 = 0; + __pyx_v_dist_view = __pyx_t_21; + __pyx_t_21.memview = NULL; + __pyx_t_21.data = NULL; - /* "dijkstra3d.pyx":756 + /* "dijkstra3d.pyx":762 * # This construct is required by python 2. * # Python 3 can just do np.frombuffer(vec_view, ...) * buf = bytearray(dist_view[:]) # <<<<<<<<<<<<<< * free(dist) * # I don't actually understand why order F works, but it does. */ - __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_dist_view, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error) + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_dist_view, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_buf = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "dijkstra3d.pyx":757 + /* "dijkstra3d.pyx":763 * # Python 3 can just do np.frombuffer(vec_view, ...) * buf = bytearray(dist_view[:]) * free(dist) # <<<<<<<<<<<<<< @@ -11869,7 +11828,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P */ free(__pyx_v_dist); - /* "dijkstra3d.pyx":759 + /* "dijkstra3d.pyx":765 * free(dist) * # I don't actually understand why order F works, but it does. * return np.frombuffer(buf, dtype=np.float32).reshape(data.shape, order='F') # <<<<<<<<<<<<<< @@ -11877,44 +11836,44 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P * def _execute_parental_field(data, source, connectivity): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_buf); __Pyx_GIVEREF(__pyx_v_buf); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_buf); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_float32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 759, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 759, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 765, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -11923,7 +11882,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P __pyx_t_6 = 0; goto __pyx_L0; - /* "dijkstra3d.pyx":688 + /* "dijkstra3d.pyx":694 * return output[::-1] * * def _execute_distance_field(data, source): # <<<<<<<<<<<<<< @@ -11941,12 +11900,12 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P __Pyx_XDECREF(__pyx_t_7); __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1); __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_23, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_31, 1); - __Pyx_XDECREF(((PyObject *)__pyx_t_35)); - __PYX_XDEC_MEMVIEW(&__pyx_t_36, 1); + __Pyx_XDECREF(((PyObject *)__pyx_t_20)); + __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1); __Pyx_AddTraceback("dijkstra3d._execute_distance_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11964,7 +11923,7 @@ static PyObject *__pyx_pf_10dijkstra3d_16_execute_distance_field(CYTHON_UNUSED P return __pyx_r; } -/* "dijkstra3d.pyx":761 +/* "dijkstra3d.pyx":767 * return np.frombuffer(buf, dtype=np.float32).reshape(data.shape, order='F') * * def _execute_parental_field(data, source, connectivity): # <<<<<<<<<<<<<< @@ -11979,6 +11938,9 @@ static PyObject *__pyx_pw_10dijkstra3d_19_execute_parental_field(PyObject *__pyx PyObject *__pyx_v_data = 0; PyObject *__pyx_v_source = 0; PyObject *__pyx_v_connectivity = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_execute_parental_field (wrapper)", 0); @@ -12007,17 +11969,17 @@ static PyObject *__pyx_pw_10dijkstra3d_19_execute_parental_field(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_parental_field", 1, 3, 3, 1); __PYX_ERR(0, 761, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_parental_field", 1, 3, 3, 1); __PYX_ERR(0, 767, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_connectivity)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_parental_field", 1, 3, 3, 2); __PYX_ERR(0, 761, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_parental_field", 1, 3, 3, 2); __PYX_ERR(0, 767, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_parental_field") < 0)) __PYX_ERR(0, 761, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_parental_field") < 0)) __PYX_ERR(0, 767, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -12032,7 +11994,7 @@ static PyObject *__pyx_pw_10dijkstra3d_19_execute_parental_field(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_execute_parental_field", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 761, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_parental_field", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 767, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d._execute_parental_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12087,78 +12049,15 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; - Py_ssize_t __pyx_t_22; - Py_ssize_t __pyx_t_23; - Py_ssize_t __pyx_t_24; - Py_ssize_t __pyx_t_25; - Py_ssize_t __pyx_t_26; - Py_ssize_t __pyx_t_27; - __Pyx_memviewslice __pyx_t_28 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_29; - Py_ssize_t __pyx_t_30; - Py_ssize_t __pyx_t_31; - Py_ssize_t __pyx_t_32; - Py_ssize_t __pyx_t_33; - Py_ssize_t __pyx_t_34; - Py_ssize_t __pyx_t_35; - Py_ssize_t __pyx_t_36; - Py_ssize_t __pyx_t_37; - Py_ssize_t __pyx_t_38; - Py_ssize_t __pyx_t_39; - Py_ssize_t __pyx_t_40; - int __pyx_t_41; - __Pyx_memviewslice __pyx_t_42 = { 0, 0, { 0 }, { 0 }, { 0 } }; - 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; - Py_ssize_t __pyx_t_48; - Py_ssize_t __pyx_t_49; - Py_ssize_t __pyx_t_50; - Py_ssize_t __pyx_t_51; - Py_ssize_t __pyx_t_52; - Py_ssize_t __pyx_t_53; - Py_ssize_t __pyx_t_54; - __Pyx_memviewslice __pyx_t_55 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_56; - Py_ssize_t __pyx_t_57; - Py_ssize_t __pyx_t_58; - Py_ssize_t __pyx_t_59; - Py_ssize_t __pyx_t_60; - Py_ssize_t __pyx_t_61; - Py_ssize_t __pyx_t_62; - Py_ssize_t __pyx_t_63; - Py_ssize_t __pyx_t_64; - Py_ssize_t __pyx_t_65; - Py_ssize_t __pyx_t_66; - Py_ssize_t __pyx_t_67; - __Pyx_memviewslice __pyx_t_68 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_69; - Py_ssize_t __pyx_t_70; - Py_ssize_t __pyx_t_71; - Py_ssize_t __pyx_t_72; - Py_ssize_t __pyx_t_73; - Py_ssize_t __pyx_t_74; - Py_ssize_t __pyx_t_75; - Py_ssize_t __pyx_t_76; - Py_ssize_t __pyx_t_77; - Py_ssize_t __pyx_t_78; - Py_ssize_t __pyx_t_79; - Py_ssize_t __pyx_t_80; - __Pyx_memviewslice __pyx_t_81 = { 0, 0, { 0 }, { 0 }, { 0 } }; - Py_ssize_t __pyx_t_82; - Py_ssize_t __pyx_t_83; - Py_ssize_t __pyx_t_84; - Py_ssize_t __pyx_t_85; - Py_ssize_t __pyx_t_86; - Py_ssize_t __pyx_t_87; - Py_ssize_t __pyx_t_88; - Py_ssize_t __pyx_t_89; - Py_ssize_t __pyx_t_90; - Py_ssize_t __pyx_t_91; - Py_ssize_t __pyx_t_92; - Py_ssize_t __pyx_t_93; + __Pyx_memviewslice __pyx_t_22 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_t_23; + __Pyx_memviewslice __pyx_t_24 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_25 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_26 = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_memviewslice __pyx_t_27 = { 0, 0, { 0 }, { 0 }, { 0 } }; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_execute_parental_field", 0); __pyx_pybuffer_parents32.pybuffer.buf = NULL; __pyx_pybuffer_parents32.refcount = 0; @@ -12169,108 +12068,108 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_pybuffernd_parents64.data = NULL; __pyx_pybuffernd_parents64.rcbuffer = &__pyx_pybuffer_parents64; - /* "dijkstra3d.pyx":769 + /* "dijkstra3d.pyx":775 * cdef double[:,:,:] arr_memviewdouble * * cdef size_t sx = data.shape[0] # <<<<<<<<<<<<<< * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sx = __pyx_t_3; - /* "dijkstra3d.pyx":770 + /* "dijkstra3d.pyx":776 * * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] # <<<<<<<<<<<<<< * cdef size_t sz = data.shape[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sy = __pyx_t_3; - /* "dijkstra3d.pyx":771 + /* "dijkstra3d.pyx":777 * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] # <<<<<<<<<<<<<< * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sz = __pyx_t_3; - /* "dijkstra3d.pyx":773 + /* "dijkstra3d.pyx":779 * cdef size_t sz = data.shape[2] * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) # <<<<<<<<<<<<<< * * sixtyfourbit = data.size > np.iinfo(np.uint32).max */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_src = __pyx_t_3; - /* "dijkstra3d.pyx":775 + /* "dijkstra3d.pyx":781 * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) * * sixtyfourbit = data.size > np.iinfo(np.uint32).max # <<<<<<<<<<<<<< * * cdef cnp.ndarray[uint32_t, ndim=3] parents32 */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -12286,47 +12185,47 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sixtyfourbit = __pyx_t_7; __pyx_t_7 = 0; - /* "dijkstra3d.pyx":780 + /* "dijkstra3d.pyx":786 * cdef cnp.ndarray[uint64_t, ndim=3] parents64 * * if sixtyfourbit: # <<<<<<<<<<<<<< * parents64 = np.zeros( (sx,sy,sz), dtype=np.uint64, order='F' ) * else: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 786, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":781 + /* "dijkstra3d.pyx":787 * * if sixtyfourbit: * parents64 = np.zeros( (sx,sy,sz), dtype=np.uint64, order='F' ) # <<<<<<<<<<<<<< * else: * parents32 = np.zeros( (sx,sy,sz), dtype=np.uint32, order='F' ) */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_sz); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_sz); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); @@ -12337,27 +12236,27 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 781, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 781, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 781, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 787, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -12374,13 +12273,13 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0; } __pyx_pybuffernd_parents64.diminfo[0].strides = __pyx_pybuffernd_parents64.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_parents64.diminfo[0].shape = __pyx_pybuffernd_parents64.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_parents64.diminfo[1].strides = __pyx_pybuffernd_parents64.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_parents64.diminfo[1].shape = __pyx_pybuffernd_parents64.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_parents64.diminfo[2].strides = __pyx_pybuffernd_parents64.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_parents64.diminfo[2].shape = __pyx_pybuffernd_parents64.rcbuffer->pybuffer.shape[2]; - if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 781, __pyx_L1_error) + if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 787, __pyx_L1_error) } __pyx_t_9 = 0; __pyx_v_parents64 = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; - /* "dijkstra3d.pyx":780 + /* "dijkstra3d.pyx":786 * cdef cnp.ndarray[uint64_t, ndim=3] parents64 * * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -12390,7 +12289,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L3; } - /* "dijkstra3d.pyx":783 + /* "dijkstra3d.pyx":789 * parents64 = np.zeros( (sx,sy,sz), dtype=np.uint64, order='F' ) * else: * parents32 = np.zeros( (sx,sy,sz), dtype=np.uint32, order='F' ) # <<<<<<<<<<<<<< @@ -12398,18 +12297,18 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P * dtype = data.dtype */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); @@ -12420,27 +12319,27 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 783, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 783, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 783, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 789, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -12457,7 +12356,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_13 = __pyx_t_12 = __pyx_t_11 = 0; } __pyx_pybuffernd_parents32.diminfo[0].strides = __pyx_pybuffernd_parents32.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_parents32.diminfo[0].shape = __pyx_pybuffernd_parents32.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_parents32.diminfo[1].strides = __pyx_pybuffernd_parents32.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_parents32.diminfo[1].shape = __pyx_pybuffernd_parents32.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_parents32.diminfo[2].strides = __pyx_pybuffernd_parents32.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_parents32.diminfo[2].shape = __pyx_pybuffernd_parents32.rcbuffer->pybuffer.shape[2]; - if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 783, __pyx_L1_error) + if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 789, __pyx_L1_error) } __pyx_t_14 = 0; __pyx_v_parents32 = ((PyArrayObject *)__pyx_t_7); @@ -12465,59 +12364,59 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P } __pyx_L3:; - /* "dijkstra3d.pyx":785 + /* "dijkstra3d.pyx":791 * parents32 = np.zeros( (sx,sy,sz), dtype=np.uint32, order='F' ) * * dtype = data.dtype # <<<<<<<<<<<<<< * * if dtype == np.float32: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_dtype = __pyx_t_7; __pyx_t_7 = 0; - /* "dijkstra3d.pyx":787 + /* "dijkstra3d.pyx":793 * dtype = data.dtype * * if dtype == np.float32: # <<<<<<<<<<<<<< * arr_memviewfloat = data * if sixtyfourbit: */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":788 + /* "dijkstra3d.pyx":794 * * if dtype == np.float32: * arr_memviewfloat = data # <<<<<<<<<<<<<< * if sixtyfourbit: * parental_field3d[float,uint64_t]( */ - __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 788, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_float(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 794, __pyx_L1_error) __pyx_v_arr_memviewfloat = __pyx_t_15; __pyx_t_15.memview = NULL; __pyx_t_15.data = NULL; - /* "dijkstra3d.pyx":789 + /* "dijkstra3d.pyx":795 * if dtype == np.float32: * arr_memviewfloat = data * if sixtyfourbit: # <<<<<<<<<<<<<< * parental_field3d[float,uint64_t]( * &arr_memviewfloat[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 795, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":791 + /* "dijkstra3d.pyx":797 * if sixtyfourbit: * parental_field3d[float,uint64_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< @@ -12542,10 +12441,10 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 791, __pyx_L1_error) + __PYX_ERR(0, 797, __pyx_L1_error) } - /* "dijkstra3d.pyx":793 + /* "dijkstra3d.pyx":799 * &arr_memviewfloat[0,0,0], * sx, sy, sz, * src, &parents64[0,0,0], # <<<<<<<<<<<<<< @@ -12570,19 +12469,19 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 793, __pyx_L1_error) + __PYX_ERR(0, 799, __pyx_L1_error) } - /* "dijkstra3d.pyx":794 + /* "dijkstra3d.pyx":800 * sx, sy, sz, * src, &parents64[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error) - /* "dijkstra3d.pyx":790 + /* "dijkstra3d.pyx":796 * arr_memviewfloat = data * if sixtyfourbit: * parental_field3d[float,uint64_t]( # <<<<<<<<<<<<<< @@ -12591,7 +12490,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ (void)(dijkstra::parental_field3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_16 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_17 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_18 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_21, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); - /* "dijkstra3d.pyx":789 + /* "dijkstra3d.pyx":795 * if dtype == np.float32: * arr_memviewfloat = data * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -12601,7 +12500,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L5; } - /* "dijkstra3d.pyx":797 + /* "dijkstra3d.pyx":803 * ) * else: * parental_field3d[float,uint32_t]( # <<<<<<<<<<<<<< @@ -12610,83 +12509,83 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ /*else*/ { - /* "dijkstra3d.pyx":798 + /* "dijkstra3d.pyx":804 * else: * parental_field3d[float,uint32_t]( * &arr_memviewfloat[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents32[0,0,0], */ - __pyx_t_22 = 0; - __pyx_t_23 = 0; - __pyx_t_24 = 0; + __pyx_t_21 = 0; + __pyx_t_20 = 0; + __pyx_t_19 = 0; __pyx_t_10 = -1; - if (__pyx_t_22 < 0) { - __pyx_t_22 += __pyx_v_arr_memviewfloat.shape[0]; - if (unlikely(__pyx_t_22 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_22 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_23 < 0) { - __pyx_t_23 += __pyx_v_arr_memviewfloat.shape[1]; - if (unlikely(__pyx_t_23 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_23 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_24 < 0) { - __pyx_t_24 += __pyx_v_arr_memviewfloat.shape[2]; - if (unlikely(__pyx_t_24 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_24 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_arr_memviewfloat.shape[0]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memviewfloat.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_v_arr_memviewfloat.shape[1]; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memviewfloat.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_v_arr_memviewfloat.shape[2]; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memviewfloat.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 798, __pyx_L1_error) + __PYX_ERR(0, 804, __pyx_L1_error) } - /* "dijkstra3d.pyx":800 + /* "dijkstra3d.pyx":806 * &arr_memviewfloat[0,0,0], * sx, sy, sz, * src, &parents32[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_25 = 0; - __pyx_t_26 = 0; - __pyx_t_27 = 0; + __pyx_t_18 = 0; + __pyx_t_17 = 0; + __pyx_t_16 = 0; __pyx_t_10 = -1; - if (__pyx_t_25 < 0) { - __pyx_t_25 += __pyx_pybuffernd_parents32.diminfo[0].shape; - if (unlikely(__pyx_t_25 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_26 < 0) { - __pyx_t_26 += __pyx_pybuffernd_parents32.diminfo[1].shape; - if (unlikely(__pyx_t_26 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_27 < 0) { - __pyx_t_27 += __pyx_pybuffernd_parents32.diminfo[2].shape; - if (unlikely(__pyx_t_27 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_parents32.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_pybuffernd_parents32.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_parents32.diminfo[2].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 800, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } - /* "dijkstra3d.pyx":801 + /* "dijkstra3d.pyx":807 * sx, sy, sz, * src, &parents32[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * elif dtype == np.float64: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 807, __pyx_L1_error) - /* "dijkstra3d.pyx":797 + /* "dijkstra3d.pyx":803 * ) * else: * parental_field3d[float,uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewfloat[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_22 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_23 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_24 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_27, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((float *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewfloat.data + __pyx_t_21 * __pyx_v_arr_memviewfloat.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_memviewfloat.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memviewfloat.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_16, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); } __pyx_L5:; - /* "dijkstra3d.pyx":787 + /* "dijkstra3d.pyx":793 * dtype = data.dtype * * if dtype == np.float32: # <<<<<<<<<<<<<< @@ -12696,121 +12595,121 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L4; } - /* "dijkstra3d.pyx":803 + /* "dijkstra3d.pyx":809 * connectivity * ) * elif dtype == np.float64: # <<<<<<<<<<<<<< * arr_memviewdouble = data * if sixtyfourbit: */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_dtype, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_8) { - /* "dijkstra3d.pyx":804 + /* "dijkstra3d.pyx":810 * ) * elif dtype == np.float64: * arr_memviewdouble = data # <<<<<<<<<<<<<< * if sixtyfourbit: * parental_field3d[double,uint64_t]( */ - __pyx_t_28 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_28.memview)) __PYX_ERR(0, 804, __pyx_L1_error) - __pyx_v_arr_memviewdouble = __pyx_t_28; - __pyx_t_28.memview = NULL; - __pyx_t_28.data = NULL; + __pyx_t_22 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(__pyx_v_data, PyBUF_WRITABLE); if (unlikely(!__pyx_t_22.memview)) __PYX_ERR(0, 810, __pyx_L1_error) + __pyx_v_arr_memviewdouble = __pyx_t_22; + __pyx_t_22.memview = NULL; + __pyx_t_22.data = NULL; - /* "dijkstra3d.pyx":805 + /* "dijkstra3d.pyx":811 * elif dtype == np.float64: * arr_memviewdouble = data * if sixtyfourbit: # <<<<<<<<<<<<<< * parental_field3d[double,uint64_t]( * &arr_memviewdouble[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 811, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":807 + /* "dijkstra3d.pyx":813 * if sixtyfourbit: * parental_field3d[double,uint64_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents64[0,0,0], */ - __pyx_t_29 = 0; - __pyx_t_30 = 0; - __pyx_t_31 = 0; + __pyx_t_16 = 0; + __pyx_t_17 = 0; + __pyx_t_18 = 0; __pyx_t_10 = -1; - if (__pyx_t_29 < 0) { - __pyx_t_29 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_29 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_29 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_30 < 0) { - __pyx_t_30 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_30 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_30 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_31 < 0) { - __pyx_t_31 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_31 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_31 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 807, __pyx_L1_error) + __PYX_ERR(0, 813, __pyx_L1_error) } - /* "dijkstra3d.pyx":809 + /* "dijkstra3d.pyx":815 * &arr_memviewdouble[0,0,0], * sx, sy, sz, * src, &parents64[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_32 = 0; - __pyx_t_33 = 0; - __pyx_t_34 = 0; + __pyx_t_19 = 0; + __pyx_t_20 = 0; + __pyx_t_21 = 0; __pyx_t_10 = -1; - if (__pyx_t_32 < 0) { - __pyx_t_32 += __pyx_pybuffernd_parents64.diminfo[0].shape; - if (unlikely(__pyx_t_32 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_33 < 0) { - __pyx_t_33 += __pyx_pybuffernd_parents64.diminfo[1].shape; - if (unlikely(__pyx_t_33 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_34 < 0) { - __pyx_t_34 += __pyx_pybuffernd_parents64.diminfo[2].shape; - if (unlikely(__pyx_t_34 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_pybuffernd_parents64.diminfo[0].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_parents64.diminfo[1].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_pybuffernd_parents64.diminfo[2].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 809, __pyx_L1_error) + __PYX_ERR(0, 815, __pyx_L1_error) } - /* "dijkstra3d.pyx":810 + /* "dijkstra3d.pyx":816 * sx, sy, sz, * src, &parents64[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error) - /* "dijkstra3d.pyx":806 + /* "dijkstra3d.pyx":812 * arr_memviewdouble = data * if sixtyfourbit: * parental_field3d[double,uint64_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_29 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_30 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_31 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_34, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_16 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_17 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_18 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_21, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); - /* "dijkstra3d.pyx":805 + /* "dijkstra3d.pyx":811 * elif dtype == np.float64: * arr_memviewdouble = data * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -12820,7 +12719,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L6; } - /* "dijkstra3d.pyx":813 + /* "dijkstra3d.pyx":819 * ) * else: * parental_field3d[double,uint32_t]( # <<<<<<<<<<<<<< @@ -12829,83 +12728,83 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ /*else*/ { - /* "dijkstra3d.pyx":814 + /* "dijkstra3d.pyx":820 * else: * parental_field3d[double,uint32_t]( * &arr_memviewdouble[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents32[0,0,0], */ - __pyx_t_35 = 0; - __pyx_t_36 = 0; - __pyx_t_37 = 0; + __pyx_t_21 = 0; + __pyx_t_20 = 0; + __pyx_t_19 = 0; __pyx_t_10 = -1; - if (__pyx_t_35 < 0) { - __pyx_t_35 += __pyx_v_arr_memviewdouble.shape[0]; - if (unlikely(__pyx_t_35 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_35 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_36 < 0) { - __pyx_t_36 += __pyx_v_arr_memviewdouble.shape[1]; - if (unlikely(__pyx_t_36 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_36 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_37 < 0) { - __pyx_t_37 += __pyx_v_arr_memviewdouble.shape[2]; - if (unlikely(__pyx_t_37 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_37 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_arr_memviewdouble.shape[0]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memviewdouble.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_v_arr_memviewdouble.shape[1]; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memviewdouble.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_v_arr_memviewdouble.shape[2]; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memviewdouble.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 814, __pyx_L1_error) + __PYX_ERR(0, 820, __pyx_L1_error) } - /* "dijkstra3d.pyx":816 + /* "dijkstra3d.pyx":822 * &arr_memviewdouble[0,0,0], * sx, sy, sz, * src, &parents32[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_38 = 0; - __pyx_t_39 = 0; - __pyx_t_40 = 0; + __pyx_t_18 = 0; + __pyx_t_17 = 0; + __pyx_t_16 = 0; __pyx_t_10 = -1; - if (__pyx_t_38 < 0) { - __pyx_t_38 += __pyx_pybuffernd_parents32.diminfo[0].shape; - if (unlikely(__pyx_t_38 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_39 < 0) { - __pyx_t_39 += __pyx_pybuffernd_parents32.diminfo[1].shape; - if (unlikely(__pyx_t_39 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_40 < 0) { - __pyx_t_40 += __pyx_pybuffernd_parents32.diminfo[2].shape; - if (unlikely(__pyx_t_40 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_parents32.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_pybuffernd_parents32.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_parents32.diminfo[2].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 816, __pyx_L1_error) + __PYX_ERR(0, 822, __pyx_L1_error) } - /* "dijkstra3d.pyx":817 + /* "dijkstra3d.pyx":823 * sx, sy, sz, * src, &parents32[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * elif dtype in (np.int64, np.uint64): */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 823, __pyx_L1_error) - /* "dijkstra3d.pyx":813 + /* "dijkstra3d.pyx":819 * ) * else: * parental_field3d[double,uint32_t]( # <<<<<<<<<<<<<< * &arr_memviewdouble[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_35 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_36 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_37 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_40, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((double *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memviewdouble.data + __pyx_t_21 * __pyx_v_arr_memviewdouble.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_memviewdouble.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memviewdouble.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_16, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); } __pyx_L6:; - /* "dijkstra3d.pyx":803 + /* "dijkstra3d.pyx":809 * connectivity * ) * elif dtype == np.float64: # <<<<<<<<<<<<<< @@ -12915,7 +12814,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L4; } - /* "dijkstra3d.pyx":819 + /* "dijkstra3d.pyx":825 * connectivity * ) * elif dtype in (np.int64, np.uint64): # <<<<<<<<<<<<<< @@ -12924,47 +12823,47 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_7 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_41 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!__pyx_t_41) { + if (!__pyx_t_23) { } else { - __pyx_t_8 = __pyx_t_41; + __pyx_t_8 = __pyx_t_23; goto __pyx_L7_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_41 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __pyx_t_41; + __pyx_t_8 = __pyx_t_23; __pyx_L7_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_41 = (__pyx_t_8 != 0); - if (__pyx_t_41) { + __pyx_t_23 = (__pyx_t_8 != 0); + if (__pyx_t_23) { - /* "dijkstra3d.pyx":820 + /* "dijkstra3d.pyx":826 * ) * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) # <<<<<<<<<<<<<< * if sixtyfourbit: * parental_field3d[uint64_t,uint64_t]( */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -12980,100 +12879,100 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 820, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_42 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_42.memview)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_24 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint64_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_24.memview)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_arr_memview64 = __pyx_t_42; - __pyx_t_42.memview = NULL; - __pyx_t_42.data = NULL; + __pyx_v_arr_memview64 = __pyx_t_24; + __pyx_t_24.memview = NULL; + __pyx_t_24.data = NULL; - /* "dijkstra3d.pyx":821 + /* "dijkstra3d.pyx":827 * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) * if sixtyfourbit: # <<<<<<<<<<<<<< * parental_field3d[uint64_t,uint64_t]( * &arr_memview64[0,0,0], */ - __pyx_t_41 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(0, 821, __pyx_L1_error) - if (__pyx_t_41) { + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 827, __pyx_L1_error) + if (__pyx_t_23) { - /* "dijkstra3d.pyx":823 + /* "dijkstra3d.pyx":829 * if sixtyfourbit: * parental_field3d[uint64_t,uint64_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents64[0,0,0], */ - __pyx_t_43 = 0; - __pyx_t_44 = 0; - __pyx_t_45 = 0; + __pyx_t_16 = 0; + __pyx_t_17 = 0; + __pyx_t_18 = 0; __pyx_t_10 = -1; - if (__pyx_t_43 < 0) { - __pyx_t_43 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_43 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_43 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_44 < 0) { - __pyx_t_44 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_44 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_44 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_45 < 0) { - __pyx_t_45 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_45 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_45 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 823, __pyx_L1_error) + __PYX_ERR(0, 829, __pyx_L1_error) } - /* "dijkstra3d.pyx":825 + /* "dijkstra3d.pyx":831 * &arr_memview64[0,0,0], * sx, sy, sz, * src, &parents64[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_46 = 0; - __pyx_t_47 = 0; - __pyx_t_48 = 0; + __pyx_t_19 = 0; + __pyx_t_20 = 0; + __pyx_t_21 = 0; __pyx_t_10 = -1; - if (__pyx_t_46 < 0) { - __pyx_t_46 += __pyx_pybuffernd_parents64.diminfo[0].shape; - if (unlikely(__pyx_t_46 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_47 < 0) { - __pyx_t_47 += __pyx_pybuffernd_parents64.diminfo[1].shape; - if (unlikely(__pyx_t_47 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_48 < 0) { - __pyx_t_48 += __pyx_pybuffernd_parents64.diminfo[2].shape; - if (unlikely(__pyx_t_48 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_pybuffernd_parents64.diminfo[0].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_parents64.diminfo[1].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_pybuffernd_parents64.diminfo[2].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 825, __pyx_L1_error) + __PYX_ERR(0, 831, __pyx_L1_error) } - /* "dijkstra3d.pyx":826 + /* "dijkstra3d.pyx":832 * sx, sy, sz, * src, &parents64[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L1_error) - /* "dijkstra3d.pyx":822 + /* "dijkstra3d.pyx":828 * arr_memview64 = data.astype(np.uint64) * if sixtyfourbit: * parental_field3d[uint64_t,uint64_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_43 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_44 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_45 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_48, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_16 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_17 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_18 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_21, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); - /* "dijkstra3d.pyx":821 + /* "dijkstra3d.pyx":827 * elif dtype in (np.int64, np.uint64): * arr_memview64 = data.astype(np.uint64) * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -13083,7 +12982,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L9; } - /* "dijkstra3d.pyx":829 + /* "dijkstra3d.pyx":835 * ) * else: * parental_field3d[uint64_t,uint32_t]( # <<<<<<<<<<<<<< @@ -13092,83 +12991,83 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ /*else*/ { - /* "dijkstra3d.pyx":830 + /* "dijkstra3d.pyx":836 * else: * parental_field3d[uint64_t,uint32_t]( * &arr_memview64[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents32[0,0,0], */ - __pyx_t_49 = 0; - __pyx_t_50 = 0; - __pyx_t_51 = 0; + __pyx_t_21 = 0; + __pyx_t_20 = 0; + __pyx_t_19 = 0; __pyx_t_10 = -1; - if (__pyx_t_49 < 0) { - __pyx_t_49 += __pyx_v_arr_memview64.shape[0]; - if (unlikely(__pyx_t_49 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_49 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_50 < 0) { - __pyx_t_50 += __pyx_v_arr_memview64.shape[1]; - if (unlikely(__pyx_t_50 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_50 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_51 < 0) { - __pyx_t_51 += __pyx_v_arr_memview64.shape[2]; - if (unlikely(__pyx_t_51 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_51 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_arr_memview64.shape[0]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memview64.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_v_arr_memview64.shape[1]; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memview64.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_v_arr_memview64.shape[2]; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memview64.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 830, __pyx_L1_error) + __PYX_ERR(0, 836, __pyx_L1_error) } - /* "dijkstra3d.pyx":832 + /* "dijkstra3d.pyx":838 * &arr_memview64[0,0,0], * sx, sy, sz, * src, &parents32[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_52 = 0; - __pyx_t_53 = 0; - __pyx_t_54 = 0; + __pyx_t_18 = 0; + __pyx_t_17 = 0; + __pyx_t_16 = 0; __pyx_t_10 = -1; - if (__pyx_t_52 < 0) { - __pyx_t_52 += __pyx_pybuffernd_parents32.diminfo[0].shape; - if (unlikely(__pyx_t_52 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_52 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_53 < 0) { - __pyx_t_53 += __pyx_pybuffernd_parents32.diminfo[1].shape; - if (unlikely(__pyx_t_53 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_53 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_54 < 0) { - __pyx_t_54 += __pyx_pybuffernd_parents32.diminfo[2].shape; - if (unlikely(__pyx_t_54 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_54 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_parents32.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_pybuffernd_parents32.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_parents32.diminfo[2].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 832, __pyx_L1_error) + __PYX_ERR(0, 838, __pyx_L1_error) } - /* "dijkstra3d.pyx":833 + /* "dijkstra3d.pyx":839 * sx, sy, sz, * src, &parents32[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * elif dtype in (np.uint32, np.int32): */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 839, __pyx_L1_error) - /* "dijkstra3d.pyx":829 + /* "dijkstra3d.pyx":835 * ) * else: * parental_field3d[uint64_t,uint32_t]( # <<<<<<<<<<<<<< * &arr_memview64[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_49 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_50 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_51 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_52, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_53, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_54, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview64.data + __pyx_t_21 * __pyx_v_arr_memview64.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_memview64.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memview64.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_16, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); } __pyx_L9:; - /* "dijkstra3d.pyx":819 + /* "dijkstra3d.pyx":825 * connectivity * ) * elif dtype in (np.int64, np.uint64): # <<<<<<<<<<<<<< @@ -13178,7 +13077,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L4; } - /* "dijkstra3d.pyx":835 + /* "dijkstra3d.pyx":841 * connectivity * ) * elif dtype in (np.uint32, np.int32): # <<<<<<<<<<<<<< @@ -13187,47 +13086,47 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_7 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_8) { } else { - __pyx_t_41 = __pyx_t_8; + __pyx_t_23 = __pyx_t_8; goto __pyx_L10_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_41 = __pyx_t_8; + __pyx_t_23 = __pyx_t_8; __pyx_L10_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = (__pyx_t_41 != 0); + __pyx_t_8 = (__pyx_t_23 != 0); if (__pyx_t_8) { - /* "dijkstra3d.pyx":836 + /* "dijkstra3d.pyx":842 * ) * elif dtype in (np.uint32, np.int32): * arr_memview32 = data.astype(np.uint32) # <<<<<<<<<<<<<< * if sixtyfourbit: * parental_field3d[uint32_t,uint64_t]( */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -13243,100 +13142,100 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 836, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_55 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_55.memview)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_25 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint32_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_25.memview)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_arr_memview32 = __pyx_t_55; - __pyx_t_55.memview = NULL; - __pyx_t_55.data = NULL; + __pyx_v_arr_memview32 = __pyx_t_25; + __pyx_t_25.memview = NULL; + __pyx_t_25.data = NULL; - /* "dijkstra3d.pyx":837 + /* "dijkstra3d.pyx":843 * elif dtype in (np.uint32, np.int32): * arr_memview32 = data.astype(np.uint32) * if sixtyfourbit: # <<<<<<<<<<<<<< * parental_field3d[uint32_t,uint64_t]( * &arr_memview32[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 843, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":839 + /* "dijkstra3d.pyx":845 * if sixtyfourbit: * parental_field3d[uint32_t,uint64_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents64[0,0,0], */ - __pyx_t_56 = 0; - __pyx_t_57 = 0; - __pyx_t_58 = 0; + __pyx_t_16 = 0; + __pyx_t_17 = 0; + __pyx_t_18 = 0; __pyx_t_10 = -1; - if (__pyx_t_56 < 0) { - __pyx_t_56 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_56 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_56 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_57 < 0) { - __pyx_t_57 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_57 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_57 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_58 < 0) { - __pyx_t_58 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_58 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_58 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 839, __pyx_L1_error) + __PYX_ERR(0, 845, __pyx_L1_error) } - /* "dijkstra3d.pyx":841 + /* "dijkstra3d.pyx":847 * &arr_memview32[0,0,0], * sx, sy, sz, * src, &parents64[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_59 = 0; - __pyx_t_60 = 0; - __pyx_t_61 = 0; + __pyx_t_19 = 0; + __pyx_t_20 = 0; + __pyx_t_21 = 0; __pyx_t_10 = -1; - if (__pyx_t_59 < 0) { - __pyx_t_59 += __pyx_pybuffernd_parents64.diminfo[0].shape; - if (unlikely(__pyx_t_59 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_59 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_60 < 0) { - __pyx_t_60 += __pyx_pybuffernd_parents64.diminfo[1].shape; - if (unlikely(__pyx_t_60 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_60 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_61 < 0) { - __pyx_t_61 += __pyx_pybuffernd_parents64.diminfo[2].shape; - if (unlikely(__pyx_t_61 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_61 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_pybuffernd_parents64.diminfo[0].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_parents64.diminfo[1].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_pybuffernd_parents64.diminfo[2].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 841, __pyx_L1_error) + __PYX_ERR(0, 847, __pyx_L1_error) } - /* "dijkstra3d.pyx":842 + /* "dijkstra3d.pyx":848 * sx, sy, sz, * src, &parents64[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) - /* "dijkstra3d.pyx":838 + /* "dijkstra3d.pyx":844 * arr_memview32 = data.astype(np.uint32) * if sixtyfourbit: * parental_field3d[uint32_t,uint64_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_56 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_57 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_58 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_59, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_60, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_61, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_16 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_17 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_18 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_21, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); - /* "dijkstra3d.pyx":837 + /* "dijkstra3d.pyx":843 * elif dtype in (np.uint32, np.int32): * arr_memview32 = data.astype(np.uint32) * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -13346,7 +13245,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L12; } - /* "dijkstra3d.pyx":845 + /* "dijkstra3d.pyx":851 * ) * else: * parental_field3d[uint32_t,uint32_t]( # <<<<<<<<<<<<<< @@ -13355,83 +13254,83 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ /*else*/ { - /* "dijkstra3d.pyx":846 + /* "dijkstra3d.pyx":852 * else: * parental_field3d[uint32_t,uint32_t]( * &arr_memview32[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents32[0,0,0], */ - __pyx_t_62 = 0; - __pyx_t_63 = 0; - __pyx_t_64 = 0; + __pyx_t_21 = 0; + __pyx_t_20 = 0; + __pyx_t_19 = 0; __pyx_t_10 = -1; - if (__pyx_t_62 < 0) { - __pyx_t_62 += __pyx_v_arr_memview32.shape[0]; - if (unlikely(__pyx_t_62 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_62 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_63 < 0) { - __pyx_t_63 += __pyx_v_arr_memview32.shape[1]; - if (unlikely(__pyx_t_63 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_63 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_64 < 0) { - __pyx_t_64 += __pyx_v_arr_memview32.shape[2]; - if (unlikely(__pyx_t_64 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_64 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_arr_memview32.shape[0]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memview32.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_v_arr_memview32.shape[1]; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memview32.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_v_arr_memview32.shape[2]; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memview32.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 846, __pyx_L1_error) + __PYX_ERR(0, 852, __pyx_L1_error) } - /* "dijkstra3d.pyx":848 + /* "dijkstra3d.pyx":854 * &arr_memview32[0,0,0], * sx, sy, sz, * src, &parents32[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_65 = 0; - __pyx_t_66 = 0; - __pyx_t_67 = 0; + __pyx_t_18 = 0; + __pyx_t_17 = 0; + __pyx_t_16 = 0; __pyx_t_10 = -1; - if (__pyx_t_65 < 0) { - __pyx_t_65 += __pyx_pybuffernd_parents32.diminfo[0].shape; - if (unlikely(__pyx_t_65 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_65 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_66 < 0) { - __pyx_t_66 += __pyx_pybuffernd_parents32.diminfo[1].shape; - if (unlikely(__pyx_t_66 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_66 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_67 < 0) { - __pyx_t_67 += __pyx_pybuffernd_parents32.diminfo[2].shape; - if (unlikely(__pyx_t_67 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_67 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_parents32.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_pybuffernd_parents32.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_parents32.diminfo[2].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 848, __pyx_L1_error) + __PYX_ERR(0, 854, __pyx_L1_error) } - /* "dijkstra3d.pyx":849 + /* "dijkstra3d.pyx":855 * sx, sy, sz, * src, &parents32[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * elif dtype in (np.int16, np.uint16): */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 855, __pyx_L1_error) - /* "dijkstra3d.pyx":845 + /* "dijkstra3d.pyx":851 * ) * else: * parental_field3d[uint32_t,uint32_t]( # <<<<<<<<<<<<<< * &arr_memview32[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_62 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_63 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_64 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_65, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_66, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_67, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview32.data + __pyx_t_21 * __pyx_v_arr_memview32.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_memview32.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memview32.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_16, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); } __pyx_L12:; - /* "dijkstra3d.pyx":835 + /* "dijkstra3d.pyx":841 * connectivity * ) * elif dtype in (np.uint32, np.int32): # <<<<<<<<<<<<<< @@ -13441,7 +13340,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L4; } - /* "dijkstra3d.pyx":851 + /* "dijkstra3d.pyx":857 * connectivity * ) * elif dtype in (np.int16, np.uint16): # <<<<<<<<<<<<<< @@ -13450,47 +13349,47 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_7 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 851, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_41 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!__pyx_t_41) { + if (!__pyx_t_23) { } else { - __pyx_t_8 = __pyx_t_41; + __pyx_t_8 = __pyx_t_23; goto __pyx_L13_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 851, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_41 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __pyx_t_41; + __pyx_t_8 = __pyx_t_23; __pyx_L13_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_41 = (__pyx_t_8 != 0); - if (__pyx_t_41) { + __pyx_t_23 = (__pyx_t_8 != 0); + if (__pyx_t_23) { - /* "dijkstra3d.pyx":852 + /* "dijkstra3d.pyx":858 * ) * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) # <<<<<<<<<<<<<< * if sixtyfourbit: * parental_field3d[uint16_t,uint64_t]( */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -13506,100 +13405,100 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 852, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_68 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint16_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_68.memview)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_26 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint16_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_26.memview)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_arr_memview16 = __pyx_t_68; - __pyx_t_68.memview = NULL; - __pyx_t_68.data = NULL; + __pyx_v_arr_memview16 = __pyx_t_26; + __pyx_t_26.memview = NULL; + __pyx_t_26.data = NULL; - /* "dijkstra3d.pyx":853 + /* "dijkstra3d.pyx":859 * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) * if sixtyfourbit: # <<<<<<<<<<<<<< * parental_field3d[uint16_t,uint64_t]( * &arr_memview16[0,0,0], */ - __pyx_t_41 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_41 < 0)) __PYX_ERR(0, 853, __pyx_L1_error) - if (__pyx_t_41) { + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 859, __pyx_L1_error) + if (__pyx_t_23) { - /* "dijkstra3d.pyx":855 + /* "dijkstra3d.pyx":861 * if sixtyfourbit: * parental_field3d[uint16_t,uint64_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents64[0,0,0], */ - __pyx_t_69 = 0; - __pyx_t_70 = 0; - __pyx_t_71 = 0; + __pyx_t_16 = 0; + __pyx_t_17 = 0; + __pyx_t_18 = 0; __pyx_t_10 = -1; - if (__pyx_t_69 < 0) { - __pyx_t_69 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_69 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_69 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_70 < 0) { - __pyx_t_70 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_70 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_70 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_71 < 0) { - __pyx_t_71 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_71 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_71 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 855, __pyx_L1_error) + __PYX_ERR(0, 861, __pyx_L1_error) } - /* "dijkstra3d.pyx":857 + /* "dijkstra3d.pyx":863 * &arr_memview16[0,0,0], * sx, sy, sz, * src, &parents64[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_72 = 0; - __pyx_t_73 = 0; - __pyx_t_74 = 0; + __pyx_t_19 = 0; + __pyx_t_20 = 0; + __pyx_t_21 = 0; __pyx_t_10 = -1; - if (__pyx_t_72 < 0) { - __pyx_t_72 += __pyx_pybuffernd_parents64.diminfo[0].shape; - if (unlikely(__pyx_t_72 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_72 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_73 < 0) { - __pyx_t_73 += __pyx_pybuffernd_parents64.diminfo[1].shape; - if (unlikely(__pyx_t_73 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_73 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_74 < 0) { - __pyx_t_74 += __pyx_pybuffernd_parents64.diminfo[2].shape; - if (unlikely(__pyx_t_74 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_74 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_pybuffernd_parents64.diminfo[0].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_parents64.diminfo[1].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_pybuffernd_parents64.diminfo[2].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 857, __pyx_L1_error) + __PYX_ERR(0, 863, __pyx_L1_error) } - /* "dijkstra3d.pyx":858 + /* "dijkstra3d.pyx":864 * sx, sy, sz, * src, &parents64[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L1_error) - /* "dijkstra3d.pyx":854 + /* "dijkstra3d.pyx":860 * arr_memview16 = data.astype(np.uint16) * if sixtyfourbit: * parental_field3d[uint16_t,uint64_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_69 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_70 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_71 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_72, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_73, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_74, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_16 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_17 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_18 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_21, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); - /* "dijkstra3d.pyx":853 + /* "dijkstra3d.pyx":859 * elif dtype in (np.int16, np.uint16): * arr_memview16 = data.astype(np.uint16) * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -13609,7 +13508,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L15; } - /* "dijkstra3d.pyx":861 + /* "dijkstra3d.pyx":867 * ) * else: * parental_field3d[uint16_t,uint32_t]( # <<<<<<<<<<<<<< @@ -13618,83 +13517,83 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ /*else*/ { - /* "dijkstra3d.pyx":862 + /* "dijkstra3d.pyx":868 * else: * parental_field3d[uint16_t,uint32_t]( * &arr_memview16[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents32[0,0,0], */ - __pyx_t_75 = 0; - __pyx_t_76 = 0; - __pyx_t_77 = 0; + __pyx_t_21 = 0; + __pyx_t_20 = 0; + __pyx_t_19 = 0; __pyx_t_10 = -1; - if (__pyx_t_75 < 0) { - __pyx_t_75 += __pyx_v_arr_memview16.shape[0]; - if (unlikely(__pyx_t_75 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_75 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_76 < 0) { - __pyx_t_76 += __pyx_v_arr_memview16.shape[1]; - if (unlikely(__pyx_t_76 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_76 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_77 < 0) { - __pyx_t_77 += __pyx_v_arr_memview16.shape[2]; - if (unlikely(__pyx_t_77 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_77 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_arr_memview16.shape[0]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memview16.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_v_arr_memview16.shape[1]; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memview16.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_v_arr_memview16.shape[2]; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memview16.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 862, __pyx_L1_error) + __PYX_ERR(0, 868, __pyx_L1_error) } - /* "dijkstra3d.pyx":864 + /* "dijkstra3d.pyx":870 * &arr_memview16[0,0,0], * sx, sy, sz, * src, &parents32[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_78 = 0; - __pyx_t_79 = 0; - __pyx_t_80 = 0; + __pyx_t_18 = 0; + __pyx_t_17 = 0; + __pyx_t_16 = 0; __pyx_t_10 = -1; - if (__pyx_t_78 < 0) { - __pyx_t_78 += __pyx_pybuffernd_parents32.diminfo[0].shape; - if (unlikely(__pyx_t_78 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_78 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_79 < 0) { - __pyx_t_79 += __pyx_pybuffernd_parents32.diminfo[1].shape; - if (unlikely(__pyx_t_79 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_79 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_80 < 0) { - __pyx_t_80 += __pyx_pybuffernd_parents32.diminfo[2].shape; - if (unlikely(__pyx_t_80 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_80 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_parents32.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_pybuffernd_parents32.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_parents32.diminfo[2].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 864, __pyx_L1_error) + __PYX_ERR(0, 870, __pyx_L1_error) } - /* "dijkstra3d.pyx":865 + /* "dijkstra3d.pyx":871 * sx, sy, sz, * src, &parents32[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * elif dtype in (np.int8, np.uint8, np.bool): */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 865, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 871, __pyx_L1_error) - /* "dijkstra3d.pyx":861 + /* "dijkstra3d.pyx":867 * ) * else: * parental_field3d[uint16_t,uint32_t]( # <<<<<<<<<<<<<< * &arr_memview16[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_75 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_76 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_77 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_78, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_79, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_80, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint16_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview16.data + __pyx_t_21 * __pyx_v_arr_memview16.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_memview16.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memview16.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_16, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); } __pyx_L15:; - /* "dijkstra3d.pyx":851 + /* "dijkstra3d.pyx":857 * connectivity * ) * elif dtype in (np.int16, np.uint16): # <<<<<<<<<<<<<< @@ -13704,7 +13603,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L4; } - /* "dijkstra3d.pyx":867 + /* "dijkstra3d.pyx":873 * connectivity * ) * elif dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -13713,61 +13612,61 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_7 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_8) { } else { - __pyx_t_41 = __pyx_t_8; + __pyx_t_23 = __pyx_t_8; goto __pyx_L16_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_8) { } else { - __pyx_t_41 = __pyx_t_8; + __pyx_t_23 = __pyx_t_8; goto __pyx_L16_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_41 = __pyx_t_8; + __pyx_t_23 = __pyx_t_8; __pyx_L16_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = (__pyx_t_41 != 0); + __pyx_t_8 = (__pyx_t_23 != 0); if (likely(__pyx_t_8)) { - /* "dijkstra3d.pyx":868 + /* "dijkstra3d.pyx":874 * ) * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) # <<<<<<<<<<<<<< * if sixtyfourbit: * parental_field3d[uint8_t,uint64_t]( */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -13783,100 +13682,100 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 868, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_81 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_81.memview)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_27 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_27.memview)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_arr_memview8 = __pyx_t_81; - __pyx_t_81.memview = NULL; - __pyx_t_81.data = NULL; + __pyx_v_arr_memview8 = __pyx_t_27; + __pyx_t_27.memview = NULL; + __pyx_t_27.data = NULL; - /* "dijkstra3d.pyx":869 + /* "dijkstra3d.pyx":875 * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) * if sixtyfourbit: # <<<<<<<<<<<<<< * parental_field3d[uint8_t,uint64_t]( * &arr_memview8[0,0,0], */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 875, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":871 + /* "dijkstra3d.pyx":877 * if sixtyfourbit: * parental_field3d[uint8_t,uint64_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents64[0,0,0], */ - __pyx_t_82 = 0; - __pyx_t_83 = 0; - __pyx_t_84 = 0; + __pyx_t_16 = 0; + __pyx_t_17 = 0; + __pyx_t_18 = 0; __pyx_t_10 = -1; - if (__pyx_t_82 < 0) { - __pyx_t_82 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_82 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_82 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_83 < 0) { - __pyx_t_83 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_83 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_83 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_84 < 0) { - __pyx_t_84 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_84 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_84 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_18 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 871, __pyx_L1_error) + __PYX_ERR(0, 877, __pyx_L1_error) } - /* "dijkstra3d.pyx":873 + /* "dijkstra3d.pyx":879 * &arr_memview8[0,0,0], * sx, sy, sz, * src, &parents64[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_85 = 0; - __pyx_t_86 = 0; - __pyx_t_87 = 0; + __pyx_t_19 = 0; + __pyx_t_20 = 0; + __pyx_t_21 = 0; __pyx_t_10 = -1; - if (__pyx_t_85 < 0) { - __pyx_t_85 += __pyx_pybuffernd_parents64.diminfo[0].shape; - if (unlikely(__pyx_t_85 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_85 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_86 < 0) { - __pyx_t_86 += __pyx_pybuffernd_parents64.diminfo[1].shape; - if (unlikely(__pyx_t_86 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_86 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_87 < 0) { - __pyx_t_87 += __pyx_pybuffernd_parents64.diminfo[2].shape; - if (unlikely(__pyx_t_87 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_87 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_pybuffernd_parents64.diminfo[0].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_parents64.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_parents64.diminfo[1].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_parents64.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_pybuffernd_parents64.diminfo[2].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_parents64.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 873, __pyx_L1_error) + __PYX_ERR(0, 879, __pyx_L1_error) } - /* "dijkstra3d.pyx":874 + /* "dijkstra3d.pyx":880 * sx, sy, sz, * src, &parents64[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L1_error) - /* "dijkstra3d.pyx":870 + /* "dijkstra3d.pyx":876 * arr_memview8 = data.astype(np.uint8) * if sixtyfourbit: * parental_field3d[uint8_t,uint64_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_82 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_83 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_84 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_85, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_86, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_87, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_16 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_17 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_18 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint64_t *, __pyx_pybuffernd_parents64.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_parents64.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_parents64.diminfo[1].strides, __pyx_t_21, __pyx_pybuffernd_parents64.diminfo[2].strides))), __pyx_t_10)); - /* "dijkstra3d.pyx":869 + /* "dijkstra3d.pyx":875 * elif dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -13886,7 +13785,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L19; } - /* "dijkstra3d.pyx":877 + /* "dijkstra3d.pyx":883 * ) * else: * parental_field3d[uint8_t,uint32_t]( # <<<<<<<<<<<<<< @@ -13895,83 +13794,83 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ /*else*/ { - /* "dijkstra3d.pyx":878 + /* "dijkstra3d.pyx":884 * else: * parental_field3d[uint8_t,uint32_t]( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< * sx, sy, sz, * src, &parents32[0,0,0], */ - __pyx_t_88 = 0; - __pyx_t_89 = 0; - __pyx_t_90 = 0; + __pyx_t_21 = 0; + __pyx_t_20 = 0; + __pyx_t_19 = 0; __pyx_t_10 = -1; - if (__pyx_t_88 < 0) { - __pyx_t_88 += __pyx_v_arr_memview8.shape[0]; - if (unlikely(__pyx_t_88 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_88 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_10 = 0; - if (__pyx_t_89 < 0) { - __pyx_t_89 += __pyx_v_arr_memview8.shape[1]; - if (unlikely(__pyx_t_89 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_89 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_10 = 1; - if (__pyx_t_90 < 0) { - __pyx_t_90 += __pyx_v_arr_memview8.shape[2]; - if (unlikely(__pyx_t_90 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_90 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_10 = 2; + if (__pyx_t_21 < 0) { + __pyx_t_21 += __pyx_v_arr_memview8.shape[0]; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_21 >= __pyx_v_arr_memview8.shape[0])) __pyx_t_10 = 0; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_v_arr_memview8.shape[1]; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_20 >= __pyx_v_arr_memview8.shape[1])) __pyx_t_10 = 1; + if (__pyx_t_19 < 0) { + __pyx_t_19 += __pyx_v_arr_memview8.shape[2]; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_19 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 878, __pyx_L1_error) + __PYX_ERR(0, 884, __pyx_L1_error) } - /* "dijkstra3d.pyx":880 + /* "dijkstra3d.pyx":886 * &arr_memview8[0,0,0], * sx, sy, sz, * src, &parents32[0,0,0], # <<<<<<<<<<<<<< * connectivity * ) */ - __pyx_t_91 = 0; - __pyx_t_92 = 0; - __pyx_t_93 = 0; + __pyx_t_18 = 0; + __pyx_t_17 = 0; + __pyx_t_16 = 0; __pyx_t_10 = -1; - if (__pyx_t_91 < 0) { - __pyx_t_91 += __pyx_pybuffernd_parents32.diminfo[0].shape; - if (unlikely(__pyx_t_91 < 0)) __pyx_t_10 = 0; - } else if (unlikely(__pyx_t_91 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; - if (__pyx_t_92 < 0) { - __pyx_t_92 += __pyx_pybuffernd_parents32.diminfo[1].shape; - if (unlikely(__pyx_t_92 < 0)) __pyx_t_10 = 1; - } else if (unlikely(__pyx_t_92 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; - if (__pyx_t_93 < 0) { - __pyx_t_93 += __pyx_pybuffernd_parents32.diminfo[2].shape; - if (unlikely(__pyx_t_93 < 0)) __pyx_t_10 = 2; - } else if (unlikely(__pyx_t_93 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_parents32.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_parents32.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_17 < 0) { + __pyx_t_17 += __pyx_pybuffernd_parents32.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_parents32.diminfo[1].shape)) __pyx_t_10 = 1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_parents32.diminfo[2].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 2; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_parents32.diminfo[2].shape)) __pyx_t_10 = 2; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); - __PYX_ERR(0, 880, __pyx_L1_error) + __PYX_ERR(0, 886, __pyx_L1_error) } - /* "dijkstra3d.pyx":881 + /* "dijkstra3d.pyx":887 * sx, sy, sz, * src, &parents32[0,0,0], * connectivity # <<<<<<<<<<<<<< * ) * else: */ - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_connectivity); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 887, __pyx_L1_error) - /* "dijkstra3d.pyx":877 + /* "dijkstra3d.pyx":883 * ) * else: * parental_field3d[uint8_t,uint32_t]( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::parental_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_88 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_89 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_90 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_91, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_92, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_93, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); + (void)(dijkstra::parental_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_21 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_20 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_19 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(uint32_t *, __pyx_pybuffernd_parents32.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_parents32.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_parents32.diminfo[1].strides, __pyx_t_16, __pyx_pybuffernd_parents32.diminfo[2].strides))), __pyx_t_10)); } __pyx_L19:; - /* "dijkstra3d.pyx":867 + /* "dijkstra3d.pyx":873 * connectivity * ) * elif dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -13981,7 +13880,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L4; } - /* "dijkstra3d.pyx":884 + /* "dijkstra3d.pyx":890 * ) * else: * raise TypeError("Type {} not currently supported.".format(dtype)) # <<<<<<<<<<<<<< @@ -13989,7 +13888,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P * if sixtyfourbit: */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Type_not_currently_supported, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Type_not_currently_supported, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -14003,29 +13902,29 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_v_dtype) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_dtype); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 884, __pyx_L1_error) + __PYX_ERR(0, 890, __pyx_L1_error) } __pyx_L4:; - /* "dijkstra3d.pyx":886 + /* "dijkstra3d.pyx":892 * raise TypeError("Type {} not currently supported.".format(dtype)) * * if sixtyfourbit: # <<<<<<<<<<<<<< * return parents64 * else: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_sixtyfourbit); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 892, __pyx_L1_error) if (__pyx_t_8) { - /* "dijkstra3d.pyx":887 + /* "dijkstra3d.pyx":893 * * if sixtyfourbit: * return parents64 # <<<<<<<<<<<<<< @@ -14037,7 +13936,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __pyx_r = ((PyObject *)__pyx_v_parents64); goto __pyx_L0; - /* "dijkstra3d.pyx":886 + /* "dijkstra3d.pyx":892 * raise TypeError("Type {} not currently supported.".format(dtype)) * * if sixtyfourbit: # <<<<<<<<<<<<<< @@ -14046,12 +13945,12 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P */ } - /* "dijkstra3d.pyx":889 + /* "dijkstra3d.pyx":895 * return parents64 * else: * return parents32 # <<<<<<<<<<<<<< * - * def _execute_euclidean_distance_field(data, source, anisotropy): + * def _execute_euclidean_distance_field(data, source, anisotropy, float free_space_radius = 0): */ /*else*/ { __Pyx_XDECREF(__pyx_r); @@ -14060,7 +13959,7 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P goto __pyx_L0; } - /* "dijkstra3d.pyx":761 + /* "dijkstra3d.pyx":767 * return np.frombuffer(buf, dtype=np.float32).reshape(data.shape, order='F') * * def _execute_parental_field(data, source, connectivity): # <<<<<<<<<<<<<< @@ -14077,11 +13976,11 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __PYX_XDEC_MEMVIEW(&__pyx_t_15, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_28, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_42, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_55, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_68, 1); - __PYX_XDEC_MEMVIEW(&__pyx_t_81, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_22, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_24, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_25, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_26, 1); + __PYX_XDEC_MEMVIEW(&__pyx_t_27, 1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -14111,10 +14010,10 @@ static PyObject *__pyx_pf_10dijkstra3d_18_execute_parental_field(CYTHON_UNUSED P return __pyx_r; } -/* "dijkstra3d.pyx":891 +/* "dijkstra3d.pyx":897 * return parents32 * - * def _execute_euclidean_distance_field(data, source, anisotropy): # <<<<<<<<<<<<<< + * def _execute_euclidean_distance_field(data, source, anisotropy, float free_space_radius = 0): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * */ @@ -14126,16 +14025,22 @@ static PyObject *__pyx_pw_10dijkstra3d_21_execute_euclidean_distance_field(PyObj PyObject *__pyx_v_data = 0; PyObject *__pyx_v_source = 0; PyObject *__pyx_v_anisotropy = 0; + float __pyx_v_free_space_radius; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_execute_euclidean_distance_field (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_source,&__pyx_n_s_anisotropy,0}; - PyObject* values[3] = {0,0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_source,&__pyx_n_s_anisotropy,&__pyx_n_s_free_space_radius,0}; + PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -14154,45 +14059,60 @@ static PyObject *__pyx_pw_10dijkstra3d_21_execute_euclidean_distance_field(PyObj case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_euclidean_distance_field", 1, 3, 3, 1); __PYX_ERR(0, 891, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_euclidean_distance_field", 0, 3, 4, 1); __PYX_ERR(0, 897, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anisotropy)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_execute_euclidean_distance_field", 1, 3, 3, 2); __PYX_ERR(0, 891, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_euclidean_distance_field", 0, 3, 4, 2); __PYX_ERR(0, 897, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_space_radius); + if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_euclidean_distance_field") < 0)) __PYX_ERR(0, 891, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_execute_euclidean_distance_field") < 0)) __PYX_ERR(0, 897, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } } __pyx_v_data = values[0]; __pyx_v_source = values[1]; __pyx_v_anisotropy = values[2]; + if (values[3]) { + __pyx_v_free_space_radius = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_free_space_radius == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L3_error) + } else { + __pyx_v_free_space_radius = ((float)0.0); + } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_execute_euclidean_distance_field", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 891, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_execute_euclidean_distance_field", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 897, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("dijkstra3d._execute_euclidean_distance_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(__pyx_self, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy); + __pyx_r = __pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(__pyx_self, __pyx_v_data, __pyx_v_source, __pyx_v_anisotropy, __pyx_v_free_space_radius); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy) { +static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_source, PyObject *__pyx_v_anisotropy, float __pyx_v_free_space_radius) { __Pyx_memviewslice __pyx_v_arr_memview8 = { 0, 0, { 0 }, { 0 }, { 0 } }; size_t __pyx_v_sx; size_t __pyx_v_sy; @@ -14226,155 +14146,158 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO Py_ssize_t __pyx_t_17; Py_ssize_t __pyx_t_18; Py_ssize_t __pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_execute_euclidean_distance_field", 0); __pyx_pybuffer_dist.pybuffer.buf = NULL; __pyx_pybuffer_dist.refcount = 0; __pyx_pybuffernd_dist.data = NULL; __pyx_pybuffernd_dist.rcbuffer = &__pyx_pybuffer_dist; - /* "dijkstra3d.pyx":894 + /* "dijkstra3d.pyx":900 * cdef uint8_t[:,:,:] arr_memview8 * * cdef size_t sx = data.shape[0] # <<<<<<<<<<<<<< * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sx = __pyx_t_3; - /* "dijkstra3d.pyx":895 + /* "dijkstra3d.pyx":901 * * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] # <<<<<<<<<<<<<< * cdef size_t sz = data.shape[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sy = __pyx_t_3; - /* "dijkstra3d.pyx":896 + /* "dijkstra3d.pyx":902 * cdef size_t sx = data.shape[0] * cdef size_t sy = data.shape[1] * cdef size_t sz = data.shape[2] # <<<<<<<<<<<<<< * * cdef float wx = anisotropy[0] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sz = __pyx_t_3; - /* "dijkstra3d.pyx":898 + /* "dijkstra3d.pyx":904 * cdef size_t sz = data.shape[2] * * cdef float wx = anisotropy[0] # <<<<<<<<<<<<<< * cdef float wy = anisotropy[1] * cdef float wz = anisotropy[2] */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_anisotropy, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_anisotropy, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_wx = __pyx_t_4; - /* "dijkstra3d.pyx":899 + /* "dijkstra3d.pyx":905 * * cdef float wx = anisotropy[0] * cdef float wy = anisotropy[1] # <<<<<<<<<<<<<< * cdef float wz = anisotropy[2] * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_anisotropy, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_anisotropy, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_wy = __pyx_t_4; - /* "dijkstra3d.pyx":900 + /* "dijkstra3d.pyx":906 * cdef float wx = anisotropy[0] * cdef float wy = anisotropy[1] * cdef float wz = anisotropy[2] # <<<<<<<<<<<<<< * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_anisotropy, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_anisotropy, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_wz = __pyx_t_4; - /* "dijkstra3d.pyx":902 + /* "dijkstra3d.pyx":908 * cdef float wz = anisotropy[2] * * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) # <<<<<<<<<<<<<< * * cdef cnp.ndarray[float, ndim=3] dist = np.zeros( (sx,sy,sz), dtype=np.float32, order='F' ) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_7); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_7); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_src = __pyx_t_3; - /* "dijkstra3d.pyx":904 + /* "dijkstra3d.pyx":910 * cdef size_t src = source[0] + sx * (source[1] + sy * source[2]) * * cdef cnp.ndarray[float, ndim=3] dist = np.zeros( (sx,sy,sz), dtype=np.float32, order='F' ) # <<<<<<<<<<<<<< * * dtype = data.dtype */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_sx); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_sy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_sz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); @@ -14385,33 +14308,33 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO __pyx_t_7 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 910, __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, 904, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 904, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 904, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 910, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 904, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 910, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_7); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dist.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) { __pyx_v_dist = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_dist.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 904, __pyx_L1_error) + __PYX_ERR(0, 910, __pyx_L1_error) } else {__pyx_pybuffernd_dist.diminfo[0].strides = __pyx_pybuffernd_dist.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dist.diminfo[0].shape = __pyx_pybuffernd_dist.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_dist.diminfo[1].strides = __pyx_pybuffernd_dist.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_dist.diminfo[1].shape = __pyx_pybuffernd_dist.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_dist.diminfo[2].strides = __pyx_pybuffernd_dist.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_dist.diminfo[2].shape = __pyx_pybuffernd_dist.rcbuffer->pybuffer.shape[2]; } } @@ -14419,19 +14342,19 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO __pyx_v_dist = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; - /* "dijkstra3d.pyx":906 + /* "dijkstra3d.pyx":912 * cdef cnp.ndarray[float, ndim=3] dist = np.zeros( (sx,sy,sz), dtype=np.float32, order='F' ) * * dtype = data.dtype # <<<<<<<<<<<<<< * * if dtype in (np.int8, np.uint8, np.bool): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_dtype = __pyx_t_7; __pyx_t_7 = 0; - /* "dijkstra3d.pyx":908 + /* "dijkstra3d.pyx":914 * dtype = data.dtype * * if dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -14440,42 +14363,42 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO */ __Pyx_INCREF(__pyx_v_dtype); __pyx_t_7 = __pyx_v_dtype; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L4_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L4_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_t_11; __pyx_L4_bool_binop_done:; @@ -14483,18 +14406,18 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO __pyx_t_11 = (__pyx_t_10 != 0); if (likely(__pyx_t_11)) { - /* "dijkstra3d.pyx":909 + /* "dijkstra3d.pyx":915 * * if dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) # <<<<<<<<<<<<<< * euclidean_distance_field3d( * &arr_memview8[0,0,0], */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 909, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -14510,16 +14433,16 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 909, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_nn_uint8_t(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_arr_memview8 = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "dijkstra3d.pyx":911 + /* "dijkstra3d.pyx":917 * arr_memview8 = data.astype(np.uint8) * euclidean_distance_field3d( * &arr_memview8[0,0,0], # <<<<<<<<<<<<<< @@ -14544,13 +14467,13 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO } else if (unlikely(__pyx_t_15 >= __pyx_v_arr_memview8.shape[2])) __pyx_t_16 = 2; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 911, __pyx_L1_error) + __PYX_ERR(0, 917, __pyx_L1_error) } - /* "dijkstra3d.pyx":914 - * sx, sy, sz, + /* "dijkstra3d.pyx":921 * wx, wy, wz, - * src, &dist[0,0,0] # <<<<<<<<<<<<<< + * src, free_space_radius, + * &dist[0,0,0] # <<<<<<<<<<<<<< * ) * else: */ @@ -14572,19 +14495,19 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_dist.diminfo[2].shape)) __pyx_t_16 = 2; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 914, __pyx_L1_error) + __PYX_ERR(0, 921, __pyx_L1_error) } - /* "dijkstra3d.pyx":910 + /* "dijkstra3d.pyx":916 * if dtype in (np.int8, np.uint8, np.bool): * arr_memview8 = data.astype(np.uint8) * euclidean_distance_field3d( # <<<<<<<<<<<<<< * &arr_memview8[0,0,0], * sx, sy, sz, */ - (void)(dijkstra::euclidean_distance_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_13 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_14 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_15 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_wx, __pyx_v_wy, __pyx_v_wz, __pyx_v_src, (&(*__Pyx_BufPtrStrided3d(float *, __pyx_pybuffernd_dist.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_dist.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_dist.diminfo[1].strides, __pyx_t_19, __pyx_pybuffernd_dist.diminfo[2].strides))))); + (void)(dijkstra::euclidean_distance_field3d((&(*((uint8_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_arr_memview8.data + __pyx_t_13 * __pyx_v_arr_memview8.strides[0]) ) + __pyx_t_14 * __pyx_v_arr_memview8.strides[1]) ) + __pyx_t_15 * __pyx_v_arr_memview8.strides[2]) )))), __pyx_v_sx, __pyx_v_sy, __pyx_v_sz, __pyx_v_wx, __pyx_v_wy, __pyx_v_wz, __pyx_v_src, __pyx_v_free_space_radius, (&(*__Pyx_BufPtrStrided3d(float *, __pyx_pybuffernd_dist.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_dist.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_dist.diminfo[1].strides, __pyx_t_19, __pyx_pybuffernd_dist.diminfo[2].strides))))); - /* "dijkstra3d.pyx":908 + /* "dijkstra3d.pyx":914 * dtype = data.dtype * * if dtype in (np.int8, np.uint8, np.bool): # <<<<<<<<<<<<<< @@ -14594,7 +14517,7 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO goto __pyx_L3; } - /* "dijkstra3d.pyx":917 + /* "dijkstra3d.pyx":924 * ) * else: * raise TypeError("Type {} not currently supported.".format(dtype)) # <<<<<<<<<<<<<< @@ -14602,7 +14525,7 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO * return dist */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Type_not_currently_supported, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Type_not_currently_supported, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -14616,19 +14539,19 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO } __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_dtype) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dtype); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 917, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 917, __pyx_L1_error) + __PYX_ERR(0, 924, __pyx_L1_error) } __pyx_L3:; - /* "dijkstra3d.pyx":919 + /* "dijkstra3d.pyx":926 * raise TypeError("Type {} not currently supported.".format(dtype)) * * return dist # <<<<<<<<<<<<<< @@ -14638,10 +14561,10 @@ static PyObject *__pyx_pf_10dijkstra3d_20_execute_euclidean_distance_field(CYTHO __pyx_r = ((PyObject *)__pyx_v_dist); goto __pyx_L0; - /* "dijkstra3d.pyx":891 + /* "dijkstra3d.pyx":897 * return parents32 * - * def _execute_euclidean_distance_field(data, source, anisotropy): # <<<<<<<<<<<<<< + * def _execute_euclidean_distance_field(data, source, anisotropy, float free_space_radius = 0): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * */ @@ -14707,6 +14630,9 @@ static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_se Py_ssize_t __pyx_t_5; int __pyx_t_6; char __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; @@ -14979,6 +14905,9 @@ static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__p int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clone", 0); /* "array.pxd":134 @@ -15075,6 +15004,9 @@ static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__py arrayobject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); /* "array.pxd":141 @@ -15144,6 +15076,9 @@ static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__py int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extend_buffer", 0); /* "array.pxd":149 @@ -15223,6 +15158,9 @@ static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_sel __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extend", 0); /* "array.pxd":157 @@ -15312,7 +15250,7 @@ static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self __Pyx_RefNannyFinishContext(); } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -15353,6 +15291,9 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P PyArray_Descr *__pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; @@ -15361,7 +15302,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 * * cdef int i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -15370,7 +15311,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_endian_detector = 1; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 * cdef int i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -15379,7 +15320,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -15388,7 +15329,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -15402,7 +15343,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L4_bool_binop_done; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -15413,7 +15354,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -15422,7 +15363,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ if (unlikely(__pyx_t_1)) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -15435,7 +15376,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 272, __pyx_L1_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -15444,7 +15385,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -15458,7 +15399,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L7_bool_binop_done; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -15469,7 +15410,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -15478,7 +15419,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ if (unlikely(__pyx_t_1)) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -15491,7 +15432,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 276, __pyx_L1_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -15500,7 +15441,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< @@ -15509,7 +15450,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -15518,7 +15459,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -15528,7 +15469,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< @@ -15537,7 +15478,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -15546,7 +15487,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< @@ -15558,7 +15499,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -15567,7 +15508,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -15577,7 +15518,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -15587,7 +15528,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L9; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -15597,7 +15538,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -15608,7 +15549,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L9:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -15617,7 +15558,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->suboffsets = NULL; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -15626,7 +15567,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -15635,7 +15576,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -15644,7 +15585,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_f = NULL; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297 * cdef int t * cdef char* f = NULL * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -15657,7 +15598,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300 * cdef int offset * * info.obj = self # <<<<<<<<<<<<<< @@ -15670,7 +15611,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< @@ -15680,7 +15621,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); if (__pyx_t_1) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303 * * if not PyDataType_HASFIELDS(descr): * t = descr.type_num # <<<<<<<<<<<<<< @@ -15690,7 +15631,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -15710,7 +15651,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L15_next_or:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -15727,7 +15668,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = __pyx_t_2; __pyx_L14_bool_binop_done:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -15736,7 +15677,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ if (unlikely(__pyx_t_1)) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -15749,7 +15690,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 306, __pyx_L1_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -15758,7 +15699,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< @@ -15771,7 +15712,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_UBYTE: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< @@ -15782,7 +15723,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_SHORT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< @@ -15793,7 +15734,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_USHORT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< @@ -15804,7 +15745,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_INT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< @@ -15815,7 +15756,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_UINT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< @@ -15826,7 +15767,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_LONG: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< @@ -15837,7 +15778,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_ULONG: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< @@ -15848,7 +15789,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_LONGLONG: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< @@ -15859,7 +15800,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_ULONGLONG: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< @@ -15870,7 +15811,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_FLOAT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< @@ -15881,7 +15822,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_DOUBLE: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< @@ -15892,7 +15833,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_LONGDOUBLE: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< @@ -15903,7 +15844,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_CFLOAT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< @@ -15914,7 +15855,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_CDOUBLE: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< @@ -15925,7 +15866,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_CLONGDOUBLE: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< @@ -15936,7 +15877,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; case NPY_OBJECT: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< @@ -15947,7 +15888,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; default: - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -15968,7 +15909,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< @@ -15977,7 +15918,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->format = __pyx_v_f; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< @@ -15987,7 +15928,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_r = 0; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< @@ -15996,7 +15937,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329 * return * else: * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -16006,7 +15947,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P /*else*/ { __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330 * else: * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -16015,7 +15956,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ (__pyx_v_info->format[0]) = '^'; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331 * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -16024,7 +15965,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_offset = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< @@ -16034,7 +15975,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) __pyx_v_f = __pyx_t_9; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< @@ -16044,7 +15985,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P (__pyx_v_f[0]) = '\x00'; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -16076,7 +16017,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -16100,7 +16041,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -16110,7 +16051,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) # <<<<<<<<<<<<<< @@ -16119,7 +16060,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ PyObject_Free(__pyx_v_info->format); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -16128,7 +16069,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -16138,7 +16079,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341 * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) # <<<<<<<<<<<<<< @@ -16147,7 +16088,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ PyObject_Free(__pyx_v_info->strides); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -16156,7 +16097,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -16168,7 +16109,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __Pyx_RefNannyFinishContext(); } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -16180,9 +16121,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -16190,13 +16134,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -16215,7 +16159,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -16227,9 +16171,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -16237,13 +16184,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -16262,7 +16209,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -16274,9 +16221,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -16284,13 +16234,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -16309,7 +16259,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -16321,9 +16271,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -16331,13 +16284,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -16356,7 +16309,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -16368,9 +16321,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -16378,13 +16334,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -16403,7 +16359,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -16417,7 +16373,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -16427,7 +16383,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -16439,7 +16395,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -16448,7 +16404,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":839 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -16462,7 +16418,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -16477,7 +16433,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -16504,9 +16460,12 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx int __pyx_t_7; long __pyx_t_8; char *__pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_util_dtypestring", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":846 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -16515,7 +16474,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_endian_detector = 1; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -16524,7 +16483,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":850 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -16533,21 +16492,21 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(2, 851, __pyx_L1_error) + __PYX_ERR(2, 850, __pyx_L1_error) } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 850, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< @@ -16556,15 +16515,15 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 852, __pyx_L1_error) + __PYX_ERR(2, 851, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 851, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< @@ -16577,7 +16536,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(2, 853, __pyx_L1_error) + __PYX_ERR(2, 852, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -16585,51 +16544,51 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 852, __pyx_L1_error) } - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 852, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":854 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (unlikely(__pyx_t_6)) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 856, __pyx_L1_error) + __PYX_ERR(2, 855, __pyx_L1_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":854 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -16638,7 +16597,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":857 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -16658,7 +16617,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L8_next_or:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -16675,7 +16634,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":857 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -16684,20 +16643,20 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ if (unlikely(__pyx_t_6)) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 860, __pyx_L1_error) + __PYX_ERR(2, 859, __pyx_L1_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":857 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -16706,7 +16665,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":869 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -16714,15 +16673,15 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * f += 1 */ while (1) { - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 869, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 869, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -16731,7 +16690,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ (__pyx_v_f[0]) = 0x78; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -16740,7 +16699,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_f = (__pyx_v_f + 1); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -16751,7 +16710,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":874 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -16761,7 +16720,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":876 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -16771,19 +16730,19 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -16793,20 +16752,20 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (unlikely(__pyx_t_6)) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(2, 880, __pyx_L1_error) + __PYX_ERR(2, 879, __pyx_L1_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -16815,252 +16774,252 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":882 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 882, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 882, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -17069,18 +17028,18 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -17089,18 +17048,18 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -17109,25 +17068,25 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_6)) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":900 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -17135,18 +17094,18 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * else: */ /*else*/ { - __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(2, 901, __pyx_L1_error) + __PYX_ERR(2, 900, __pyx_L1_error) } __pyx_L15:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< @@ -17155,7 +17114,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_f = (__pyx_v_f + 1); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":876 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -17165,7 +17124,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L13; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":905 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< @@ -17173,12 +17132,12 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx * */ /*else*/ { - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 905, __pyx_L1_error) __pyx_v_f = __pyx_t_9; } __pyx_L13:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":850 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -17188,7 +17147,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< @@ -17198,7 +17157,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_r = __pyx_v_f; goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -17223,7 +17182,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1021 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -17235,7 +17194,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_array_base", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -17244,7 +17203,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -17253,7 +17212,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1021 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -17265,7 +17224,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __Pyx_RefNannyFinishContext(); } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1025 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -17280,7 +17239,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -17289,7 +17248,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -17299,7 +17258,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = ((__pyx_v_base == NULL) != 0); if (__pyx_t_1) { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -17310,7 +17269,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -17319,7 +17278,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -17331,7 +17290,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1025 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -17346,7 +17305,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1033 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -17365,9 +17324,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -17383,16 +17345,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * cdef inline int import_array() except -1: * try: * _import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -17406,7 +17368,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036 * try: * _import_array() * except Exception: # <<<<<<<<<<<<<< @@ -17416,28 +17378,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(2, 1038, __pyx_L5_except_error) + __PYX_ERR(2, 1037, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -17452,7 +17414,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1033 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -17475,7 +17437,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1039 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -17494,9 +17456,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -17512,16 +17477,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1041, __pyx_L3_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -17535,7 +17500,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -17545,28 +17510,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1042, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1043, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(2, 1044, __pyx_L5_except_error) + __PYX_ERR(2, 1043, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -17581,7 +17546,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1039 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -17604,7 +17569,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046 +/* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1045 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -17623,9 +17588,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 0); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -17641,16 +17609,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1047, __pyx_L3_error) - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -17664,7 +17632,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -17673,26 +17641,26 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1048, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1049, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(2, 1050, __pyx_L5_except_error) + __PYX_ERR(2, 1049, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -17707,7 +17675,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1045 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -17746,6 +17714,9 @@ static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, P PyObject *__pyx_v_format = 0; PyObject *__pyx_v_mode = 0; int __pyx_v_allocate_buffer; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); @@ -17884,6 +17855,9 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __ Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; Py_ssize_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_format); @@ -18507,6 +18481,9 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(stru Py_ssize_t __pyx_t_5; int __pyx_t_6; Py_ssize_t *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; @@ -18935,6 +18912,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct _ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":223 @@ -18985,6 +18965,9 @@ static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_memview", 0); /* "View.MemoryView":227 @@ -19123,6 +19106,9 @@ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__( __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getattr__", 0); /* "View.MemoryView":234 @@ -19188,6 +19174,9 @@ static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "View.MemoryView":237 @@ -19252,6 +19241,9 @@ static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struc int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); /* "View.MemoryView":240 @@ -19309,6 +19301,9 @@ static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __p PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -19363,6 +19358,9 @@ static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -19410,6 +19408,9 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("array_cwrapper", 0); /* "View.MemoryView":248 @@ -19577,6 +19578,9 @@ static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -19738,6 +19742,9 @@ static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_Memvi int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 @@ -19963,6 +19970,9 @@ static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_Me PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 @@ -20092,6 +20102,9 @@ static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_ar PyObject *__pyx_v_obj = 0; int __pyx_v_flags; int __pyx_v_dtype_is_object; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); @@ -20172,6 +20185,9 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit_ int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "View.MemoryView":346 @@ -20703,6 +20719,9 @@ static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__py PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; char *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_item_pointer", 0); /* "View.MemoryView":395 @@ -20850,6 +20869,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4_ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; char *__pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "View.MemoryView":404 @@ -21033,6 +21055,9 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setit PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); __Pyx_INCREF(__pyx_v_index); @@ -21248,6 +21273,9 @@ static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_slice", 0); __Pyx_INCREF(__pyx_v_obj); @@ -21454,6 +21482,9 @@ static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryvi int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_slice_assignment", 0); /* "View.MemoryView":445 @@ -21550,6 +21581,9 @@ static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memor PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0); /* "View.MemoryView":451 @@ -21823,6 +21857,9 @@ static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *_ __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setitem_indexed", 0); /* "View.MemoryView":482 @@ -21892,6 +21929,9 @@ static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview PyObject *__pyx_t_9 = NULL; size_t __pyx_t_10; int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_item_to_object", 0); /* "View.MemoryView":488 @@ -22170,6 +22210,9 @@ static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryvie char *__pyx_t_12; char *__pyx_t_13; char *__pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_item_from_object", 0); /* "View.MemoryView":504 @@ -22409,6 +22452,9 @@ static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbu void *__pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; @@ -22745,6 +22791,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct _ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":554 @@ -22884,6 +22933,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(stru Py_ssize_t *__pyx_t_3; Py_ssize_t *__pyx_t_4; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":564 @@ -22963,6 +23015,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(st Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":568 @@ -23074,6 +23129,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get_ Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; Py_ssize_t *__pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":576 @@ -23183,6 +23241,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struc PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":583 @@ -23243,6 +23304,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(s PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":587 @@ -23305,6 +23369,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(str PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":591 @@ -23380,6 +23447,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struc Py_ssize_t *__pyx_t_4; Py_ssize_t *__pyx_t_5; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "View.MemoryView":595 @@ -23593,6 +23663,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12 PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "View.MemoryView":612 @@ -23691,6 +23764,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14 __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "View.MemoryView":616 @@ -23769,6 +23845,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16 __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_c_contig", 0); /* "View.MemoryView":622 @@ -23842,6 +23921,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18 __Pyx_RefNannyDeclarations __Pyx_memviewslice *__pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_f_contig", 0); /* "View.MemoryView":628 @@ -23915,6 +23997,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20 __Pyx_RefNannyDeclarations __Pyx_memviewslice __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); /* "View.MemoryView":633 @@ -24007,6 +24092,9 @@ static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22 __Pyx_RefNannyDeclarations __Pyx_memviewslice __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy_fortran", 0); /* "View.MemoryView":645 @@ -24093,6 +24181,9 @@ static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struc PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -24147,6 +24238,9 @@ static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED st PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -24192,6 +24286,9 @@ static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, in PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_cwrapper", 0); /* "View.MemoryView":658 @@ -24333,6 +24430,9 @@ static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) { int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unellipsify", 0); /* "View.MemoryView":671 @@ -24775,6 +24875,9 @@ static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __ Py_ssize_t *__pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assert_direct_dimensions", 0); /* "View.MemoryView":701 @@ -24882,6 +24985,9 @@ static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_ Py_ssize_t __pyx_t_10; int __pyx_t_11; Py_ssize_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memview_slice", 0); /* "View.MemoryView":711 @@ -25435,6 +25541,9 @@ static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; /* "View.MemoryView":827 * cdef bint negative_step @@ -26221,6 +26330,9 @@ static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, P int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pybuffer_index", 0); /* "View.MemoryView":912 @@ -26531,6 +26643,9 @@ static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) { int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; /* "View.MemoryView":944 * @cname('__pyx_memslice_transpose') @@ -26735,6 +26850,9 @@ static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memor __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_item_to_object", 0); /* "View.MemoryView":980 @@ -26819,6 +26937,9 @@ static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memo int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("assign_item_from_object", 0); /* "View.MemoryView":986 @@ -26961,6 +27082,9 @@ static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -27015,6 +27139,9 @@ static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUS PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -27068,6 +27195,9 @@ static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewsl Py_ssize_t *__pyx_t_7; Py_ssize_t *__pyx_t_8; Py_ssize_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_fromslice", 0); /* "View.MemoryView":1007 @@ -27443,6 +27573,9 @@ static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __p int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_slice_from_memview", 0); /* "View.MemoryView":1055 @@ -27667,6 +27800,9 @@ static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_copy", 0); /* "View.MemoryView":1083 @@ -27729,6 +27865,9 @@ static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview PyObject *(*__pyx_t_3)(char *); int (*__pyx_t_4)(char *, PyObject *); PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0); /* "View.MemoryView":1094 @@ -28571,6 +28710,9 @@ static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, struct __pyx_memoryview_obj *__pyx_t_4; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; /* "View.MemoryView":1219 * cdef void *result @@ -28818,6 +28960,9 @@ static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif @@ -28903,6 +29048,9 @@ static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif @@ -28985,6 +29133,9 @@ static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) { PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif @@ -29102,6 +29253,9 @@ static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_ int __pyx_t_6; void *__pyx_t_7; int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; /* "View.MemoryView":1276 * Check for overlapping memory and verify the shapes. @@ -30178,6 +30332,9 @@ static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *_ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0); @@ -30255,6 +30412,9 @@ static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSE PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0); /* "(tree fragment)":4 @@ -30443,6 +30603,9 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0); /* "(tree fragment)":12 @@ -30582,6 +30745,9 @@ static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) { int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("format_from_typeinfo", 0); /* "BufferFormatFromTypeInfo":1468 @@ -30930,9 +31096,9 @@ static void __pyx_tp_dealloc_array(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_array___dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->mode); @@ -31241,9 +31407,9 @@ static void __pyx_tp_dealloc_memoryview(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_memoryview___dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->obj); @@ -31491,9 +31657,9 @@ static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_memoryviewslice___dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->from_object); @@ -31758,6 +31924,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1}, {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1}, + {&__pyx_n_s_free_space_radius, __pyx_k_free_space_radius, sizeof(__pyx_k_free_space_radius), 0, 0, 1, 1}, {&__pyx_n_s_frombuffer, __pyx_k_frombuffer, sizeof(__pyx_k_frombuffer), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__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}, @@ -31875,14 +32042,14 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 136, __pyx_L1_error) - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 356, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 361, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 755, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 109, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) - __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 855, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1037, __pyx_L1_error) __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(3, 404, __pyx_L1_error) __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(3, 613, __pyx_L1_error) return 0; @@ -31894,51 +32061,51 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "dijkstra3d.pyx":141 + /* "dijkstra3d.pyx":143 * * if data.size == 0: * return np.zeros(shape=(0,), dtype=np.uint32, order='F') # <<<<<<<<<<<<<< * * _validate_coord(data, source) */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "dijkstra3d.pyx":147 + /* "dijkstra3d.pyx":149 * * if dims == 2: * data = data[:, :, np.newaxis] # <<<<<<<<<<<<<< * source = list(source) + [ 0 ] * target = list(target) + [ 0 ] */ - __pyx_slice__2 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__2)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_slice__2 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__2)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__2); __Pyx_GIVEREF(__pyx_slice__2); - /* "dijkstra3d.pyx":234 + /* "dijkstra3d.pyx":236 * vec_view64 = path_ptr64 * buf = bytearray(vec_view64[:]) * numpy_path = np.frombuffer(buf, dtype=np.uint64)[::-1] # <<<<<<<<<<<<<< * else: * arr_memview32 = parents */ - __pyx_slice__3 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_slice__3 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__3); __Pyx_GIVEREF(__pyx_slice__3); - /* "dijkstra3d.pyx":304 + /* "dijkstra3d.pyx":306 * return field * - * def euclidean_distance_field(data, source, anisotropy=(1,1,1)): # <<<<<<<<<<<<<< + * def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_tuple__4 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -31949,7 +32116,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -31960,7 +32127,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -31971,47 +32138,47 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 856, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 880, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1038, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "../.virtualenvs/dijkstra/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044 + /* "../.virtualenvs/dijkstra/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 1044, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); @@ -32196,137 +32363,137 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); - /* "dijkstra3d.pyx":83 + /* "dijkstra3d.pyx":85 * ) * * def dijkstra( # <<<<<<<<<<<<<< * data, source, target, * bidirectional=False, connectivity=26, */ - __pyx_tuple__34 = PyTuple_Pack(12, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_bidirectional, __pyx_n_s_connectivity, __pyx_n_s_compass, __pyx_n_s_compass_norm, __pyx_n_s_dims, __pyx_n_s_cols, __pyx_n_s_rows, __pyx_n_s_depth, __pyx_n_s_path); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_tuple__34 = PyTuple_Pack(12, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_bidirectional, __pyx_n_s_connectivity, __pyx_n_s_compass, __pyx_n_s_compass_norm, __pyx_n_s_dims, __pyx_n_s_cols, __pyx_n_s_rows, __pyx_n_s_depth, __pyx_n_s_path); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(7, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_dijkstra, 83, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(7, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_dijkstra, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 85, __pyx_L1_error) - /* "dijkstra3d.pyx":164 + /* "dijkstra3d.pyx":166 * return _path_to_point_cloud(path, dims, rows, cols) * * def distance_field(data, source): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_dims, __pyx_n_s_field); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_dims, __pyx_n_s_field); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_distance_field, 164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_distance_field, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 166, __pyx_L1_error) - /* "dijkstra3d.pyx":211 + /* "dijkstra3d.pyx":213 * return field * * def path_from_parents(parents, target): # <<<<<<<<<<<<<< * cdef size_t sx = parents.shape[0] * cdef size_t sy = parents.shape[1] */ - __pyx_tuple__38 = PyTuple_Pack(16, __pyx_n_s_parents, __pyx_n_s_target, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_targ, __pyx_n_s_arr_memview32, __pyx_n_s_path32, __pyx_n_s_path_ptr32, __pyx_n_s_vec_view32, __pyx_n_s_arr_memview64, __pyx_n_s_path64, __pyx_n_s_path_ptr64, __pyx_n_s_vec_view64, __pyx_n_s_buf, __pyx_n_s_numpy_path); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(16, __pyx_n_s_parents, __pyx_n_s_target, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_targ, __pyx_n_s_arr_memview32, __pyx_n_s_path32, __pyx_n_s_path_ptr32, __pyx_n_s_vec_view32, __pyx_n_s_arr_memview64, __pyx_n_s_path64, __pyx_n_s_path_ptr64, __pyx_n_s_vec_view64, __pyx_n_s_buf, __pyx_n_s_numpy_path); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_path_from_parents, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_path_from_parents, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 213, __pyx_L1_error) - /* "dijkstra3d.pyx":245 + /* "dijkstra3d.pyx":247 * return _path_to_point_cloud(numpy_path, 3, sy, sx) * * def parental_field(data, source, connectivity=26): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_tuple__40 = PyTuple_Pack(5, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_connectivity, __pyx_n_s_dims, __pyx_n_s_field); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_tuple__40 = PyTuple_Pack(5, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_connectivity, __pyx_n_s_dims, __pyx_n_s_field); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_parental_field, 245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_parental_field, 247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 247, __pyx_L1_error) - /* "dijkstra3d.pyx":304 + /* "dijkstra3d.pyx":306 * return field * - * def euclidean_distance_field(data, source, anisotropy=(1,1,1)): # <<<<<<<<<<<<<< + * def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_anisotropy, __pyx_n_s_dims, __pyx_n_s_field); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_tuple__42 = PyTuple_Pack(6, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_anisotropy, __pyx_n_s_free_space_radius, __pyx_n_s_dims, __pyx_n_s_field); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_euclidean_distance_field, 304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_euclidean_distance_field, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 306, __pyx_L1_error) - /* "dijkstra3d.pyx":352 + /* "dijkstra3d.pyx":358 * return field * * def _validate_coord(data, coord): # <<<<<<<<<<<<<< * dims = len(data.shape) * */ - __pyx_tuple__44 = PyTuple_Pack(5, __pyx_n_s_data, __pyx_n_s_coord, __pyx_n_s_dims, __pyx_n_s_i, __pyx_n_s_size); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_tuple__44 = PyTuple_Pack(5, __pyx_n_s_data, __pyx_n_s_coord, __pyx_n_s_dims, __pyx_n_s_i, __pyx_n_s_size); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_validate_coord, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_validate_coord, 358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 358, __pyx_L1_error) - /* "dijkstra3d.pyx":365 + /* "dijkstra3d.pyx":371 * raise IndexError("Selected voxel {} was not located inside the array.".format(coord)) * * def _path_to_point_cloud(path, dims, rows, cols): # <<<<<<<<<<<<<< * ptlist = np.zeros((path.shape[0], dims), dtype=np.uint32) * */ - __pyx_tuple__46 = PyTuple_Pack(8, __pyx_n_s_path, __pyx_n_s_dims, __pyx_n_s_rows, __pyx_n_s_cols, __pyx_n_s_ptlist, __pyx_n_s_sxy, __pyx_n_s_i, __pyx_n_s_pt); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_tuple__46 = PyTuple_Pack(8, __pyx_n_s_path, __pyx_n_s_dims, __pyx_n_s_rows, __pyx_n_s_cols, __pyx_n_s_ptlist, __pyx_n_s_sxy, __pyx_n_s_i, __pyx_n_s_pt); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_path_to_point_cloud, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_path_to_point_cloud, 371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 371, __pyx_L1_error) - /* "dijkstra3d.pyx":382 + /* "dijkstra3d.pyx":388 * return ptlist * * def _execute_dijkstra( # <<<<<<<<<<<<<< * data, source, target, int connectivity, * bidirectional, compass, float compass_norm=-1 */ - __pyx_tuple__48 = PyTuple_Pack(28, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_connectivity, __pyx_n_s_bidirectional, __pyx_n_s_compass, __pyx_n_s_compass_norm, __pyx_n_s_arr_memview8, __pyx_n_s_arr_memview16, __pyx_n_s_arr_memview32, __pyx_n_s_arr_memview64, __pyx_n_s_arr_memviewfloat, __pyx_n_s_arr_memviewdouble, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_src, __pyx_n_s_sink, __pyx_n_s_output32, __pyx_n_s_output64, __pyx_n_s_sixtyfourbit, __pyx_n_s_dtype, __pyx_n_s_output_ptr32, __pyx_n_s_output_ptr64, __pyx_n_s_vec_view32, __pyx_n_s_vec_view64, __pyx_n_s_buf, __pyx_n_s_output); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_tuple__48 = PyTuple_Pack(28, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_target, __pyx_n_s_connectivity, __pyx_n_s_bidirectional, __pyx_n_s_compass, __pyx_n_s_compass_norm, __pyx_n_s_arr_memview8, __pyx_n_s_arr_memview16, __pyx_n_s_arr_memview32, __pyx_n_s_arr_memview64, __pyx_n_s_arr_memviewfloat, __pyx_n_s_arr_memviewdouble, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_src, __pyx_n_s_sink, __pyx_n_s_output32, __pyx_n_s_output64, __pyx_n_s_sixtyfourbit, __pyx_n_s_dtype, __pyx_n_s_output_ptr32, __pyx_n_s_output_ptr64, __pyx_n_s_vec_view32, __pyx_n_s_vec_view64, __pyx_n_s_buf, __pyx_n_s_output); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(7, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_dijkstra, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(7, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_dijkstra, 388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 388, __pyx_L1_error) - /* "dijkstra3d.pyx":688 + /* "dijkstra3d.pyx":694 * return output[::-1] * * def _execute_distance_field(data, source): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * cdef uint16_t[:,:,:] arr_memview16 */ - __pyx_tuple__50 = PyTuple_Pack(17, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_arr_memview8, __pyx_n_s_arr_memview16, __pyx_n_s_arr_memview32, __pyx_n_s_arr_memview64, __pyx_n_s_arr_memviewfloat, __pyx_n_s_arr_memviewdouble, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_src, __pyx_n_s_dist, __pyx_n_s_dtype, __pyx_n_s_voxels, __pyx_n_s_dist_view, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(17, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_arr_memview8, __pyx_n_s_arr_memview16, __pyx_n_s_arr_memview32, __pyx_n_s_arr_memview64, __pyx_n_s_arr_memviewfloat, __pyx_n_s_arr_memviewdouble, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_src, __pyx_n_s_dist, __pyx_n_s_dtype, __pyx_n_s_voxels, __pyx_n_s_dist_view, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_distance_field, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_distance_field, 694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 694, __pyx_L1_error) - /* "dijkstra3d.pyx":761 + /* "dijkstra3d.pyx":767 * return np.frombuffer(buf, dtype=np.float32).reshape(data.shape, order='F') * * def _execute_parental_field(data, source, connectivity): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * cdef uint16_t[:,:,:] arr_memview16 */ - __pyx_tuple__52 = PyTuple_Pack(17, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_connectivity, __pyx_n_s_arr_memview8, __pyx_n_s_arr_memview16, __pyx_n_s_arr_memview32, __pyx_n_s_arr_memview64, __pyx_n_s_arr_memviewfloat, __pyx_n_s_arr_memviewdouble, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_src, __pyx_n_s_sixtyfourbit, __pyx_n_s_parents32, __pyx_n_s_parents64, __pyx_n_s_dtype); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(17, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_connectivity, __pyx_n_s_arr_memview8, __pyx_n_s_arr_memview16, __pyx_n_s_arr_memview32, __pyx_n_s_arr_memview64, __pyx_n_s_arr_memviewfloat, __pyx_n_s_arr_memviewdouble, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_src, __pyx_n_s_sixtyfourbit, __pyx_n_s_parents32, __pyx_n_s_parents64, __pyx_n_s_dtype); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_parental_field, 761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_parental_field, 767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 767, __pyx_L1_error) - /* "dijkstra3d.pyx":891 + /* "dijkstra3d.pyx":897 * return parents32 * - * def _execute_euclidean_distance_field(data, source, anisotropy): # <<<<<<<<<<<<<< + * def _execute_euclidean_distance_field(data, source, anisotropy, float free_space_radius = 0): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * */ - __pyx_tuple__54 = PyTuple_Pack(13, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_anisotropy, __pyx_n_s_arr_memview8, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_wx, __pyx_n_s_wy, __pyx_n_s_wz, __pyx_n_s_src, __pyx_n_s_dist, __pyx_n_s_dtype); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_tuple__54 = PyTuple_Pack(14, __pyx_n_s_data, __pyx_n_s_source, __pyx_n_s_anisotropy, __pyx_n_s_free_space_radius, __pyx_n_s_arr_memview8, __pyx_n_s_sx, __pyx_n_s_sy, __pyx_n_s_sz, __pyx_n_s_wx, __pyx_n_s_wy, __pyx_n_s_wz, __pyx_n_s_src, __pyx_n_s_dist, __pyx_n_s_dtype); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_euclidean_distance_fiel, 891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_dijkstra3d_pyx, __pyx_n_s_execute_euclidean_distance_fiel, 897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 897, __pyx_L1_error) /* "View.MemoryView":286 * return self.name @@ -32456,6 +32623,9 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_vtabptr_array = &__pyx_vtable_array; @@ -32519,6 +32689,9 @@ static int __Pyx_modinit_type_init_code(void) { static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) @@ -32558,7 +32731,7 @@ static int __Pyx_modinit_type_import_code(void) { __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -32585,17 +32758,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -32681,6 +32856,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_dijkstra3d(PyObject *__pyx_pyinit_ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; static PyThread_type_lock __pyx_t_5[8]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -32769,15 +32947,15 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ @@ -32854,136 +33032,136 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":83 + /* "dijkstra3d.pyx":85 * ) * * def dijkstra( # <<<<<<<<<<<<<< * data, source, target, * bidirectional=False, connectivity=26, */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_1dijkstra, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_1dijkstra, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dijkstra, __pyx_t_1) < 0) __PYX_ERR(0, 83, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dijkstra, __pyx_t_1) < 0) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":164 + /* "dijkstra3d.pyx":166 * return _path_to_point_cloud(path, dims, rows, cols) * * def distance_field(data, source): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_3distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_3distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_distance_field, __pyx_t_1) < 0) __PYX_ERR(0, 164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_distance_field, __pyx_t_1) < 0) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":211 + /* "dijkstra3d.pyx":213 * return field * * def path_from_parents(parents, target): # <<<<<<<<<<<<<< * cdef size_t sx = parents.shape[0] * cdef size_t sy = parents.shape[1] */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_5path_from_parents, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_5path_from_parents, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_path_from_parents, __pyx_t_1) < 0) __PYX_ERR(0, 211, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_path_from_parents, __pyx_t_1) < 0) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":245 + /* "dijkstra3d.pyx":247 * return _path_to_point_cloud(numpy_path, 3, sy, sx) * * def parental_field(data, source, connectivity=26): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_7parental_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_7parental_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parental_field, __pyx_t_1) < 0) __PYX_ERR(0, 245, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parental_field, __pyx_t_1) < 0) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":304 + /* "dijkstra3d.pyx":306 * return field * - * def euclidean_distance_field(data, source, anisotropy=(1,1,1)): # <<<<<<<<<<<<<< + * def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): # <<<<<<<<<<<<<< * """ * Use dijkstra's shortest path algorithm */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_9euclidean_distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_9euclidean_distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_euclidean_distance_field, __pyx_t_1) < 0) __PYX_ERR(0, 304, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_euclidean_distance_field, __pyx_t_1) < 0) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":352 + /* "dijkstra3d.pyx":358 * return field * * def _validate_coord(data, coord): # <<<<<<<<<<<<<< * dims = len(data.shape) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_11_validate_coord, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_11_validate_coord, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_validate_coord, __pyx_t_1) < 0) __PYX_ERR(0, 352, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_validate_coord, __pyx_t_1) < 0) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":365 + /* "dijkstra3d.pyx":371 * raise IndexError("Selected voxel {} was not located inside the array.".format(coord)) * * def _path_to_point_cloud(path, dims, rows, cols): # <<<<<<<<<<<<<< * ptlist = np.zeros((path.shape[0], dims), dtype=np.uint32) * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_13_path_to_point_cloud, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_13_path_to_point_cloud, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_path_to_point_cloud, __pyx_t_1) < 0) __PYX_ERR(0, 365, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_path_to_point_cloud, __pyx_t_1) < 0) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":382 + /* "dijkstra3d.pyx":388 * return ptlist * * def _execute_dijkstra( # <<<<<<<<<<<<<< * data, source, target, int connectivity, * bidirectional, compass, float compass_norm=-1 */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_15_execute_dijkstra, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_15_execute_dijkstra, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_dijkstra, __pyx_t_1) < 0) __PYX_ERR(0, 382, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_dijkstra, __pyx_t_1) < 0) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":688 + /* "dijkstra3d.pyx":694 * return output[::-1] * * def _execute_distance_field(data, source): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * cdef uint16_t[:,:,:] arr_memview16 */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_17_execute_distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_17_execute_distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_distance_field, __pyx_t_1) < 0) __PYX_ERR(0, 688, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_distance_field, __pyx_t_1) < 0) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":761 + /* "dijkstra3d.pyx":767 * return np.frombuffer(buf, dtype=np.float32).reshape(data.shape, order='F') * * def _execute_parental_field(data, source, connectivity): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * cdef uint16_t[:,:,:] arr_memview16 */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_19_execute_parental_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_19_execute_parental_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_parental_field, __pyx_t_1) < 0) __PYX_ERR(0, 761, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_parental_field, __pyx_t_1) < 0) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "dijkstra3d.pyx":891 + /* "dijkstra3d.pyx":897 * return parents32 * - * def _execute_euclidean_distance_field(data, source, anisotropy): # <<<<<<<<<<<<<< + * def _execute_euclidean_distance_field(data, source, anisotropy, float free_space_radius = 0): # <<<<<<<<<<<<<< * cdef uint8_t[:,:,:] arr_memview8 * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_21_execute_euclidean_distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10dijkstra3d_21_execute_euclidean_distance_field, NULL, __pyx_n_s_dijkstra3d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_euclidean_distance_fiel, __pyx_t_1) < 0) __PYX_ERR(0, 891, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_execute_euclidean_distance_fiel, __pyx_t_1) < 0) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "dijkstra3d.pyx":1 @@ -33284,7 +33462,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -33311,7 +33489,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -33327,7 +33505,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -34126,7 +34304,7 @@ __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, int i, retval=-1; Py_buffer *buf = &memview->view; __Pyx_RefNannySetupContext("init_memviewslice", 0); - if (memviewslice->memview || memviewslice->data) { + if (unlikely(memviewslice->memview || memviewslice->data)) { PyErr_SetString(PyExc_ValueError, "memviewslice is already initialized!"); goto fail; @@ -34205,13 +34383,13 @@ __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) { int first_time; struct __pyx_memoryview_obj *memview = memslice->memview; - if (!memview || (PyObject *) memview == Py_None) + if (unlikely(!memview || (PyObject *) memview == Py_None)) return; - if (__pyx_get_slice_count(memview) < 0) + if (unlikely(__pyx_get_slice_count(memview) < 0)) __pyx_fatalerror("Acquisition count is %d (line %d)", __pyx_get_slice_count(memview), lineno); first_time = __pyx_add_acquisition_count(memview) == 0; - if (first_time) { + if (unlikely(first_time)) { if (have_gil) { Py_INCREF((PyObject *) memview); } else { @@ -34225,18 +34403,16 @@ static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno) { int last_time; struct __pyx_memoryview_obj *memview = memslice->memview; - if (!memview ) { - return; - } else if ((PyObject *) memview == Py_None) { + if (unlikely(!memview || (PyObject *) memview == Py_None)) { memslice->memview = NULL; return; } - if (__pyx_get_slice_count(memview) <= 0) + if (unlikely(__pyx_get_slice_count(memview) <= 0)) __pyx_fatalerror("Acquisition count is %d (line %d)", __pyx_get_slice_count(memview), lineno); last_time = __pyx_sub_acquisition_count(memview) == 1; memslice->data = NULL; - if (last_time) { + if (unlikely(last_time)) { if (have_gil) { Py_CLEAR(memslice->memview); } else { @@ -34724,9 +34900,7 @@ static PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; - int i = 0, number; - int ndim = ctx->head->field->type->ndim; -; + int i = 0, number, ndim; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, @@ -34734,6 +34908,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ndim = ctx->head->field->type->ndim; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; @@ -34863,8 +35038,8 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': - if (ctx->enc_type == *ts && got_Z == ctx->is_complex && - ctx->enc_packmode == ctx->new_packmode) { + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; @@ -35363,9 +35538,9 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) if (stop < 0) stop += length; } + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; - if (unlikely(length <= 0)) - return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); @@ -35454,7 +35629,7 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -35709,6 +35884,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam return -1; } +/* PyObjectGetAttrStrNoError */ + static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -35754,15 +35951,23 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto __PYX_BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto __PYX_BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } @@ -35954,7 +36159,7 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -36058,7 +36263,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } @@ -36795,7 +37000,7 @@ __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, struct __pyx_memoryview_obj *memview_obj = NULL; __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); for (i = 0; i < ndim; i++) { - if (from_mvs->suboffsets[i] >= 0) { + if (unlikely(from_mvs->suboffsets[i] >= 0)) { PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " "indirect dimensions (axis %d)", i); goto fail; @@ -38072,13 +38277,13 @@ __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) if (buf->strides) { if (spec & __Pyx_MEMVIEW_CONTIG) { if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { - if (buf->strides[dim] != sizeof(void *)) { + if (unlikely(buf->strides[dim] != sizeof(void *))) { PyErr_Format(PyExc_ValueError, "Buffer is not indirectly contiguous " "in dimension %d.", dim); goto fail; } - } else if (buf->strides[dim] != buf->itemsize) { + } else if (unlikely(buf->strides[dim] != buf->itemsize)) { PyErr_SetString(PyExc_ValueError, "Buffer and memoryview are not contiguous " "in the same dimension."); @@ -38089,7 +38294,7 @@ __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) Py_ssize_t stride = buf->strides[dim]; if (stride < 0) stride = -stride; - if (stride < buf->itemsize) { + if (unlikely(stride < buf->itemsize)) { PyErr_SetString(PyExc_ValueError, "Buffer and memoryview are not contiguous " "in the same dimension."); @@ -38097,17 +38302,17 @@ __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) } } } else { - if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) { + if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { PyErr_Format(PyExc_ValueError, "C-contiguous buffer is not contiguous in " "dimension %d", dim); goto fail; - } else if (spec & (__Pyx_MEMVIEW_PTR)) { + } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { PyErr_Format(PyExc_ValueError, "C-contiguous buffer is not indirect in " "dimension %d", dim); goto fail; - } else if (buf->suboffsets) { + } else if (unlikely(buf->suboffsets)) { PyErr_SetString(PyExc_ValueError, "Buffer exposes suboffsets but no strides"); goto fail; @@ -38121,7 +38326,7 @@ static int __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) { if (spec & __Pyx_MEMVIEW_DIRECT) { - if (buf->suboffsets && buf->suboffsets[dim] >= 0) { + if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { PyErr_Format(PyExc_ValueError, "Buffer not compatible with direct access " "in dimension %d.", dim); @@ -38129,7 +38334,7 @@ __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec } } if (spec & __Pyx_MEMVIEW_PTR) { - if (!buf->suboffsets || (buf->suboffsets[dim] < 0)) { + if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { PyErr_Format(PyExc_ValueError, "Buffer is not indirectly accessible " "in dimension %d.", dim); @@ -38147,9 +38352,7 @@ __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) if (c_or_f_flag & __Pyx_IS_F_CONTIG) { Py_ssize_t stride = 1; for (i = 0; i < ndim; i++) { - if (stride * buf->itemsize != buf->strides[i] && - buf->shape[i] > 1) - { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { PyErr_SetString(PyExc_ValueError, "Buffer not fortran contiguous."); goto fail; @@ -38159,8 +38362,7 @@ __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { Py_ssize_t stride = 1; for (i = ndim - 1; i >- 1; i--) { - if (stride * buf->itemsize != buf->strides[i] && - buf->shape[i] > 1) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { PyErr_SetString(PyExc_ValueError, "Buffer not C contiguous."); goto fail; @@ -38201,7 +38403,7 @@ static int __Pyx_ValidateAndInit_memviewslice( goto fail; } buf = &memview->view; - if (buf->ndim != ndim) { + if (unlikely(buf->ndim != ndim)) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", ndim, buf->ndim); @@ -38209,9 +38411,9 @@ static int __Pyx_ValidateAndInit_memviewslice( } if (new_memview) { __Pyx_BufFmt_Init(&ctx, stack, dtype); - if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; } - if ((unsigned) buf->itemsize != dtype->size) { + if (unlikely((unsigned) buf->itemsize != dtype->size)) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", @@ -38222,15 +38424,17 @@ static int __Pyx_ValidateAndInit_memviewslice( (dtype->size > 1) ? "s" : ""); goto fail; } - for (i = 0; i < ndim; i++) { - spec = axes_specs[i]; - if (!__pyx_check_strides(buf, i, ndim, spec)) - goto fail; - if (!__pyx_check_suboffsets(buf, i, ndim, spec)) + if (buf->len > 0) { + for (i = 0; i < ndim; i++) { + spec = axes_specs[i]; + if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) + goto fail; + if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) + goto fail; + } + if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) goto fail; } - if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)) - goto fail; if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, new_memview != NULL) == -1)) { goto fail; diff --git a/dijkstra3d.hpp b/dijkstra3d.hpp index 5b4e8c9..950a8c2 100644 --- a/dijkstra3d.hpp +++ b/dijkstra3d.hpp @@ -30,6 +30,8 @@ namespace dijkstra { +#define sq(x) ((x) * (x)) + inline float* fill(float *arr, const float value, const size_t size) { for (size_t i = 0; i < size; i++) { arr[i] = value; @@ -767,6 +769,118 @@ float* distance_field3d( return dist; } +/* For the euclidean distance field calculation, it is + 1-2 orders of magnitude faster to compute the distance field + using an equation instead of dijkstra's method, but the eqn + only works in free space (straight line of sight from the source). + + Therefore, when we have outside information that some distance + around the source point is free space, we can use a hybrid approach + and use the equation to label the "safe" region and use dijkstra + for the rest. It may be possible to extend the use of the equation + with further development of this hybrid approach. + + Here's an unoptimized version of the equation that works for + <1,1,1> isotropic volumes only, but is easier to understand. + The equation in actual use below is adapted for anisotropic + volumes. + + It works by starting with the manhattan distance between the + source and the target point and then subtracts 3D diagonals, + then 2D diagonals and adds their contribution back in. This works + on the principle that the shortest distance between the source and + target requires that the maximum number of corner directions be + taken. Note that this equation sees distance the way the dijkstra + approach would, it is quite different from a simple euclidean distance. + + float corners = std::min(std::min(dx, dy), dz); + float edge_xy = std::min(dx, dy) - corners; + float edge_yz = std::min(dy, dz) - corners; + float edge_xz = std::min(dx, dz) - corners; + float edges = edge_xy + edge_yz + edge_xz; + + float faces = (dx + dy + dz) - 2 * edges - 3 * corners; + + dist[loc] = corners * sqrt(3) + edges * sqrt(2) + faces; + + In order to integrate with the following dijkstra method, the + fringe of the free space is pushed onto the dijkstra priority + queue. The non-fringe free-space is negated (x -1) in order to + mark it as visited. Dijkstra will then find the minimum of the + fringe and proceed normally. + + For reference, in a 512^3, dijkstra's method appears to work at + about 1 MVx/sec while this method is about 85 MVx/sec on the same + hardware. Tests of a simpler version of the equation (no radius testing, + less support for anisotropy) were working at 210 MVx/sec so some room + for optimization is likely. + + In a field test in Kimimaro on a cell body starting from the point of + maximum distance from the boundary, the timing improved from 20 sec to + 10 sec, so a 2x overall performance increase for a single use of the + free space eqn. + */ +float* edf_free_space( + uint8_t* field, float* dist, + std::priority_queue, std::vector>, HeapNodeCompare> &queue, + const int64_t source, const float safe_radius, + const int64_t sx, const int64_t sy, const int64_t sz, + const float wx, const float wy, const float wz + ) { + + const int64_t sxy = sx * sy; + + int64_t src_z = source / sxy; + int64_t src_y = (source - (src_z * sxy)) / sx; + int64_t src_x = source - sx * (src_y + src_z * sy); + + int64_t loc = 0; + float radius = 0; + float corner_increment = std::sqrt(sq(wx) + sq(wy) + sq(wz)); + + for (int64_t z = 0; z < sz; z++) { + for (int64_t y = 0; y < sy; y++) { + for (int64_t x = 0; x < sx; x++) { + loc = x + sx * (y + sy * z); + + if (field[loc] == 0) { + continue; + } + + radius = std::sqrt(sq(wx * (x - src_x)) + sq(wy * (y - src_y)) + sq(wz * (z - src_z))); + if (radius > safe_radius) { + continue; + } + + float dx = std::abs(static_cast(x - src_x)); + float dy = std::abs(static_cast(y - src_y)); + float dz = std::abs(static_cast(z - src_z)); + + float dxyz = std::min(std::min(dx, dy), dz); + float dxy = std::min(dx, dy); + float dyz = std::min(dy, dz); + float dxz = std::min(dx, dz); + + dist[loc] = (dxyz * std::sqrt(wx * wx + wy * wy + wz * wz) + + wx * (dx - dxyz) + wy * (dy - dxyz) + wz * (dz - dxyz) + + (dxy - dxyz) * (std::sqrt(wx * wx + wy * wy) - wx - wy) + + (dxz - dxyz) * (std::sqrt(wx * wx + wz * wz) - wx - wz) + + (dyz - dxyz) * (std::sqrt(wy * wy + wz * wz) - wy - wz) + ); + + if (radius + corner_increment > safe_radius) { + queue.emplace(dist[loc], loc); + } + else { + dist[loc] *= -1; + } + } + } + } + + return dist; +} + // helper function to compute 2D anisotropy ("_s" = "square") inline float _s(const float wa, const float wb) { return std::sqrt(wa * wa + wb * wb); @@ -781,7 +895,9 @@ float* euclidean_distance_field3d( uint8_t* field, // really a boolean field const size_t sx, const size_t sy, const size_t sz, const float wx, const float wy, const float wz, - const size_t source, float* dist = NULL + const size_t source, + const float free_space_radius = 0, + float* dist = NULL ) { const size_t voxels = sx * sy * sz; @@ -819,6 +935,15 @@ float* euclidean_distance_field3d( std::priority_queue, std::vector>, HeapNodeCompare> queue; queue.emplace(0.0, source); + if (free_space_radius > 0) { + edf_free_space( + field, dist, queue, + source, free_space_radius, + sx, sy, sz, + wx, wy, wz + ); + } + size_t loc; float new_dist; size_t neighboridx; @@ -877,8 +1002,6 @@ float* euclidean_distance_field3d( return dist; } - - }; // namespace dijkstra3d #endif \ No newline at end of file diff --git a/dijkstra3d.pyx b/dijkstra3d.pyx index f23499e..77aa2cc 100644 --- a/dijkstra3d.pyx +++ b/dijkstra3d.pyx @@ -74,7 +74,9 @@ cdef extern from "dijkstra3d.hpp" namespace "dijkstra": uint8_t* field, size_t sx, size_t sy, size_t sz, float wx, float wy, float wz, - size_t source, float* dist + size_t source, + float free_space_radius, + float* dist ) cdef vector[T] query_shortest_path[T]( T* parents, T target @@ -301,7 +303,7 @@ def parental_field(data, source, connectivity=26): return field -def euclidean_distance_field(data, source, anisotropy=(1,1,1)): +def euclidean_distance_field(data, source, anisotropy=(1,1,1), free_space_radius=0): """ Use dijkstra's shortest path algorithm on a 3D image grid to generate a weighted @@ -320,6 +322,10 @@ def euclidean_distance_field(data, source, anisotropy=(1,1,1)): data: Input weights in a 2D or 3D numpy array. source: (x,y,z) coordinate of starting voxel anisotropy: (wx,wy,wz) weights for each axial direction. + free_space_radius: (float, optional) if you know that the + region surrounding the source is free space, we can use + a much faster algorithm to fill in that volume. Value + is physical radius (can get this from the EDT). Returns: 2D or 3D numpy array with each index containing its distance from the source voxel. @@ -341,7 +347,7 @@ def euclidean_distance_field(data, source, anisotropy=(1,1,1)): data = np.asfortranarray(data) - field = _execute_euclidean_distance_field(data, source, anisotropy) + field = _execute_euclidean_distance_field(data, source, anisotropy, free_space_radius) if dims < 3: field = np.squeeze(field, axis=2) if dims < 2: @@ -888,7 +894,7 @@ def _execute_parental_field(data, source, connectivity): else: return parents32 -def _execute_euclidean_distance_field(data, source, anisotropy): +def _execute_euclidean_distance_field(data, source, anisotropy, float free_space_radius = 0): cdef uint8_t[:,:,:] arr_memview8 cdef size_t sx = data.shape[0] @@ -911,7 +917,8 @@ def _execute_euclidean_distance_field(data, source, anisotropy): &arr_memview8[0,0,0], sx, sy, sz, wx, wy, wz, - src, &dist[0,0,0] + src, free_space_radius, + &dist[0,0,0] ) else: raise TypeError("Type {} not currently supported.".format(dtype))