Skip to content

Commit dde2c60

Browse files
authored
Use ascii instead of unicode and remove uncessary index
Signed-off-by: Bruce Hashemian <[email protected]>
1 parent 246282d commit dde2c60

File tree

1 file changed

+3
-3
lines changed
  • monai/apps/pathology/transforms/stain

1 file changed

+3
-3
lines changed

monai/apps/pathology/transforms/stain/array.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ def _deconvolution_extract_stain(self, image: np.ndarray) -> np.ndarray:
8787
# a heuristic to make the vector corresponding to hematoxylin first and the one corresponding to eosin second
8888
# Hematoxylin: high blue, lower red (low R/B ratio)
8989
# Eosin: high red, lower blue (high R/B ratio)
90-
ε = np.finfo(np.float32).eps
91-
v_min_rb_ratio = v_min[0, 0] / (v_min[2, 0] + ε)
92-
v_max_rb_ratio = v_max[0, 0] / (v_max[2, 0] + ε)
90+
eps = np.finfo(np.float32).eps
91+
v_min_rb_ratio = v_min[0] / (v_min[2] + eps)
92+
v_max_rb_ratio = v_max[0] / (v_max[2] + eps)
9393
if v_min_rb_ratio < v_max_rb_ratio:
9494
he = np.array((v_min[:, 0], v_max[:, 0]), dtype=np.float32).T
9595
else:

0 commit comments

Comments
 (0)