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 23
23
24
24
import io .bioimage .modelrunner .tensor .shm .SharedMemoryArray ;
25
25
import io .bioimage .modelrunner .utils .CommonUtils ;
26
- import net .imglib2 .Cursor ;
27
- import net .imglib2 .util .Cast ;
28
- import net .imglib2 .view .Views ;
29
26
30
27
import java .nio .ByteBuffer ;
31
28
import java .util .Arrays ;
@@ -58,19 +55,19 @@ public static Tensor build(SharedMemoryArray array) throws IllegalArgumentExcept
58
55
{
59
56
// Create an Icy sequence of the same type of the tensor
60
57
if (array .getOriginalDataType ().equals ("int8" )) {
61
- return buildByte (Cast . unchecked ( array ) );
58
+ return buildByte (array );
62
59
}
63
60
else if (array .getOriginalDataType ().equals ("int32" )) {
64
- return buildInt (Cast . unchecked ( array ) );
61
+ return buildInt (array );
65
62
}
66
63
else if (array .getOriginalDataType ().equals ("float32" )) {
67
- return buildFloat (Cast . unchecked ( array ) );
64
+ return buildFloat (array );
68
65
}
69
66
else if (array .getOriginalDataType ().equals ("float64" )) {
70
- return buildDouble (Cast . unchecked ( array ) );
67
+ return buildDouble (array );
71
68
}
72
69
else if (array .getOriginalDataType ().equals ("int64" )) {
73
- return buildLong (Cast . unchecked ( array ) );
70
+ return buildLong (array );
74
71
}
75
72
else {
76
73
throw new IllegalArgumentException ("Unsupported tensor type: " + array .getOriginalDataType ());
You can’t perform that action at this time.
0 commit comments