mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-12 12:50:49 +08:00
Move away from random.random in favor of random.rand
This commit is contained in:
@@ -4,14 +4,14 @@ from numpy.testing import assert_equal
|
||||
from skimage.transform import integral_image, integrate
|
||||
|
||||
np.random.seed(0)
|
||||
x = (np.random.random((50, 50)) * 255).astype(np.uint8)
|
||||
x = (np.random.rand(50, 50) * 255).astype(np.uint8)
|
||||
s = integral_image(x)
|
||||
|
||||
|
||||
def test_validity():
|
||||
y = np.arange(12).reshape((4, 3))
|
||||
|
||||
y = (np.random.random((50, 50)) * 255).astype(np.uint8)
|
||||
y = (np.random.rand(50, 50) * 255).astype(np.uint8)
|
||||
assert_equal(integral_image(y)[-1, -1],
|
||||
y.sum())
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ def test_inverse():
|
||||
|
||||
|
||||
def test_slow_warp_nonint_oshape():
|
||||
image = np.random.random((5, 5))
|
||||
image = np.random.rand(5, 5)
|
||||
|
||||
assert_raises(ValueError, warp, image, lambda xy: xy,
|
||||
output_shape=(13.1, 19.5))
|
||||
|
||||
Reference in New Issue
Block a user