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 2018/10/18 22:38:13 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #12860: Sparse support for logic ops

eric-haibin-lin commented on a change in pull request #12860: Sparse support for logic ops
URL: https://github.com/apache/incubator-mxnet/pull/12860#discussion_r226487719
 
 

 ##########
 File path: tests/python/unittest/test_sparse_ndarray.py
 ##########
 @@ -192,8 +196,12 @@ def test_sparse_nd_not_equal():
         y = sparse_nd_ones(shape, stype)
         z = x != y
         assert (z.asnumpy() == np.ones(shape)).all()
-        z = 0 != x
+        z = 0 != y
+        assert (z.asnumpy() == np.ones(shape)).all()
+        assert z.stype == stype
+        z = 1 != y
         assert (z.asnumpy() == np.zeros(shape)).all()
+        assert z.stype == 'default'
 
 Review comment:
   Assuming most of y's entries are 0's, `0 != 1` gives `1`, so it should be in dense format

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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