From 689a83c216478c2de209fc4d1c46a0b32e31e953 Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Wed, 27 Feb 2019 16:03:22 -0800 Subject: [PATCH] move choose_element_0index to operator --- src/ndarray/ndarray.cc | 5 ----- src/operator/tensor/broadcast_reduce_op_index.cc | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ndarray/ndarray.cc b/src/ndarray/ndarray.cc index 648f9584618c..df9bb47eda76 100644 --- a/src/ndarray/ndarray.cc +++ b/src/ndarray/ndarray.cc @@ -2027,11 +2027,6 @@ MXNET_REGISTER_NDARRAY_FUN(_set_value) MXNET_REGISTER_NDARRAY_FUN(_onehot_encode) .set_function(BinaryOp); -MXNET_REGISTER_NDARRAY_FUN(choose_element_0index) -.set_function(BinaryOp) -.describe("Choose one element from each line(row for python, column for R/Julia)" - " in lhs according to index indicated by rhs." - " This function assume rhs uses 0-based index."); MXNET_REGISTER_NDARRAY_FUN(fill_element_0index) .set_function(TernaryOp) diff --git a/src/operator/tensor/broadcast_reduce_op_index.cc b/src/operator/tensor/broadcast_reduce_op_index.cc index c18a8bcf9126..b3c92dcd2d9a 100644 --- a/src/operator/tensor/broadcast_reduce_op_index.cc +++ b/src/operator/tensor/broadcast_reduce_op_index.cc @@ -109,6 +109,7 @@ Examples:: .add_argument("data", "NDArray-or-Symbol", "The input array"); NNVM_REGISTER_OP(pick) +.add_alias("choose_element_0index") .describe(R"code(Picks elements from an input array according to the input indices along the given axis. Given an input array of shape ``(d0, d1)`` and indices of shape ``(i0,)``, the result will be