From 6faabe04d0fdd733227c425ceb816a8437cefa0a Mon Sep 17 00:00:00 2001 From: Denisa Roberts Date: Wed, 5 Feb 2020 14:30:16 -0500 Subject: [PATCH] Remove previous Weibull test --- tests/python/unittest/test_numpy_op.py | 30 -------------------------- 1 file changed, 30 deletions(-) diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index 8ff71e201186..fe8c3ad15e82 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -3598,36 +3598,6 @@ def _test_exponential_exception(scale): assertRaises(ValueError, _test_exponential_exception, -1) -@with_seed() -@use_np -def test_np_random_weibull(): - class TestRandomWeibull(HybridBlock): - def __init__(self, shape): - super(TestRandomWeibull, self).__init__() - self._shape = shape - - def hybrid_forward(self, F, a): - return F.np.random.weibull(a, self._shape) - - shapes = [(), (1,), (2, 3), (4, 0, 5), 6, (7, 8), None] - for hybridize in [False, True]: - for shape in shapes: - test_weibull = TestRandomWeibull(shape) - if hybridize: - test_weibull.hybridize() - np_out = _np.random.weibull(1, size = shape) - mx_out = test_weibull(np.array([1])) - - for shape in shapes: - mx_out = np.random.weibull(np.array([1]), shape) - np_out = _np.random.weibull(np.array([1]).asnumpy(), shape) - assert_almost_equal(mx_out.asnumpy().shape, np_out.shape) - - def _test_weibull_exception(a): - output = np.random.weibull(a=a).asnumpy() - assertRaises(ValueError, _test_weibull_exception, -1) - - @with_seed() @use_np def test_np_random_a():