I am working on a python code base and the team has decided to make everything statically typed.
I want to declare a numpy array of floats to be one dimension, with arbitrary length.
I currently have the following:
float64 = np.dtype[np.float64]
floats = np.ndarray[Any, float64]
What exactly is the role of Any
in this case? Does this declaration permit multi-dimensional arrays? How do I statically differentiate between 1, 2, or 3 dimensional arrays?