Skip to content

Commit

Permalink
Handle empty tuple (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xin Li authored and tqchen committed Jan 10, 2017
1 parent ccb349d commit 0a65dec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/nnvm/tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,15 @@ class Tuple {
return is;
}
}
// Handle empty tuple
while (isspace(is.peek())) {
is.get();
}
if (is.peek() == ')') {
is.get();
return is;
}
// Handle non-empty tuple
ValueType idx;
std::vector<ValueType> tmp;
while (is >> idx) {
Expand Down

0 comments on commit 0a65dec

Please sign in to comment.