Skip to content

Commit

Permalink
Merge pull request #51 from MPI-Dortmund/fix-rounding-issue
Browse files Browse the repository at this point in the history
Fix crash when certain float types don't support rounding
  • Loading branch information
thorstenwagner authored Sep 26, 2023
2 parents dd95166 + 9944a94 commit 6dc1305
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/box_manager/io/tloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def to_napari(

for cidx, (data, kwargs, _) in enumerate(output_dfs):
metadata = kwargs["metadata"]
for idx in range(int(data[["x", "y", "z"]].max().max().round(0)) + 1):

for idx in range(int(round(data[["x", "y", "z"]].max().max(),0)) + 1):
idx_view_df = kwargs["features"].loc[data["x"].round(0) == idx, :]
metadata[idx] = {
"path": kwargs["metadata"]["original_path"],
Expand Down

0 comments on commit 6dc1305

Please sign in to comment.