-
Notifications
You must be signed in to change notification settings - Fork 6.7k
edit ndarray API docs #5806
edit ndarray API docs #5806
Changes from all commits
8b0fd4c
e415ffa
7026505
f7a8d36
ea0b3ef
c5cb81d
87b9217
e88f195
96666cf
a4bc4d7
d6882bf
f08e670
954d621
a7e14f0
dca0cf2
d2199d2
f038c47
5a49757
76f0839
22af606
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,9 +22,14 @@ struct ReduceAxesParam : public dmlc::Parameter<ReduceAxesParam> { | |
| bool keepdims; | ||
| DMLC_DECLARE_PARAMETER(ReduceAxesParam) { | ||
| DMLC_DECLARE_FIELD(axis).set_default(TShape()) | ||
| .describe("The axes to perform the reduction."); | ||
| .describe("The axis or axes along which to perform the reduction. " | ||
| "The default, `axis=()`, will compute over all elements into a " | ||
| "scalar array with shape `(1,)`.\n\nIf axis is int, " | ||
| "a reduction is performed on a particular axis.\n\n" | ||
| "If axis is a tuple of ints, a reduction is performed " | ||
| "on all the axes specified in the tuple."); | ||
| DMLC_DECLARE_FIELD(keepdims).set_default(false) | ||
| .describe("If true, the axes which are reduced are left " | ||
| .describe("If this is set to `True`, the reduced axes are left " | ||
| "in the result as dimension with size one."); | ||
| } | ||
| }; | ||
|
|
@@ -34,11 +39,12 @@ struct ReduceAxisParam : public dmlc::Parameter<ReduceAxisParam> { | |
| bool keepdims; | ||
| DMLC_DECLARE_PARAMETER(ReduceAxisParam) { | ||
| DMLC_DECLARE_FIELD(axis).set_default(dmlc::optional<int>()) | ||
| .describe("int or None. The axis to perform the reduction. " | ||
| .describe("The axis along which to perform the reduction. " | ||
| "Negative values means indexing from right to left. " | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need to mention this ? i do not see this mentioned for other parameters that have this behavior
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you mean? |
||
| "If is `None`, a global reduction will be performed."); | ||
| "``Requires axis to be set as int, because global reduction " | ||
| "is not supported yet.``"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is used for multiple ops. Are all of them not supporting None?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is for argmax,argmin and pick operator and these 3 don't support None yet.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it is only for argmax, argmin, and pick. These three does not support global reduction. |
||
| DMLC_DECLARE_FIELD(keepdims).set_default(false) | ||
| .describe("If true, the axis which is reduced is left " | ||
| .describe("If this is set to `True`, the reduced axis is left " | ||
| "in the result as dimension with size one."); | ||
| } | ||
| }; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the the correct use of .describe() ? Should it take the formal variable name or a common language string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they use .describe to document other parameters.