I have Vector = np.ndarray, but MyPy later on gives me the error Variable "main.Vector" is not valid as a type [valid-type].
Why?
This issue seems to be the closest, though I did not understand the explanation. This issue also seems related.
Complete code for reference:
import numpy as np
from typing import List, Union
Vector = np.ndarray
VectorLike = Union[List[float], Vector]