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

Commit

Permalink
Minor syntax fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Mao committed Aug 9, 2019
1 parent 18792d5 commit 862db28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/operator/tensor/matrix_op-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ inline void GetIndexRange(const mxnet::TShape& dshape,
inline void SetSliceOpOutputDimSize(const index_t i, const int b,
const int e, const int s,
mxnet::TShape* oshape) {
if (!Imperative::Get()->is_np_shape()) { //handle as ndarray
if (!Imperative::Get()->is_np_shape()) { // handle as ndarray
if (e != b) {
if (s > 0) {
CHECK_LT(b, e) << "slicing with begin=[" << i << "]=" << b << ", end[" << i << "]="
Expand All @@ -768,7 +768,7 @@ inline void SetSliceOpOutputDimSize(const index_t i, const int b,
(*oshape)[i] = (b - e - 1) / (-s) + 1;
}
} // else leave oshape[i] as 0 for partial infer
} else { //handle as numpy compatible array
} else { // handle as numpy compatible array
if (e != b && b >= 0) {
if (s > 0) {
(*oshape)[i] = e > b ? (e - b - 1) / s + 1 : 0;
Expand Down

0 comments on commit 862db28

Please sign in to comment.