Skip to content

Commit

Permalink
Autoformat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
brainless-bot[bot] committed Oct 9, 2024
1 parent 0087236 commit e230f5f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
28 changes: 24 additions & 4 deletions unit_tests/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ def setUp(self) -> None:
def test_rvd_case_simple_identical(self):

pred_arr, ref_arr = case_simple_identical()
rvd = Metric.RVD(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1)
rvd = Metric.RVD(
reference_arr=ref_arr,
prediction_arr=pred_arr,
ref_instance_idx=1,
pred_instance_idx=1,
)
self.assertEqual(rvd, 0.0)

def test_rvd_case_simple_identical_idx(self):
Expand Down Expand Up @@ -139,7 +144,12 @@ def test_dsc_case_simple_identical(self):
def test_dsc_case_simple_identical_idx(self):

pred_arr, ref_arr = case_simple_identical()
dsc = Metric.DSC(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1)
dsc = Metric.DSC(
reference_arr=ref_arr,
prediction_arr=pred_arr,
ref_instance_idx=1,
pred_instance_idx=1,
)
self.assertEqual(dsc, 1.0)

def test_dsc_case_simple_nooverlap(self):
Expand Down Expand Up @@ -173,7 +183,12 @@ def test_st_case_simple_identical(self):

def test_st_case_simple_identical_idx(self):
pred_arr, ref_arr = case_simple_identical()
st = Metric.ASSD(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1)
st = Metric.ASSD(
reference_arr=ref_arr,
prediction_arr=pred_arr,
ref_instance_idx=1,
pred_instance_idx=1,
)
self.assertEqual(st, 0.0)

def test_st_case_simple_nooverlap(self):
Expand Down Expand Up @@ -204,7 +219,12 @@ def test_st_case_simple_identical(self):

def test_st_case_simple_identical_idx(self):
pred_arr, ref_arr = case_simple_identical()
st = Metric.clDSC(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1)
st = Metric.clDSC(
reference_arr=ref_arr,
prediction_arr=pred_arr,
ref_instance_idx=1,
pred_instance_idx=1,
)
self.assertEqual(st, 1.0)

def test_st_case_simple_nooverlap(self):
Expand Down
6 changes: 5 additions & 1 deletion unit_tests/test_panoptic_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

from panoptica import InputType
from panoptica.instance_approximator import ConnectedComponentsInstanceApproximator
from panoptica.instance_matcher import MaximizeMergeMatching, NaiveThresholdMatching, InstanceLabelMap
from panoptica.instance_matcher import (
MaximizeMergeMatching,
NaiveThresholdMatching,
InstanceLabelMap,
)
from panoptica.metrics import Metric
from panoptica.instance_evaluator import (
evaluate_matched_instance,
Expand Down
6 changes: 5 additions & 1 deletion unit_tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import os
import unittest
import numpy as np
from panoptica.utils.numpy_utils import _unique_without_zeros, _count_unique_without_zeros, _get_smallest_fitting_uint
from panoptica.utils.numpy_utils import (
_unique_without_zeros,
_count_unique_without_zeros,
_get_smallest_fitting_uint,
)
from panoptica.utils.citation_reminder import citation_reminder


Expand Down

0 comments on commit e230f5f

Please sign in to comment.