anirudhacharya commented on a change in pull request #12967: [MXNET-1173] Debug 
operators - isfinite and isinf
URL: https://github.com/apache/incubator-mxnet/pull/12967#discussion_r227978933
 
 

 ##########
 File path: python/mxnet/ndarray/contrib.py
 ##########
 @@ -460,3 +461,65 @@ def _to_python_scalar(inputs, type_, name):
         return then_func()
     else:
         return else_func()
+
+def isinf(data, ctx=None):
+    """Checks whether a given NDArray has infinity or not
+
+
+    Parameters
+    ----------
+    input : NDArray
+        An N-D NDArray.
+    ctx : Context
+        Device context of output. Default is current context.
+
+    Returns
+    -------
+    output: NDArray
+        The output NDarray with 1 and 0 indicating whether infinite or not.
 
 Review comment:
   This should specify that the output has the same shape as input, and that it 
will be 1 where the array element is equal to +/- infinity and is 0 in other 
places.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to