Skip to content

Commit

Permalink
add/update infer_range docs (apache#12879)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham authored and Jose Luis Contreras committed Nov 13, 2018
1 parent a33896b commit 7e7a794
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
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
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
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
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
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 7e7a794

Please sign in to comment.