Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
sk3619 committed Mar 22, 2022
2 parents 80050fb + f128e8f commit f2f3fb1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions taufactor/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ def surface_area(img, phases, periodic=False):
:return: the surface area in faces per unit volume
"""
shape = img.shape
int_not_in_img = np.unique(img).min() -1

dim = len(shape)
img = cp.asarray(img)
# finding an int that is not in the img for padding:
not_in_img = cp.asarray([-1], dtype=img.dtype)
while not_in_img in img:
not_in_img -= 1
int_not_in_img = not_in_img.item()


if periodic:
pad = [(int(not x),int(not x)) for x in periodic]
Expand Down

0 comments on commit f2f3fb1

Please sign in to comment.