Skip to content

Commit a98f6a7

Browse files
committed
Check required parameters.
1 parent fc81337 commit a98f6a7

File tree

1 file changed

+7
-1
lines changed
  • com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client

1 file changed

+7
-1
lines changed

com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client/Eye.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ protected Set<List<Dimension<?>>> getShapes(PropagationCallGraphBuilder builder)
119119

120120
private Set<Optional<Integer>> getNumberOfRows(PropagationCallGraphBuilder builder) {
121121
// TODO Handle keyword arguments.
122-
return this.getPossiblePositionalArgumentValues(builder, this.getNumRowsParameterPosition());
122+
Set<Optional<Integer>> values =
123+
this.getPossiblePositionalArgumentValues(builder, this.getNumRowsParameterPosition());
124+
125+
if (values == null || values.isEmpty())
126+
throw new IllegalStateException("The num_rows parameter is required for tf.eye().");
127+
128+
return values;
123129
}
124130

125131
private Set<Optional<Integer>> getNumberOfColumns(PropagationCallGraphBuilder builder) {

0 commit comments

Comments
 (0)