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 2020/03/11 07:18:25 UTC

[GitHub] [incubator-mxnet] hzfan commented on a change in pull request #17812: [numpy] FFI binary bitwise ops

hzfan commented on a change in pull request #17812: [numpy] FFI binary bitwise ops 
URL: https://github.com/apache/incubator-mxnet/pull/17812#discussion_r390781243
 
 

 ##########
 File path: python/mxnet/ndarray/numpy/_op.py
 ##########
 @@ -5848,7 +5848,9 @@ def bitwise_and(x1, x2, out=None, **kwargs):
     >>> np.bitwise_and(np.array([True, True], dtype='bool'), np.array([False, True], dtype='bool'))
     array([False,  True])
     """
-    return _ufunc_helper(x1, x2, _npi.bitwise_and, _np.bitwise_and, _npi.bitwise_and_scalar, None, out)
+    if isinstance(x1, numeric_types) and isinstance(x2, numeric_types):
+        _np.bitwise_and(x1, x2, out=out)
 
 Review comment:
   `return _np.bitwise_and(x1, x2, out=out)`. Same for two other ops.

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