Skip to content

Commit

Permalink
style(pre-commit.ci): auto fixes [...]
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jun 12, 2024
1 parent 56412e7 commit 519c1df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/careamics/careamist.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,6 @@ def predict(
# record datamodule
self.pred_datamodule = datamodule


elif isinstance(source, np.ndarray):
# create datamodule
datamodule = CAREamicsPredictData(
Expand All @@ -635,7 +634,6 @@ def predict(
# record datamodule
self.pred_datamodule = datamodule


else:
raise ValueError(
f"Invalid input. Expected a CAREamicsWood instance, paths or "
Expand All @@ -653,8 +651,8 @@ def predict(
if is_tiled:
# "de-collate"
tile_infos = [
tile_info
for _, tile_info_list in predictions
tile_info
for _, tile_info_list in predictions
for tile_info in tile_info_list
]
predictions = torch.concatenate([preds for preds, _ in predictions])
Expand All @@ -671,8 +669,6 @@ def predict(
else:
return predictions



def _create_data_for_bmz(
self,
input_array: Optional[np.ndarray] = None,
Expand Down
2 changes: 1 addition & 1 deletion src/careamics/dataset/tiling/stitch_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def stitch_prediction(
Parameters
----------
tiles : list of numpy.ndarray
Cropped tiles and their respective stitching coordinates. Can contain tiles
Cropped tiles and their respective stitching coordinates. Can contain tiles
from multiple images.
tile_infos : list of TileInformation
List of information and coordinates obtained from
Expand Down
6 changes: 5 additions & 1 deletion tests/dataset/prediction/test_stitch_prediction.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import numpy as np
import pytest

from careamics.dataset.tiling import extract_tiles, stitch_prediction_single, stitch_prediction
from careamics.dataset.tiling import (
extract_tiles,
stitch_prediction,
stitch_prediction_single,
)


@pytest.mark.parametrize(
Expand Down

0 comments on commit 519c1df

Please sign in to comment.