Skip to content

Commit

Permalink
small correction when transposing
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 27, 2023
1 parent bc6dd9f commit 41ca0e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/bioimage/modelrunner/tensor/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RandomAccessibleInterval<T> transpose(RandomAccessibleInterval<T> rai){
for (int i = 0; i < tensorShape.length; i ++) transposeAxesOrderChange[i] = tensorShape.length - 1 - i;
t.setComponentMapping(transposeAxesOrderChange);
long[] minMax = new long[tensorShape.length * 2];
for (int i = 0; i < tensorShape.length; i ++) minMax[i + tensorShape.length] = tensorShape[i] - 1;
for (int i = 0; i < tensorShape.length; i ++) minMax[i + tensorShape.length] = tensorShape[tensorShape.length - i - 1] - 1;
return Views.interval(new MixedTransformView<T>( rai, t ),
Intervals.createMinMax(minMax));
}
Expand Down

0 comments on commit 41ca0e7

Please sign in to comment.