diff --git a/imops/src/_backprojection.pyx b/imops/src/_backprojection.pyx index 5e8f6163..ecb927fd 100644 --- a/imops/src/_backprojection.pyx +++ b/imops/src/_backprojection.pyx @@ -53,8 +53,8 @@ cdef FLOAT accumulate(FLOAT x, FLOAT y, const FLOAT* sinuses, const FLOAT* cosin @cython.boundscheck(False) @cython.wraparound(False) cpdef FLOAT[:, :, :] backprojection3d(const FLOAT[:, :, :] sinogram, const FLOAT[:] theta, FLOAT[:] xs, - const uint8[:, :] inside_circle, FLOAT fill_value, int image_size, int output_size, - Py_ssize_t num_threads): + const uint8[:, :] inside_circle, FLOAT fill_value, int image_size, + int output_size, Py_ssize_t num_threads): cdef FLOAT[:, :, :] result = np.zeros_like(sinogram, shape=(len(sinogram), output_size, output_size)) cdef Py_ssize_t slc, i, j, n_angles = len(theta), n_slices = len(sinogram) cdef FLOAT min_val = image_size // 2, right_lim = image_size - 1 diff --git a/imops/src/_measure.pyx b/imops/src/_measure.pyx index 66019383..e842be0b 100644 --- a/imops/src/_measure.pyx +++ b/imops/src/_measure.pyx @@ -33,7 +33,8 @@ cdef inline Py_ssize_t _find(LABEL num, const LABEL[:] nums) noexcept nogil: return -1 -def _labeled_center_of_mass(const double[:, :, :] nums, const LABEL[:, :, :] labels, const LABEL[:] index) -> np.ndarray: +def _labeled_center_of_mass(const double[:, :, :] nums, const LABEL[:, :, :] labels, + const LABEL[:] index) -> np.ndarray: cdef const double[:, :, ::1] contiguous_nums = np.ascontiguousarray(nums) cdef const LABEL[:, :, ::1] contiguous_labels = np.ascontiguousarray(labels) cdef const LABEL[:] contiguous_index = np.ascontiguousarray(index) diff --git a/tests/test_morphology.py b/tests/test_morphology.py index 9914908d..071f9a8b 100644 --- a/tests/test_morphology.py +++ b/tests/test_morphology.py @@ -14,9 +14,9 @@ from imops.backend import Backend, Scipy from imops.morphology import binary_closing, binary_dilation, binary_erosion, binary_opening, distance_transform_edt from imops.pad import restore_crop - from imops.utils import make_immutable + np.random.seed(1337) assert_eq = np.testing.assert_array_equal diff --git a/tests/test_radon.py b/tests/test_radon.py index 2c2c1a2f..9cb6d790 100644 --- a/tests/test_radon.py +++ b/tests/test_radon.py @@ -8,7 +8,7 @@ from imops.backend import Backend from imops.radon import inverse_radon, radon from imops.testing import fill_outside, sample_ct, sk_iradon, sk_radon -from imops.utils import make_immutable, make_mutable +from imops.utils import make_immutable np.random.seed(1337) diff --git a/tests/test_utils.py b/tests/test_utils.py index 0b782f46..45adfe6d 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -13,6 +13,7 @@ imops_num_threads, isin, make_immutable, + make_mutable, normalize_num_threads, set_num_threads, )