haojin2 commented on a change in pull request #16025: Numpy add numpy op 
left_shift and right_shift
URL: https://github.com/apache/incubator-mxnet/pull/16025#discussion_r319811983
 
 

 ##########
 File path: tests/python/unittest/test_numpy_op.py
 ##########
 @@ -1126,6 +1126,62 @@ def test_np_randint():
             verify_generator(generator=generator_mx_same_seed, 
buckets=buckets, probs=probs, nrepeat=100)
 
 
+@with_seed()
+@use_np
+def test_np_left_shift():
+    class TestLeftShift(HybridBlock):
+        def __init__(self):
+            super(TestLeftShift, self).__init__()
+
+        def hybrid_forward(self, F, a, b):
+            return F.np.left_shift(a, b)
+
+    @use_np
+    class TestRightShift(HybridBlock):
+        def __init__(self):
+            super(TestRightShift, self).__init__()
+
+        def hybrid_forward(self, F, a, b):
+            return F.np.right_shift(a, b)
 
 Review comment:
   ```Python
   class TestShift(HybridBlock):
       def __init__(self, func):
               super(TestShift, self).__init__()
               self._func = func
   
           def hybrid_forward(self, F, a, b):
               return getattr(F.np, self._func)(a, b)
   ```

----------------------------------------------------------------
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

Reply via email to