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/15 16:30:11 UTC
[GitHub] [incubator-mxnet] sjtuWangDing commented on a change in pull
request #17817: [Numpy] FFI for np_where
sjtuWangDing commented on a change in pull request #17817: [Numpy] FFI for np_where
URL: https://github.com/apache/incubator-mxnet/pull/17817#discussion_r392690016
##########
File path: python/mxnet/ndarray/numpy/_op.py
##########
@@ -7482,14 +7482,8 @@ def where(condition, x=None, y=None): # pylint: disable=too-many-return-stateme
else:
return y
else:
- if isinstance(x, numeric_types) and isinstance(y, numeric_types):
- return _npi.where_scalar2(condition, float(x), float(y), out=None)
- elif isinstance(x, NDArray) and isinstance(y, NDArray):
- return _npi.where(condition, x, y, out=None)
- elif isinstance(y, NDArray):
- return _npi.where_lscalar(condition, y, float(x), out=None)
- elif isinstance(x, NDArray):
- return _npi.where_rscalar(condition, x, float(y), out=None)
+ if isinstance(x, NDArray) and isinstance(y, NDArray):
Review comment:
There's really no need to check
----------------------------------------------------------------
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