File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 2323
2424import io .bioimage .modelrunner .tensor .shm .SharedMemoryArray ;
2525import io .bioimage .modelrunner .utils .CommonUtils ;
26- import net .imglib2 .Cursor ;
27- import net .imglib2 .util .Cast ;
28- import net .imglib2 .view .Views ;
2926
3027import java .nio .ByteBuffer ;
3128import java .util .Arrays ;
@@ -58,19 +55,19 @@ public static Tensor build(SharedMemoryArray array) throws IllegalArgumentExcept
5855 {
5956 // Create an Icy sequence of the same type of the tensor
6057 if (array .getOriginalDataType ().equals ("int8" )) {
61- return buildByte (Cast . unchecked ( array ) );
58+ return buildByte (array );
6259 }
6360 else if (array .getOriginalDataType ().equals ("int32" )) {
64- return buildInt (Cast . unchecked ( array ) );
61+ return buildInt (array );
6562 }
6663 else if (array .getOriginalDataType ().equals ("float32" )) {
67- return buildFloat (Cast . unchecked ( array ) );
64+ return buildFloat (array );
6865 }
6966 else if (array .getOriginalDataType ().equals ("float64" )) {
70- return buildDouble (Cast . unchecked ( array ) );
67+ return buildDouble (array );
7168 }
7269 else if (array .getOriginalDataType ().equals ("int64" )) {
73- return buildLong (Cast . unchecked ( array ) );
70+ return buildLong (array );
7471 }
7572 else {
7673 throw new IllegalArgumentException ("Unsupported tensor type: " + array .getOriginalDataType ());
You can’t perform that action at this time.
0 commit comments