This discussion has died down, but I don't want to lose momentum .

It sounds like there is at least strong interest from a subset of our community in type annotations. Are there any objections to the first part of my plan, to start developing type stubs for NumPy in separate repository?

We'll come back to the mailing list when we have concrete proposals for typing dtypes and shapes.

On Tue, Nov 28, 2017 at 4:05 PM Chris Barker - NOAA Federal <> wrote:

(a) it would be good if NumPy type annotations could include an “array_like” type that allows lists, tuples, etc.

I think that would be a sequence — already supported by the Typing system.

(b) I’ve always thought (since PEP561) that it would be cool for type annotations to replace compiler type annotations for e.g. Cython and Numba. Is this in the realm of possibility for the future?

Well, this was brought up early in the Typing discussion, and it was made clear that these kinds of truly static types, as needed by Cython, was a non-goal of the project.

That being said, perhaps it could be made to work with a bunch of additional type objects.

And we should lol lol to Cython for ideas about how to type numpy arrays.

One note: in addition to shape (rank) and types, there is contiguous and C or F order. That may want to be considered.


NumPy-Discussion mailing list