File tree Expand file tree Collapse file tree
packages/react-native-executorch/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ type ETInput =
5050 | Float64Array ;
5151
5252export interface Tensor {
53- data: ETInput [] ;
53+ data: ETInput ;
5454 shape: number [];
5555}
5656```
Original file line number Diff line number Diff line change @@ -26,12 +26,8 @@ export class ExecutorchModule extends BaseModule {
2626 if ( ! currentInput || ! currentInput . data ) {
2727 throw new Error ( 'Input tensor is undefined.' ) ;
2828 }
29- const testingTypeElement = currentInput . data [ 0 ] ;
30- if ( testingTypeElement === undefined ) {
31- throw new Error ( 'Input tensor is undefined.' ) ;
32- }
3329
34- let currentInputTypeIdentifier = getTypeIdentifier ( testingTypeElement ) ;
30+ let currentInputTypeIdentifier = getTypeIdentifier ( currentInput . data ) ;
3531 if ( currentInputTypeIdentifier === - 1 ) {
3632 throw new Error ( getError ( ETError . InvalidArgument ) ) ;
3733 }
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ export type ETInput =
1717 | Float64Array ;
1818
1919export interface Tensor {
20- data : ETInput [ ] ;
20+ data : ETInput ;
2121 shape : number [ ] ;
22- type : ETInput ;
2322}
You can’t perform that action at this time.
0 commit comments