Tommliu commented on a change in pull request #18277:
URL: https://github.com/apache/incubator-mxnet/pull/18277#discussion_r427110442



##########
File path: python/mxnet/symbol/numpy/_symbol.py
##########
@@ -1571,13 +1571,15 @@ def _ufunc_helper(lhs, rhs, fn_array, fn_scalar, 
lfn_scalar, rfn_scalar=None, ou
         if isinstance(rhs, numeric_types):
             return fn_scalar(lhs, rhs, out=out)
         else:
+            is_int = isinstance(rhs, integer_types)
             if rfn_scalar is None:
                 # commutative function
-                return lfn_scalar(rhs, float(lhs), out=out)
+                return lfn_scalar(rhs, float(lhs), is_int=is_int, out=out)

Review comment:
       we add a struct` NumpyBinaryScalarParam` which contains `scalar` and 
`is_int` to indicate the dtype of scalar input. Using this struct to solve type 
issue.




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


Reply via email to