Move away from random.random in favor of random.rand

This commit is contained in:
blink1073
2014-07-19 18:18:23 -05:00
parent 35dcdd5315
commit 5677dafe41
22 changed files with 57 additions and 56 deletions
+2 -2
View File
@@ -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())
+1 -1
View File
@@ -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))