2

When working with numpy arrays I would like to annotate the dtype of the array. It's possible to annotate a parameter as np.ndarray but this doesn't say anything about it's dtype which would be important in some cases.

I would like to be able to say something like this:

def foo(bar: np.ndarray(dtype=np.float32)):
    pass

0 Answers0