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

Investigate issues with move to numpy 2 #1288

Closed
mferrera opened this issue Jan 9, 2025 · 2 comments
Closed

Investigate issues with move to numpy 2 #1288

mferrera opened this issue Jan 9, 2025 · 2 comments

Comments

@mferrera
Copy link
Collaborator

mferrera commented Jan 9, 2025

We have observed issues since dropping numpy 2 support in #1285

With numpy 2 + pandas 2.0.2 (the RMS 14+ environment) we see quite a few

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

With numpy 2 + pandas 2.2.1 (latest), we see much less of them, but they become:

ValueError: could not broadcast input array from shape (87,) into shape (86,)

These issues do not occur with numpy<2.

So far this has only popped up in fmu-tools: https://github.com/equinor/fmu-tools/actions/runs/12681226680/job/35344528453

@mferrera
Copy link
Collaborator Author

mferrera commented Jan 9, 2025

You need pandas 2.2.2 to use numpy 2.0.

This may indicate we need to maintain a separate branch for RMS environments, cf https://pandas.pydata.org/pandas-docs/stable/whatsnew/v2.2.2.html

@mferrera
Copy link
Collaborator Author

mferrera commented Jan 9, 2025

For fmu-tools solution is just to separate its pandas 2.0.2 mandated test to a separate job where the correct numpy version is installed. We can probably close this as a "warn" if using numpy 2 + pandas < 2.2.x, which aren't compatible (i.e. it's a pandas problem)

@mferrera mferrera closed this as completed Jan 9, 2025
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

1 participant