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

Commit

Permalink
Update sparse_retain Documentation (#15394)
Browse files Browse the repository at this point in the history
* Update sparse_retain.cc

* Update sparse_retain.cc
  • Loading branch information
eric-haibin-lin authored and lanking520 committed Jun 28, 2019
1 parent e8f3e91 commit 8aaacde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operator/tensor/sparse_retain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ 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::
data = [[1, 2], [3, 4], [5, 6]]
indices = [0, 1, 3]
shape = (4, 2)
rsp_in = row_sparse(data, indices)
rsp_in = row_sparse_array(data, indices)
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

0 comments on commit 8aaacde

Please sign in to comment.