Skip to content

Commit 62ba3f6

Browse files
committed
fix range check
Signed-off-by: Ryan Nett <[email protected]>
1 parent 8d71762 commit 62ba3f6

File tree

1 file changed

+2
-2
lines changed
  • tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op

1 file changed

+2
-2
lines changed

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/Index.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ private Slice(Singular start, Singular end, int stride) {
184184
false,
185185
false);
186186

187-
if(stride < 1){
188-
throw new IllegalArgumentException("Can not have a stride < 1");
187+
if(stride != 0){
188+
throw new IllegalArgumentException("Can not have a stride of 0");
189189
}
190190
}
191191
}

0 commit comments

Comments
 (0)