This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Description
I think there is a bug in ndarray type hint.
I think that in case of np.array that has one row with only integers (type int or int[64]) and one row with at least one float (e.g. type float), then it produces an error since rows have different types so conflict like "np.ndarray[float] != np.ndarray[int]" occurs.
Reproducing code example:
# bug.py
import numpy as np
arr = np.array([[4.2, 2, 3.5], [12, 3, 6]])
and run mypy:
Error message:
bug.py:3: error: Argument 1 to "array" has incompatible type "List[object]"; expected "Union[List[bool], List[List[bool]], List[List[List[bool]]], List[List[List[List[bool]]]]]"
NumPy/Python/data-science-types versions information:
1.19.2 / 3.8.5 / 0.2.20