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

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadiaphy committed Apr 19, 2019
1 parent ba278fa commit 5a99737
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6990,6 +6990,20 @@ def test_float16_min_max():
assert np.finfo('float16').max == mx.nd.max(a).asscalar()


@with_seed()
def test_zero_sized_min_max():
def min():
a = mx.nd.zeros(shape=(5, 0))
a.min()

def max():
a = mx.nd.zeros(shape=(5, 0))
a.max()

assert_raises(MXNetError, min)
assert_raises(MXNetError, max)


@with_seed()
def test_squeeze_op():
def check_squeeze_op(shape, axis=None):
Expand Down

0 comments on commit 5a99737

Please sign in to comment.