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

Bugfix numpy deprecations #285

Merged
merged 4 commits into from
Dec 21, 2022
Merged

Bugfix numpy deprecations #285

merged 4 commits into from
Dec 21, 2022

Conversation

coreyostrove
Copy link
Contributor

I took an initial pass at fixing the calls to the newly deprecated dtype aliases. I think I got everything in our codebase, but there are some broken calls in qibo that cause the import to die, and related unit tests to fail, so these have been temporarily disabled. There are a couple more unit tests that are failing, but these are related to germ selection and seem to be broken for a different reason (I suspect for a disjoint numpy change given the error messages). For the sake of having a clean commit history I am going to fix those problems on another branch where I also look into the edge case @enielse showed me about when the initial set of germs in germ selection is empty. So I'm requesting we merge this in even though there are still some failing tests.

Corey Ostrove added 4 commits December 20, 2022 14:27
Performs an initial round of numpy dtype updates to handle the deprecated aliases that were phased out in numpy 1.24.0
There are some deprecated dtype calls in the qibo codebase that are breaking the import on numpy 1.24.0, so catch this exception and skip this test if necessary.
Adds an additional catch for the attribute error that is being raised on import for qibo.
need to wrap multiple exceptions in a tuple to use them in a single try-except block.
Copy link
Contributor

@sserita sserita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All straightforward changes, thanks for tracking those down!

@sserita sserita merged commit 5e09748 into develop Dec 21, 2022
@sserita sserita deleted the bugfix-numpy-deprecations branch December 21, 2022 02:00
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 this pull request may close these issues.

2 participants