Is there a way to work with PEP 484 type annotations and numpy, while still benefiting from Cython performance improval?
This github issue (
https://github.com/cython/cython/issues/1672) suggests to use the cython built-in types (ex: myvar:
cython.int). However, I can't figure out how to use numpy arrays with this, since types such as cython.p_double can't fully represent a numpy array.
Attached here is an example of what I'm trying to accomplish: a script that works on both Python and Cython, using type annotations, which I expect to gain performance after compiling with Cython. It doesn't compile with Cython, however.