Skip to content

Commit

Permalink
Modify
Browse files Browse the repository at this point in the history
Signed-off-by: Han123su <popsmall212@gmail.com>
  • Loading branch information
Han123su committed Sep 19, 2024
2 parents e79f178 + ec4bfa4 commit 8da0a4e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/test_rand_weighted_crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ def get_data(ndim):
]
)
im = SEG1_2D
weight_map = np.zeros_like(im, dtype=np.int32)
weight_map = np.zeros_like(im, dtype=np.int32)
weight_map[0, 30, 20] = 3
weight_map[0, 45, 44] = 1
weight_map[0, 60, 50] = 2
TESTS.append(
[
"int w 2d",
dict(spatial_size=(10, 12), num_samples=3),
p(im),
q(weight_map),
(1, 10, 12),
[[60, 50], [30, 20], [45, 44]],
"int w 2d",
dict(spatial_size=(10, 12), num_samples=3),
p(im),
q(weight_map),
(1, 10, 12),
[[60, 50], [30, 20], [45, 44]],
]
)
im = SEG1_3D
Expand Down Expand Up @@ -165,18 +165,18 @@ def get_data(ndim):
]
)
im = SEG1_3D
weight_map = np.zeros_like(im, dtype=np.int32)
weight_map = np.zeros_like(im, dtype=np.int32)
weight_map[0, 6, 22, 19] = 4
weight_map[0, 8, 40, 31] = 2
weight_map[0, 13, 20, 24] = 3
TESTS.append(
[
"int w 3d",
dict(spatial_size=(8, 10, 12), num_samples=3),
p(im),
q(weight_map),
(1, 8, 10, 12),
[[13, 20, 24], [6, 22, 19], [8, 40, 31]],
"int w 3d",
dict(spatial_size=(8, 10, 12), num_samples=3),
p(im),
q(weight_map),
(1, 8, 10, 12),
[[13, 20, 24], [6, 22, 19], [8, 40, 31]],
]
)

Expand Down

0 comments on commit 8da0a4e

Please sign in to comment.