Skip to content

Commit 4552522

Browse files
committed
Fix
1 parent c2c0b39 commit 4552522

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/legacy_test/test_isin.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
},
6565
]
6666

67+
DATA_CASES_ZERO_SIZE = [
68+
{'x_data': np.random.randn(8, 0), 'test_x_data': np.random.randn(4, 0)},
69+
{'x_data': np.random.randn(8, 0), 'test_x_data': np.random.randn(4, 1)},
70+
]
6771

6872
DATA_TYPE = ['float32', 'float64', 'int32', 'int64']
6973

@@ -320,5 +324,13 @@ def test_unique_invert(self):
320324
)
321325

322326

327+
class TestIsIn_ZeroSize(unittest.TestCase):
328+
def test_without_gpu(self):
329+
test(DATA_CASES_ZERO_SIZE, DATA_TYPE)
330+
331+
def test_with_gpu(self):
332+
test(DATA_CASES_ZERO_SIZE, DATA_TYPE, use_gpu=True)
333+
334+
323335
if __name__ == '__main__':
324336
unittest.main()

0 commit comments

Comments
 (0)