Skip to content

Commit

Permalink
removig force_method arg
Browse files Browse the repository at this point in the history
  • Loading branch information
jgostick committed Jun 5, 2024
1 parent faebe5e commit 6e254a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/porespy/tools/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6e254a4

Please sign in to comment.