Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sxjscience committed Dec 28, 2017
1 parent a28fa53 commit 3eb3ac6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4332,7 +4332,9 @@ def check(data, idx):
data = mx.nd.array([212316236123621, -31231236374787,
-112372937128970, -13782787981728], dtype=dtype)
idx = mx.nd.array([[0, 0, 0, 0]], dtype='int32')
assert (mx.nd.scatter_nd_acc(data, idx, shape=(1,)).asnumpy()[0] == data.asnumpy().sum())
scatter_nd_ret = mx.nd.scatter_nd_acc(data, idx, shape=(1,)).asscalar()
npy_ret = data.asnumpy().sum()
assert (scatter_nd_ret == npy_ret), "scatter_nd_acc={}, npy={}".format(scatter_nd_ret, npy_ret)

def compare_forw_backw_unary_op(
name, forward_mxnet_call, forward_numpy_call,
Expand Down

0 comments on commit 3eb3ac6

Please sign in to comment.