Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Remove previous Weibull test
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Roberts committed Feb 5, 2020
1 parent a3f4ffa commit 6faabe0
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions tests/python/unittest/test_numpy_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 6faabe0

Please sign in to comment.