Closed cmp0xff closed 2 months ago
We need to do test isinstance(array_like, (Sequence, np.ndarray)).
isinstance(array_like, (Sequence, np.ndarray))
Taking this into account, when typing variables, we cannot write float | int | Sequence[float | int], because such does not include np.ndarray.
float | int | Sequence[float | int]
np.ndarray
I suggest simply using Sequence[float] | ArrayLike[float].
Sequence[float] | ArrayLike[float]
We need to do test
isinstance(array_like, (Sequence, np.ndarray))
.Taking this into account, when typing variables, we cannot write
float | int | Sequence[float | int]
, because such does not includenp.ndarray
.I suggest simply using
Sequence[float] | ArrayLike[float]
.