Skip to content
Snippets Groups Projects
Commit c3b462fc authored by Tatsuya Nishiyama's avatar Tatsuya Nishiyama Committed by Tianqi Chen
Browse files

Fix GetReduceAces (#1460)

parent fde98f0e
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ inline TShape GetReduceAxes(const uint32_t indim,
if (!exclude) return in_axis;
TShape r_axis(indim - in_axis.ndim());
for (unsigned i = 0, j = 0, k = 0; i < indim; ++i) {
if (i == in_axis[j]) {
if (j < in_axis.ndim() && i == in_axis[j]) {
++j;
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment