File tree Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ jobs:
39
39
with :
40
40
deno-version : v1.x
41
41
42
- - name : Setup Python 3.10 (Windows)
42
+ - name : Setup Python (Windows)
43
43
uses : actions/setup-python@v2
44
44
if : ${{ matrix.os == 'windows-latest' }}
45
45
with :
46
- python-version : ' 3.10 '
46
+ python-version : ' 3.11 '
47
47
48
48
- name : Install NumPy
49
49
run : python3 -m pip install numpy
Original file line number Diff line number Diff line change @@ -957,26 +957,8 @@ function isSlice(value: unknown): boolean {
957
957
*/
958
958
function toSlice ( sliceList : string ) : PyObject {
959
959
if ( sliceList . includes ( "," ) ) {
960
- const pySlicesHandle = sliceList . split ( "," )
961
- . map ( toSlice )
962
- . map ( ( pyObject ) => pyObject . handle ) ;
963
-
964
- const pyTuple_Pack = new Deno . UnsafeFnPointer (
965
- // TODO: this isn't really a `bigint`, but Deno's type definitions
966
- // haven't been updated to support `number` yet
967
- py . PyTuple_Pack ! ,
968
- {
969
- parameters : [ "i32" , ...pySlicesHandle . map ( ( ) => "pointer" as const ) ] ,
970
- result : "pointer" ,
971
- } as const ,
972
- ) ;
973
-
974
- // SAFETY: idk how to make TS understand this sort of function
975
- const pyTupleHandle = ( pyTuple_Pack as any ) . call (
976
- pySlicesHandle . length ,
977
- ...pySlicesHandle ,
978
- ) ;
979
- return new PyObject ( pyTupleHandle ) ;
960
+ const pySlicesHandle = sliceList . split ( "," ) . map ( toSlice ) ;
961
+ return python . tuple ( pySlicesHandle ) [ ProxiedPyObject ] ;
980
962
} else if ( / ^ \s * - ? \d + \s * $ / . test ( sliceList ) ) {
981
963
return PyObject . from ( parseInt ( sliceList ) ) ;
982
964
} else if ( / ^ \s * \. \. \. \s * $ / . test ( sliceList ) ) {
You can’t perform that action at this time.
0 commit comments