Skip to content

Commit 2035938

Browse files
committed
really update postprocessing
1 parent cb34a0b commit 2035938

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import numpy as np
22
import xarray as xr
3-
from bioimageio.core.resource_io.nodes import Postprocessing
4-
from bioimageio.core.prediction_pipeline._combined_processing import make_postprocessing
53

64

75
def test_binarize_postprocessing():
6+
from bioimageio.core.prediction_pipeline._processing import Binarize
7+
88
shape = (3, 32, 32)
99
axes = ("c", "y", "x")
1010
np_data = np.random.rand(*shape)
@@ -13,8 +13,6 @@ def test_binarize_postprocessing():
1313
threshold = 0.5
1414
exp = xr.DataArray(np_data > threshold, dims=axes)
1515

16-
for dtype in ("float32", "float64", "uint8", "uint16"):
17-
binarize = make_postprocessing(spec=[Postprocessing("binarize", kwargs={"threshold": threshold})], dtype=dtype)
18-
res = binarize(data)
19-
assert np.dtype(res.dtype) == np.dtype(dtype)
20-
xr.testing.assert_allclose(res, exp.astype(dtype))
16+
binarize = Binarize("data_name", threshold=threshold)
17+
res = binarize(data)
18+
xr.testing.assert_allclose(res, exp)

0 commit comments

Comments
 (0)