Skip to content

Commit 5f3ea08

Browse files
authored
Merge pull request #1261 from pywugate/main
fix Overflow error in saving flows in io.save_masks
2 parents 9e5cc9c + 4b4ffd7 commit 5f3ea08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cellpose/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ def save_masks(images, masks, flows, file_names, png=True, tif=False, channels=[
811811
if masks.ndim < 3 and save_flows:
812812
check_dir(flowdir)
813813
imsave(os.path.join(flowdir, basename + "_flows" + suffix + ".tif"),
814-
(flows[0] * (2**16 - 1)).astype(np.uint16))
814+
flows[0]
815+
)
815816
#save full flow data
816817
imsave(os.path.join(flowdir, basename + '_dP' + suffix + '.tif'), flows[1])

0 commit comments

Comments
 (0)