Skip to content

Commit e678ca3

Browse files
author
Lee Newberg
committed
ENH: Return level as type int if it is very close to an integer
1 parent 7a4a173 commit e678ca3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

histomics_stream/configure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ def __call__(self, slide):
322322
"in Zarr storage."
323323
)
324324

325-
slide["level"] = level
325+
int_level = int(round(level))
326+
slide["level"] = int_level if abs(level - int_level) < 1e-4 else level
326327
# Note that slide size is defined by the requested magnification, which may not
327328
# be the same as the magnification for the selected level. To get the slide
328329
# size for the magnification that we are using, these values must later be

0 commit comments

Comments
 (0)