Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[DOC] fix sym.arange doc #14237

Merged
merged 6 commits into from
Mar 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions python/mxnet/symbol/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,7 @@ def hypot(left, right):
else:
raise TypeError('types (%s, %s) not supported' % (str(type(left)), str(type(right))))


def eye(N, M=0, k=0, dtype=None, **kwargs):
"""Returns a new symbol of 2-D shpae, filled with ones on the diagonal and zeros elsewhere.
Expand Down Expand Up @@ -3002,11 +3003,16 @@ def full(shape, val, dtype=None, **kwargs):
def arange(start, stop=None, step=1.0, repeat=1, infer_range=False, name=None, dtype=None):
"""Returns evenly spaced values within a given interval.
Values are generated within the half-open interval [`start`, `stop`). In other
words, the interval includes `start` but excludes `stop`. The function is
similar to the built-in Python function `range` and to `numpy.arange`,
but returns a `Symbol`.
Parameters
----------
start : number
start : number, optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why modify it? It seems start doesn't have default value, but stop has one (None)

Edit:
It is coincident with NumPy.

Start of interval. The interval includes this value. The default start value is 0.
stop : number, optional
stop : number
End of interval. The interval does not include this value.
step : number, optional
Spacing between values.
Expand Down