I would like to add type hints to a method that takes a numpy array as an input, and returns a string. This numpy array contains floats so I tried:
import numpy as np
def foo(array: np.ndarray[np.float64]) -> str:
But it will not work due to a TypeError: 'type' object is not subscriptable
.
I found this but could not follow the discussions!