You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/05/16 22:56:31 UTC
[GitHub] [incubator-mxnet] marcoabreu commented on a change in pull request
#14948: [MXNET-1403] Disable numpy's writability of NDArray once it is
zero-copied to MXNet
marcoabreu commented on a change in pull request #14948: [MXNET-1403] Disable numpy's writability of NDArray once it is zero-copied to MXNet
URL: https://github.com/apache/incubator-mxnet/pull/14948#discussion_r284927619
##########
File path: tests/python/unittest/test_ndarray.py
##########
@@ -1687,8 +1687,10 @@ def test_zero_from_numpy():
mx.test_utils.assert_almost_equal(np_array, mx_array.asnumpy())
np_array = arrays[0]
mx_array = mx.nd.from_numpy(np_array)
- np_array[2, 1] = 0
- mx.test_utils.assert_almost_equal(np_array, mx_array.asnumpy())
+ try:
+ np_array[2, 1] = 0
+ except ValueError:
+ pass
Review comment:
Are you looking for assert_raises?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services