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 2018/11/09 05:13:02 UTC

[GitHub] nswamy closed pull request #13173: Fix #13013, Fix Sphinx python docstring error.

nswamy closed pull request #13173: Fix #13013, Fix Sphinx python docstring error.
URL: https://github.com/apache/incubator-mxnet/pull/13173
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/ndarray/contrib.py b/python/mxnet/ndarray/contrib.py
index b663e58285b..6bbee8a6fbc 100644
--- a/python/mxnet/ndarray/contrib.py
+++ b/python/mxnet/ndarray/contrib.py
@@ -140,9 +140,9 @@ def foreach(body, data, init_states):
     NDArrays.
 
     body takes two arguments as input and outputs a tuple of two elements,
-    as illustrated below:
+    as illustrated below::
 
-    out, states = body(data1, states)
+        out, states = body(data1, states)
 
     data1 can be either an NDArray or a list of NDArrays. If data is an NDArray,
     data1 is an NDArray. Otherwise, data1 is a list of NDArrays and has the same
@@ -152,15 +152,15 @@ def foreach(body, data, init_states):
     are the second output of foreach.
 
     The computation done by this operator is equivalent to the pseudo code below
-    when the input data is NDArray:
-
-    states = init_states
-    outs = []
-    for i in data.shape[0]:
-        s = data[i]
-        out, states = body(s, states)
-        outs.append(out)
-    outs = stack(*outs)
+    when the input data is NDArray::
+
+        states = init_states
+        outs = []
+        for i in data.shape[0]:
+            s = data[i]
+            out, states = body(s, states)
+            outs.append(out)
+        outs = stack(*outs)
 
 
     Parameters


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services