Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions waveorder/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Tuple

import click
import dask.array as da
import numpy as np
import torch
from iohub.ngff import Position, open_ome_zarr
Expand Down Expand Up @@ -128,6 +129,7 @@ def apply_inverse_to_zyx_and_save(
f"All values at t={t_idx} are zero or Nan, skipping reconstruction."
)
return
czyx_uint16_numpy = da.nan_to_num(czyx_uint16_numpy).compute()

# convert to np.int32 (torch doesn't accept np.uint16), then convert to tensor float32
czyx_data = torch.tensor(np.int32(czyx_uint16_numpy), dtype=torch.float32)
Expand Down
Loading