File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ protected Set<List<Dimension<?>>> getShapes(PropagationCallGraphBuilder builder)
8686 int shape = (int ) Math .ceil ((limit - start ) / delta );
8787 ret .add (List .of (new NumericDim (shape ))); // Add the shape as a 1D tensor.
8888 }
89- } else if (numOfPoisitionArguments = = 3 ) {
89+ } else if (numOfPoisitionArguments > = 3 ) {
9090 // it must be `start`, `limit`, and `delta`.
9191 int startValueNumber =
9292 this .getNode ().getMethod ().isStatic ()
@@ -136,7 +136,7 @@ protected Set<List<Dimension<?>>> getShapes(PropagationCallGraphBuilder builder)
136136 }
137137 } else
138138 throw new IllegalStateException (
139- "Expected either 1 or 3 positional arguments for range(), but got: "
139+ "Expected either 1 or >= 3 positional arguments for range(), but got: "
140140 + numOfPoisitionArguments
141141 + "." );
142142
@@ -195,6 +195,7 @@ protected EnumSet<DType> getDefaultDTypes(PropagationCallGraphBuilder builder) {
195195 .map (
196196 numArgs ->
197197 IntStream .range (0 , numArgs )
198+ .filter (i -> i < 3 ) // only numeric arguments.
198199 .map (i -> this .getNode ().getIR ().getMethod ().isStatic () ? i : i + 1 )
199200 .map (this .getNode ().getIR ()::getParameter )
200201 .mapToObj (val -> getDTypes (builder , val ).stream ())
You can’t perform that action at this time.
0 commit comments