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

paramsurvey / pandas-appender needs update for numpy>=2 and pandas >=2 #193

Open
wumpus opened this issue Sep 2, 2024 · 2 comments
Open

Comments

@wumpus
Copy link
Contributor

wumpus commented Sep 2, 2024

pandas-appender is a somewhat overly clever package that lets paramsurvey append the incremental output it seems to a dataframe. Due to the removal of a function in pandas 2, it needs to be updated. This became very obvious recently because numpy 2, which was released last June, requires pandas 2 and doesn't say that in its metadata.

I'm going to fix pandas-appender and I'll close this issue when I'm done.

The error looks like: ERROR test/unit/test_multiprocessing.py - ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject -- which is confusingly similar to a different numpy problem from the past, with a different solution.

I've added a workaround to paramsurvey to hide this problem. If anyone sees this elsewhere, the way to hide it is to install:

pip install 'numpy<2'

I don't think updating ehtim will ever see this problem.

@voitsik
Copy link

voitsik commented Oct 17, 2024

It seems the DataFrame._append function is still present in Pandas 2.2. If I replace df.append with df._append in the pandas-appender package, it passes all tests.

@wumpus
Copy link
Contributor Author

wumpus commented Oct 18, 2024

That's pretty funny.

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

No branches or pull requests

3 participants
@wumpus @voitsik and others