Skip to content

Commit 955fcf1

Browse files
committed
Progress.
1 parent 278abab commit 955fcf1

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -877,26 +877,21 @@ private Set<TensorType> getTensorType(
877877
+ ".");
878878
}
879879

880-
for (int i = 0; i < possibleDimensions.length; i++) {
880+
for (int i = 0; i < possibleDimensions.length; i++)
881881
for (Dimension<Integer> iDim : possibleDimensions[i]) {
882882
@SuppressWarnings("unchecked")
883883
Dimension<Integer>[] dimensions = new Dimension[possibleDimensions.length];
884884

885885
dimensions[i] = iDim;
886886

887-
for (int j = 0; j < possibleDimensions.length; j++) {
888-
if (i != j) {
889-
for (Dimension<Integer> jDim : possibleDimensions[j]) {
890-
dimensions[j] = jDim;
891-
}
892-
}
893-
}
887+
for (int j = 0; j < possibleDimensions.length; j++)
888+
if (i != j)
889+
for (Dimension<Integer> jDim : possibleDimensions[j]) dimensions[j] = jDim;
894890

895891
List<Dimension<?>> dimensionList = asList(dimensions);
896892
TensorType tensorType = new TensorType("pixel", dimensionList);
897893
ret.add(tensorType);
898894
}
899-
}
900895
} else
901896
throw new IllegalStateException(
902897
"Expected a " + PythonTypes.list + " for the shape, but got: " + reference + ".");

0 commit comments

Comments
 (0)