Skip to content

fix broken numpy 2.0 compat in crossvalutils and predict_multianimal - #3498

Merged
deruyter92 merged 1 commit into
devfrom
jaap/numpy-2-compatibility
Sep 9, 2026
Merged

deruyter92 merged 1 commit into
devfrom
jaap/numpy-2-compatibility

Conversation

@deruyter92

Copy link
Copy Markdown
Collaborator

Fix a small mistake in numpy 2.0 compatibility:

in the getattr(np,"trapezoid", np.trapz) compatibility shim, the default arg was always evaluated, breaking compat. This PR replaces that with conditional evaluation np.trapezoid if hasattr(np, "trapezoid") else np.trapz

in the getattr(np,"trapezoid", np.trapz) the default arg was always evaluated, breaking compat. replaced with conditional
@deruyter92
deruyter92 marked this pull request as ready for review September 9, 2026 09:11
@deruyter92
deruyter92 added this pull request to stack #3500 September 9, 2026 09:16
@deruyter92 deruyter92 added 3.0.2 dependencies Pull requests that update a dependency file labels Sep 9, 2026
@deruyter92
deruyter92 merged commit 053d105 into dev Sep 9, 2026
18 of 21 checks passed
@deruyter92
deruyter92 deleted the jaap/numpy-2-compatibility branch September 9, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0.2 dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants