mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-01 12:31:10 +08:00
Fix random seed for test stability.
This commit is contained in:
1 parent
1a909cbc79
commit
1fbed8a8d0
1 file changed
+6
-1
@@ -184,8 +184,13 @@ class TestLBP():
|
||||
|
||||
def test_var(self):
|
||||
# Test idea: mean of variance is estimate of overall variance.
|
||||
target_std = 0.3
|
||||
|
||||
# Fix random seed for test stability.
|
||||
np.random.seed(13141516)
|
||||
|
||||
# Create random image with known variance.
|
||||
image = np.random.random((500, 500))
|
||||
target_std = 0.3
|
||||
image = image / image.std() * target_std
|
||||
|
||||
# Use P=4 to avoid interpolation effects
|
||||
|
||||
Reference in new issue
Block a user