Skip to content

Commit ffa70e8

Browse files
committed
Fix
1 parent 0437ba9 commit ffa70e8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/legacy_test/test_determinant_op.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ def init_data(self):
144144
self.target = np.linalg.det(self.case)
145145

146146

147+
class TestDeterminantOp_ZeroSize2(TestDeterminantOp):
148+
def init_data(self):
149+
np.random.seed(0)
150+
self.case = np.random.rand(0, 0, 0)
151+
self.inputs = {'Input': self.case}
152+
self.target = np.linalg.det(self.case)
153+
154+
147155
class TestDeterminantAPI(unittest.TestCase):
148156
def setUp(self):
149157
np.random.seed(0)
@@ -340,6 +348,14 @@ def init_data(self):
340348
self.target = np.array(np.linalg.slogdet(self.case))
341349

342350

351+
class TestSlogDeterminantOp_ZeroSize2(TestSlogDeterminantOp):
352+
def init_data(self):
353+
np.random.seed(0)
354+
self.case = np.random.rand(0, 0, 0).astype('float64')
355+
self.inputs = {'Input': self.case}
356+
self.target = np.array(np.linalg.slogdet(self.case))
357+
358+
343359
class TestSlogDeterminantAPI(unittest.TestCase):
344360
def setUp(self):
345361
np.random.seed(0)

0 commit comments

Comments
 (0)