Skip to content

Fix/numpy2 compatibility#1113

Merged
p-snft merged 4 commits into
release/v0.5from
fix/numpy2_compatibility
Oct 15, 2024
Merged

Fix/numpy2 compatibility#1113
p-snft merged 4 commits into
release/v0.5from
fix/numpy2_compatibility

Conversation

@p-snft

@p-snft p-snft commented Aug 22, 2024

Copy link
Copy Markdown
Member

It's almost impossible to have doctests that work with both, numpy 1.x and numpy 2.x: The string representations changed to include the data type. Example:

> data = numpy.array([1,2,3])
> print(data[1])  # no longer prints "2"
np.int64(2)

Introducing a lower bound to Pandas as well allows to remove Pandas <2.2 compatibility code.

p-snft added 2 commits August 22, 2024 11:53
This allows to work with numpy >= 2.0.0.
It's almost impossible to have doctests that work with both,
numpy 1.x and numpy 2.x. Introducin a lower bound to Pandas
as well allows to remove Pandas <2.2 compatibility code.
@p-snft p-snft added this to the minor release milestone Aug 22, 2024
@p-snft p-snft self-assigned this Aug 22, 2024
@p-snft p-snft requested a review from a team August 22, 2024 10:18
@p-snft p-snft force-pushed the fix/numpy2_compatibility branch from 40e8055 to 7ba2f8d Compare October 15, 2024 14:56
# Conflicts:
#	docs/whatsnew/v0-5-5.rst
#	src/oemof/solph/__init__.py
@p-snft p-snft force-pushed the fix/numpy2_compatibility branch from 7ba2f8d to eec777a Compare October 15, 2024 14:56
@p-snft

p-snft commented Oct 15, 2024

Copy link
Copy Markdown
Member Author

Tests fail just because of broken link check (GitHub seems to be locked out.) Will merge.

@p-snft p-snft merged commit c58e2d4 into release/v0.5 Oct 15, 2024
@p-snft p-snft deleted the fix/numpy2_compatibility branch October 15, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant