You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I looked into it by curiosity and here is a more comprehensive test. @Igorsmit00 is correct that the type is not exact as pandas most likely uses a numpy function under the hood so the returns should be np.bool and not bool.
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
Typechecker mypy/mypyc
TypeError: bool object expected; got numpy.bool_
The text was updated successfully, but these errors were encountered: