File tree Expand file tree Collapse file tree 1 file changed +12
-1
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 +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1018,7 +1018,18 @@ private Set<TensorType> getTensorType(
10181018 throw new IllegalStateException (
10191019 "Expected a " + ConstantKey .class + " for value, but got: " + valueIK + "." );
10201020
1021- // TODO: Shapes can also be specified as an explicit argument.
1021+ // Shapes can also be specified as an explicit argument. Here, we examine the third explicit
1022+ // argument (recall that the first argument is implicit and corresponds to the called
1023+ // function's name).
1024+ PointerKey shapePK = pointerAnalysis .getHeapModel ().getPointerKeyForLocal (node , 4 );
1025+ OrdinalSet <InstanceKey > shapePointsToSet = pointerAnalysis .getPointsToSet (shapePK );
1026+
1027+ for (InstanceKey shapeIK : shapePointsToSet )
1028+ // TODO: This is the above case.
1029+ throw new IllegalStateException (
1030+ "Found explicit shape argument: "
1031+ + shapeIK
1032+ + ". Currently cannot handle explicit shapes for constant()." );
10221033
10231034 // The dtype is the second explicit argument.
10241035 // FIXME: Handle keyword arguments.
You can’t perform that action at this time.
0 commit comments