Closed
Description
The Series.all() and Series.any() have the type bool for the output. However, the real output type is np.bool. This causes issues when trying to compile a function using mypyc.
To Reproduce
Compile the following code
def test_function(df: pd.Dataframe):
# some code
is_all_nan = df["column_name"].isna().all()
# some more code
Typechecker mypy/mypyc
TypeError: bool object expected; got numpy.bool_
- OS: Windows
- OS Version: 11
- python version 3.11.6=7
- mypy version 1.8.0
- pandas-stubs version 2.2.3.250308
Metadata
Metadata
Assignees
Labels
No labels