haojin2 commented on a change in pull request #15838: [numpy] nonzero
URL: https://github.com/apache/incubator-mxnet/pull/15838#discussion_r323632354
 
 

 ##########
 File path: tests/python/unittest/test_numpy_op.py
 ##########
 @@ -1744,6 +1744,44 @@ def test_indexing_mode(sampler, set_size, samples_size, 
replace, weight=None):
             test_indexing_mode(test_choice_weighted, num_classes, num_classes 
// 2, replace, weight)
 
 
+@with_seed()
+@use_np
+def test_np_nonzero():
+    class TestNonzero(HybridBlock):
+        def __init__(self):
+            super(TestNonzero, self).__init__()
+            
+        def hybrid_forward(self, F, x):
+            return F.npx.nonzero(x)
+
+    types = ['int32', 'int64', 'float64', 'float32', 'float16']
+    for hybridize in [True, False]:
+        for shape in [(),
+                      (1,),
+                      (1, 1),
 
 Review comment:
   Get rid of this shape and the shape above.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to