mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-09 12:30:07 +08:00
Merge pull request #420 from ahojnnes/random-seed
TST: Set random seed value to ensure tests always pass.
This commit is contained in:
@@ -4,6 +4,9 @@ from numpy.testing import run_module_suite, assert_raises, assert_equal
|
||||
from skimage import filter, data, color, img_as_float
|
||||
|
||||
|
||||
np.random.seed(1234)
|
||||
|
||||
|
||||
lena = img_as_float(data.lena()[:256, :256])
|
||||
lena_gray = color.rgb2gray(lena)
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ from numpy.testing import assert_equal, assert_raises
|
||||
from skimage.measure import structural_similarity as ssim
|
||||
|
||||
|
||||
np.random.seed(1234)
|
||||
|
||||
|
||||
def test_ssim_patch_range():
|
||||
N = 51
|
||||
X = (np.random.random((N, N)) * 255).astype(np.uint8)
|
||||
|
||||
Reference in New Issue
Block a user