(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.-CHB
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion