Skip to content

Commit

Permalink
make test always predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
ismael-mendoza committed Feb 25, 2022
1 parent 05da1bb commit 3b68b17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_group_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ def get_group_sampling_draw_generator(batch_size=3):
pixel_scale = 0.2
shift = [0.8, -0.7]
catalog = CatsimCatalog.from_file(catalog_name)
rng1 = np.random.default_rng(0)
rng2 = np.random.default_rng(0)
sampling_function = GroupSamplingNumbered(
max_number, wld_catalog_name, stamp_size, pixel_scale, shift=shift
max_number, wld_catalog_name, stamp_size, pixel_scale, shift=shift, rng=rng1
)
draw_blend_generator = CatsimGenerator(
catalog, sampling_function, [survey], batch_size=batch_size
catalog, sampling_function, [survey], batch_size=batch_size, rng=rng2
)
return draw_blend_generator

Expand Down

0 comments on commit 3b68b17

Please sign in to comment.