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

Commit 8aaacde

Browse files
eric-haibin-linlanking520
authored andcommitted
Update sparse_retain Documentation (#15394)
* Update sparse_retain.cc * Update sparse_retain.cc
1 parent e8f3e91 commit 8aaacde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/operator/tensor/sparse_retain.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ namespace op {
3131
// accepts row-sparse format ndarrays. It will be registered
3232
// under mxnet.ndarray.sparse with name retain.
3333
NNVM_REGISTER_OP(_sparse_retain)
34-
.describe(R"code(pick rows specified by user input index array from a row sparse matrix
34+
.describe(R"code(Pick rows specified by user input index array from a row sparse matrix
3535
and save them in the output sparse matrix.
3636
3737
Example::
3838
3939
data = [[1, 2], [3, 4], [5, 6]]
4040
indices = [0, 1, 3]
4141
shape = (4, 2)
42-
rsp_in = row_sparse(data, indices)
42+
rsp_in = row_sparse_array(data, indices)
4343
to_retain = [0, 3]
4444
rsp_out = retain(rsp_in, to_retain)
45-
rsp_out.values = [[1, 2], [5, 6]]
45+
rsp_out.data = [[1, 2], [5, 6]]
4646
rsp_out.indices = [0, 3]
4747
4848
The storage type of ``retain`` output depends on storage types of inputs

0 commit comments

Comments
 (0)