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

Update sparse_retain Documentation #15394

Merged
merged 2 commits into from
Jun 28, 2019
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/operator/tensor/sparse_retain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace op {
// accepts row-sparse format ndarrays. It will be registered
// under mxnet.ndarray.sparse with name retain.
NNVM_REGISTER_OP(_sparse_retain)
.describe(R"code(pick rows specified by user input index array from a row sparse matrix
.describe(R"code(Pick rows specified by user input index array from a row sparse matrix
and save them in the output sparse matrix.

Example::
Expand All @@ -42,7 +42,7 @@ Example::
rsp_in = row_sparse(data, indices)
eric-haibin-lin marked this conversation as resolved.
Show resolved Hide resolved
to_retain = [0, 3]
rsp_out = retain(rsp_in, to_retain)
rsp_out.values = [[1, 2], [5, 6]]
rsp_out.data = [[1, 2], [5, 6]]
rsp_out.indices = [0, 3]

The storage type of ``retain`` output depends on storage types of inputs
Expand Down