Hi,
We don't make any use of numpy.typing
type annotations.
Essentially there's two ways in Cython
to use Numpy arrays efficiently:
1. ndarray (cimported from Numpy)
2. typed memoryviews
ndarray is the older way of doing it
and has some limitations. It isn't possible to use it with
annotations/pure Python code and we don't plan to add it.
typed memoryviews are the more modern
way of doing it. These can be used with anything that has the
buffer protocol (including Numpy arrays). These can be used in
annotations as `cython.double[:]` for example. Unfortunately this
syntax doesn't really match the strict format for typing that mypy
demands so there's some conflict there.
Unfortunately I don't think there's a
way to use mypy compatible typing syntax to express the details
that Cython wants to know about an array (that it supports the
buffer protocol, the underlying C data type, and the number of
dimensions) so you're kind of stuck pleasing either mypy or
Cython.