Skip to content

Commit

Permalink
Add UT
Browse files Browse the repository at this point in the history
  • Loading branch information
From00 committed Apr 7, 2022
1 parent 60c3f4b commit d631a63
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions python/paddle/fluid/tests/unittests/test_matrix_rank_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ def init_data(self):
self.hermitian)


class TestMatrixRankOP6(TestMatrixRankOP):
def init_data(self):
self.x = np.random.rand(3, 4, 5, 6).astype(np.float32)
self.tol_tensor = None
self.tol = None
self.use_default_tol = False
self.hermitian = False
self.out = np.linalg.matrix_rank(self.x, self.tol_tensor,
self.hermitian)


class TestMatrixRankOP7(TestMatrixRankOP):
def init_data(self):
self.x = np.eye(200, dtype=np.float64)
self.tol_tensor = np.random.random([200, 200]).astype(self.x.dtype)
self.tol = None
self.use_default_tol = True
self.hermitian = True
self.out = np.linalg.matrix_rank(self.x, self.tol_tensor,
self.hermitian)


class TestMatrixRankAPI(unittest.TestCase):
def test_dygraph(self):
paddle.disable_static()
Expand Down

1 comment on commit d631a63

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.