Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random.seed not always seeding in-place #557

Merged
merged 1 commit into from
Jan 11, 2020
Merged

Fix random.seed not always seeding in-place #557

merged 1 commit into from
Jan 11, 2020

Conversation

aleju
Copy link
Owner

@aleju aleju commented Jan 10, 2020

Fix imgaug.random.seed() not seeding the global RNG in-place
in numpy 1.17+. The (unfixed) function instead created a new
global RNG with the given seed. This set the seed of augmenters
created after the seed() call, but not of augmenters created
before the seed() call as they would continue to use the old
global RNG.

This is related to #555.

Fix `imgaug.random.seed()` not seeding the global `RNG` in-place
in numpy 1.17+. The (unfixed) function instead created a new
global `RNG` with the given seed. This set the seed of augmenters
created *after* the `seed()` call, but not of augmenters created
*before* the `seed()` call as they would continue to use the old
global RNG.
@codecov-io
Copy link

codecov-io commented Jan 10, 2020

Codecov Report

Merging #557 into master will increase coverage by 0.48%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #557      +/-   ##
==========================================
+ Coverage   95.95%   96.43%   +0.48%     
==========================================
  Files          38       38              
  Lines       13933    13933              
==========================================
+ Hits        13369    13436      +67     
+ Misses        564      497      -67

@aleju aleju merged commit 76e832c into master Jan 11, 2020
@aleju aleju deleted the fix_seed branch January 11, 2020 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants