From 3802104026c4e5f38d153b14ca53a8af80b1ef8a Mon Sep 17 00:00:00 2001 From: Ke Han Date: Wed, 3 Jun 2020 15:54:28 +0800 Subject: [PATCH] * Fix test case gt --- tests/python/unittest/test_numpy_op.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index 763976ff2c8b..9071eaaa953e 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -7817,25 +7817,25 @@ def dbg(name, data): ('ij, ij -> i', [(1, 4), (2, 4)], lambda *args: (_np.sum(args[1], axis=0)[None, :], _np.tile(args[0], [2, 1]))), # one dimensim bug - ('...ij, ...jk -> ...ik', [(1, 4), (4, 2)], lambda *args: (np.sum(args[1], axis=1)[None, :], + ('...ij, ...jk -> ...ik', [(1, 4), (4, 2)], lambda *args: (args[1].sum(axis=1)[None, :], _np.tile(args[0].sum(axis=0)[: ,None], [1, 2]))), ('...ij, ...jk -> ...ik', [(2, 4), (4, 2)], lambda *args: (_np.tile(args[1].sum(axis=1)[None, :], [2, 1]), _np.tile(args[0].sum(axis=0)[: ,None], [1, 2]))), ('...ij, ...jk -> ...ik', [(3, 2, 1, 4), (3, 2, 4, 2)], lambda *args: ( - args[1].sum(axis=3)[:, :, None, :], - _np.tile(args[0].sum(axis=2)[:, :, :, None], [1, 1, 1, 2]))), + args[1].sum(axis=3)[:, :, None, :], + _np.tile(args[0].sum(axis=2)[:, :, :, None], [1, 1, 1, 2]))), ('...ij, ...ik -> ...jk', [(1, 1, 1, 4), (1, 1, 1, 3)], lambda *args: ( - _np.tile(args[1].sum(axis=3)[:, :, :, None], [1, 1, 1, 4]), - _np.tile(args[0].sum(axis=3)[:, :, : ,None], [1, 1, 1, 3]))), + _np.tile(args[1].sum(axis=3)[:, :, :, None], [1, 1, 1, 4]), + _np.tile(args[0].sum(axis=3)[:, :, : ,None], [1, 1, 1, 3]))), ('...ij, ...jc -> ...ic', [(1, 1, 5, 3), (1, 1, 3, 2)], lambda *args: ( - _np.tile(args[1].sum(axis=3)[:, :, None, :], [1, 1, 5, 1]), - _np.tile(args[0].sum(axis=2)[:, :, : ,None], [1, 1, 1, 2]))), - ('...ij, ...jc -> ...ic', [(1, 2, 5, 4), (1, 1, 4, 2)], lambda *args: ( - _np.tile(args[1].sum(axis=3)[:, :, None, :], [1, 1, 5, 1]), - _np.tile(args[0].sum(axis=2)[:, :, : ,None], [1, 1, 1, 2]))), + _np.tile(args[1].sum(axis=3)[:, :, None, :], [1, 1, 5, 1]), + _np.tile(args[0].sum(axis=2)[:, :, : ,None], [1, 1, 1, 2]))), + ('...ij, ...jc -> ...ic', [(1, 2, 5, 4), (1, 2, 4, 2)], lambda *args: ( + _np.tile(args[1].sum(axis=3)[:, :, None, :], [1, 1, 5, 1]), + _np.tile(args[0].sum(axis=2)[:, :, : ,None], [1, 1, 1, 2]))), ('...ij, ...jc -> ...ic', [(2, 1, 5, 4), (2, 1, 4, 2)], lambda *args: ( - _np.tile(args[1].sum(axis=3)[:, :, None, :], [1, 1, 5, 1]), - _np.tile(args[0].sum(axis=2)[:, :, : ,None], [1, 1, 1, 2]))), + _np.tile(args[1].sum(axis=3)[:, :, None, :], [1, 1, 5, 1]), + _np.tile(args[0].sum(axis=2)[:, :, : ,None], [1, 1, 1, 2]))), # issue #16576 # commented due to long running time # ('abiz,abjz->abij', [(64, 8, 128, 512), (64, 8, 128, 512)], lambda *args: (_np.matmul(_np.ones((64, 8, 128, 128)), args[1]),