mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] reminisce commented on a change in pull request #16829: [Numpy][Operator] 'where' Implementation in MXNet
Date Fri, 15 Nov 2019 21:41:22 GMT
reminisce commented on a change in pull request #16829: [Numpy][Operator] 'where' Implementation
in MXNet
URL: https://github.com/apache/incubator-mxnet/pull/16829#discussion_r347022548
 
 

 ##########
 File path: python/mxnet/ndarray/numpy/_op.py
 ##########
 @@ -5308,3 +5308,67 @@ def nan_to_num(x, copy=True, nan=0.0, posinf=None, neginf=None, **kwargs):
         return _npi.nan_to_num(x, copy=copy, nan=nan, posinf=posinf, neginf=neginf, out=None)
     else:
         raise TypeError('type {} not supported'.format(str(type(x))))
+
+
+@set_module('mxnet.ndarray.numpy')
+def where(condition, x, y):
 
 Review comment:
   We need to support the case where there is only one input. You can do this for the imperative
mode only by falling back to `condition.nonzero()`.

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

Mime
View raw message