CassiniXu commented on a change in pull request #18277:
URL: https://github.com/apache/incubator-mxnet/pull/18277#discussion_r427133354
##########
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:
> `is_int=is_int` does not seem to be necessary
Because of the existence of FFI, we can get the scalar type when writing C++
codes instead of writing Python. The implementation of symbol doesn't contain
FFI process, that's why we need to use a parameter "is_int" when calling symbol
function.
----------------------------------------------------------------
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]