piyushghai commented on a change in pull request #14688: Showing proper error
while creating a csr ndarray which is not 2D in shape.
URL: https://github.com/apache/incubator-mxnet/pull/14688#discussion_r275954745
##########
File path: tests/python/unittest/test_sparse_ndarray.py
##########
@@ -962,6 +962,11 @@ def test_sparse_nd_check_format():
indptr_list = [0, -2, 2, 3]
a = mx.nd.sparse.csr_matrix((data_list, indices_list, indptr_list),
shape=shape)
assertRaises(mx.base.MXNetError, a.check_format)
+ # CSR format should be 2 Dimensional.
+ a = mx.nd.array([1, 2, 3]).tostype('csr')
+ assertRaises(mx.base.MXNetError, a.check_format)
Review comment:
Will make the change.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services