Skip to content

Commit

Permalink
Fix apache#13013, Fix Sphinx python docstring error. (apache#13173)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored and azai91 committed Dec 1, 2018
1 parent 397087d commit 0a82085
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions python/mxnet/ndarray/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0a82085

Please sign in to comment.