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

Commit fe16576

Browse files
committed
fix a small mistake / remove redundant function
1 parent c4c8597 commit fe16576

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

src/operator/numpy/np_insert_op-inl.h

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct NumpyInsertParam : public dmlc::Parameter<NumpyInsertParam> {
6262
"'values' is inserted");
6363
DMLC_DECLARE_FIELD(axis)
6464
.set_default(dmlc::optional<int>())
65-
.describe("Axis along which to insert `values`.");
65+
.describe("Axis along which to insert 'values'.");
6666
}
6767
};
6868

@@ -187,26 +187,6 @@ struct InsertSingleIndexForward {
187187
}
188188
};
189189

190-
template<int ndim>
191-
inline mshadow::Shape<ndim> GetStride(const mxnet::TShape& shape) {
192-
mshadow::Shape<ndim>stride;
193-
size_t tmp = 1;
194-
for (int i = shape.ndim() - 1; i >= 0; --i) {
195-
stride[i] = tmp;
196-
tmp *= shape[i];
197-
}
198-
return stride;
199-
}
200-
201-
template<int ndim>
202-
inline mshadow::Shape<ndim> GetKernelShape(const mxnet::TShape& shape) {
203-
mshadow::Shape<ndim>k_shape;
204-
for (int i = 0 ; i < shape.ndim() ; ++i) {
205-
k_shape[i] = shape[i];
206-
}
207-
return k_shape;
208-
}
209-
210190
/*!
211191
* \brief insert when obj is 'tensor' or 'slice' with more than one element.
212192
* \tparam ndim - both 'in_arr', 'in_val' and 'out_data' have same ndim before call this.
@@ -354,7 +334,7 @@ struct SetOriginArrIdx {
354334
* /return step - slice.indices(range).step
355335
* /return tot - total number of slice.indices(range)
356336
*/
357-
inline void SliceIndices(const dmlc::optional<int>& pstart,
337+
void SliceIndices(const dmlc::optional<int>& pstart,
358338
const dmlc::optional<int>& pstop,
359339
const dmlc::optional<int>& pstep,
360340
const int range,
@@ -555,7 +535,7 @@ void NumpyInsertCompute(const nnvm::NodeAttrs& attrs,
555535
axis, true, req[out_pos]);
556536
});
557537
});
558-
} else if (indices_len == 1) {`
538+
} else if (indices_len == 1) {
559539
if (param.step.has_value()) {
560540
MSHADOW_TYPE_SWITCH(outputs[out_pos].type_flag_, DType, {
561541
MSHADOW_TYPE_SWITCH(vtype, VType, {

0 commit comments

Comments
 (0)