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

Commit

Permalink
add/update infer_range docs (#12879)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham authored and nswamy committed Oct 20, 2018
1 parent 137b6f5 commit 76d5197
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions python/mxnet/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -2547,6 +2547,9 @@ def arange(start, stop=None, step=1.0, repeat=1, infer_range=False, ctx=None, dt
Spacing between values. The default step size is 1.
repeat : int, optional
Number of times to repeat each element. The default repeat count is 1.
infer_range : boolean, optional
When set to True, infer the stop position from the start, step,
repeat, and output tensor size.
ctx : Context, optional
Device context. Default context is the current default context.
dtype : str or numpy.dtype, optional
Expand Down
3 changes: 3 additions & 0 deletions python/mxnet/symbol/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2926,6 +2926,9 @@ def arange(start, stop=None, step=1.0, repeat=1, infer_range=False, name=None, d
repeat : int, optional
"The repeating time of all elements.
E.g repeat=3, the element a will be repeated three times --> a, a, a.
infer_range : boolean, optional
When set to True, infer the stop position from the start, step,
repeat, and output tensor size.
dtype : str or numpy.dtype, optional
The value type of the inner value, default to ``np.float32``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ object NDArray extends NDArrayBase {
* @param stop End of interval.
* @param step Spacing between values. The default step size is 1.
* @param repeat Number of times to repeat each element. The default repeat count is 1.
* @param infer_range
* When set to True, infer the stop position from the start, step,
* repeat, and output tensor size.
* @param ctx Device context. Default context is the current default context.
* @param dType The data type of the `NDArray`. The default datatype is `DType.Float32`.
* @return NDArray of evenly spaced values in the specified range.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,9 @@ object Symbol extends SymbolBase {
* @param stop End of interval.
* @param step Spacing between values. The default step size is 1.
* @param repeat Number of times to repeat each element. The default repeat count is 1.
* @param infer_range Infer the stop value from output shape
* @param infer_range
* When set to True, infer the stop position from the start, step,
* repeat, and output tensor size.
* @param ctx Device context. Default context is the current default context.
* @param dType The data type of the `NDArray`. The default datatype is `DType.Float32`.
* @return NDArray of evenly spaced values in the specified range.
Expand Down
4 changes: 2 additions & 2 deletions src/operator/tensor/init_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ struct RangeParam : public dmlc::Parameter<RangeParam> {
" E.g repeat=3, the element a will be repeated three times --> a, a, a.");
DMLC_DECLARE_FIELD(infer_range)
.set_default(false)
.describe("Whether to infer the stop position from the start, step, repeat, and output tensor"
"size.");
.describe("When set to True, infer the stop position from the start, step, "
"repeat, and output tensor size.");
DMLC_DECLARE_FIELD(ctx)
.set_default("")
.describe("Context of output, in format [cpu|gpu|cpu_pinned](n)."
Expand Down

0 comments on commit 76d5197

Please sign in to comment.