From de05d2cd057be0933d7e7ce2d3572d205f8fabdc Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Sun, 10 Nov 2024 12:37:32 +0300 Subject: [PATCH] [~] Refactor --- python/tasks/cython.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/python/tasks/cython.py b/python/tasks/cython.py index ac51eb0..b8f337d 100644 --- a/python/tasks/cython.py +++ b/python/tasks/cython.py @@ -135,7 +135,7 @@ def mypyc_build(file_path: pathlib.Path) -> Any: [str(source_path)], target_dir=str(output_dir / 'build') ) - t1.build_temp = str(output_dir) + t1.build_temp = output_dir t1.build_lib = lib_dir #t2 = Cython.Build.Inline.Extension( # name=sha256sum, @@ -153,6 +153,16 @@ def mypyc_build(file_path: pathlib.Path) -> Any: raise NotImplementedError +class Source: + @staticmethod + def test2( + _a : numpy.ndarray[Any, numpy.dtype[numpy.int64]], + _id : numpy.dtype[numpy.int32] | int, + T : float=16 + ) -> int: + raise NotImplementedError + + source = build(r''' cimport cython @@ -214,7 +224,7 @@ def test2(long long [:] _a, int _id, double T=16) -> int: return _a[_id] -''') +''', Source) def test_cython(N: int=4, T:int=16): #a = [0] * N