Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow up from #237 & #239 #240

Closed
mutricyl opened this issue Jul 5, 2024 · 6 comments · Fixed by #244
Closed

follow up from #237 & #239 #240

mutricyl opened this issue Jul 5, 2024 · 6 comments · Fixed by #244

Comments

@mutricyl
Copy link
Contributor

mutricyl commented Jul 5, 2024

This is a follow up from pandas nightly build CI job introduction. The following tests have been skipped to get green light workflow for #239. They need to be fixed.

Looks like also that unique function was inducing errors in tests but this was unexpectedly solved. It might be worth to investigate this a little bit.

skipped tests:

  • test_pandas_extensiontests.py::TestPintArray::test_arith_frame_with_scalar : tests with "radd", "rsub", "rmul", "rtruediv", "rpow" are not working with pandas 3
  • test_issues.py::TestIssue80::test_div : pandas 3 is so fast that _timeit returns 0
  • test_pandas_extensiontests.py : all test including complex are skipped due to NumpyExtensionArray issue in pandas take function BUG: pd.api.extensions.take does not accept NumpyExtensionArray pandas-dev/pandas#59177

all temporary skip are marked by GH #239

Originally posted by @mutricyl in #239 (comment)

Looks like there's a unique function issue similar to the take issue

pint_pandas/testsuite/test_pandas_extensiontests.py::TestPintArray::test_value_counts_with_normalize[float] - TypeError: unique requires a Series, Index, ExtensionArray, or np.ndarray, got NumpyExtensionArray. FAILED

Originally posted by @andrewgsavage in #239 (comment)

@mutricyl
Copy link
Contributor Author

mutricyl commented Jul 7, 2024

pandas-dev/pandas#59177 was resolved so complex may be allowed again for pandas >= 3

@mutricyl
Copy link
Contributor Author

The two pandas issues with take and unique being solved, I add a look at the r operator issue in test_pandas_extensiontests.py::TestPintArray::test_arith_frame_with_scalar

I have identified the change in behavior is pandas 3 that induce pint and pint-pandas to fail with right operator. pint.compat.is_upcast_type behavior changed between pandas version due to type(df) that used to return <class 'pandas.core.frame.DataFrame'> which is now returning <class 'pandas.DataFrame'>.

@andrewgsavage do you think we should tackle this on the pandas side or on pint side ?

@andrewgsavage
Copy link
Collaborator

@mutricyl
Copy link
Contributor Author

for the record the pandas' change is a features : pandas-dev/pandas#55171

@mutricyl
Copy link
Contributor Author

shall we make CI-pandas-pre use also pint pre version or update the tests to xfail while pint is not strictly above 0.24.1 ?

@andrewgsavage
Copy link
Collaborator

I'll release a new pint version after pandas.DataFrame and pandas.Series are added to upcast types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants