Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
fangfangssj committed Feb 12, 2025
1 parent 53653c7 commit 21c7547
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/legacy_test/test_argsort_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,34 @@ def init(self):
)


class TestStableArgsortZeroSize(TestStableArgsort):
def init(self):
self.input_shape = [0, 30]
self.data = np.random.rand(*self.input_shape)
self.axis = 0


class TestStableArgsortZeroSize2(TestStableArgsort):
def init(self):
self.input_shape = [2, 0, 40]
self.data = np.random.rand(*self.input_shape)
self.axis = 0


class TestStableArgsortZeroSize3(TestStableArgsort):
def init(self):
self.input_shape = [0, 30]
self.data = np.random.rand(*self.input_shape)
self.axis = 1


class TestStableArgsortZeroSize4(TestStableArgsort):
def init(self):
self.input_shape = [2, 0, 40]
self.data = np.random.rand(*self.input_shape)
self.axis = 1


class TestArgsortImperative(unittest.TestCase):
def init(self):
self.input_shape = [
Expand Down

0 comments on commit 21c7547

Please sign in to comment.