From 6e254a414edf7afad408acb9ac409f23c4d8bec0 Mon Sep 17 00:00:00 2001 From: jgostick Date: Wed, 5 Jun 2024 19:20:59 -0400 Subject: [PATCH] removig force_method arg --- src/porespy/tools/_funcs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/porespy/tools/_funcs.py b/src/porespy/tools/_funcs.py index 89fd18464..d98d99748 100644 --- a/src/porespy/tools/_funcs.py +++ b/src/porespy/tools/_funcs.py @@ -1178,9 +1178,9 @@ def ps_round(r, ndim, smooth=True): other = np.ones([2*rad + 1 for i in range(ndim)], dtype=bool) other[tuple(rad for i in range(ndim))] = False if smooth: - ball = edt(other, force_method="cpu") < r**2 + ball = edt(other) < r**2 else: - ball = edt(other, force_method="cpu") <= r**2 + ball = edt(other) <= r**2 return ball @@ -1309,7 +1309,7 @@ def insert_sphere(im, c, r, v=True, overwrite=True): # Generate sphere template within image boundaries blank = np.ones_like(im[s], dtype=float) blank[tuple(c - bbox[0:im.ndim])] = 0.0 - sph = edt(blank, force_method="cpu") < r**2 + sph = edt(blank) < r**2 if overwrite: # Clear voxles under sphere to be zero temp = im[s] * sph > 0 im[s][temp] = 0 @@ -1380,7 +1380,7 @@ def insert_cylinder(im, xyz0, xyz1, r): else: xyz_line_in_template_coords = [xyz_line[i] - xyz_min[i] for i in range(3)] template[tuple(xyz_line_in_template_coords)] = 1 - template = edt(template == 0, force_method="cpu") <= r**2 + template = edt(template == 0) <= r**2 im[xyz_min[0]: xyz_max[0] + 1, xyz_min[1]: xyz_max[1] + 1,