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

Use of deprecated np.int in dimension type checking #41

Closed
Bronzila opened this issue Jul 18, 2023 · 3 comments · Fixed by #48 or #50
Closed

Use of deprecated np.int in dimension type checking #41

Bronzila opened this issue Jul 18, 2023 · 3 comments · Fixed by #48 or #50
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Bronzila
Copy link
Collaborator

Bronzila commented Jul 18, 2023

Here the deprecated np.int type of numpy is used, when initalizing DEHB without a configspace object. This is deprecated since numpy v1.20 and should be replaced by either np.int32 or np.int64.

@Bronzila Bronzila added bug Something isn't working good first issue Good for newcomers labels Jul 18, 2023
@SandboxHead
Copy link

Hey @Bronzila I will make these required changes. Can you assign me this issue?

@eddiebergman
Copy link
Contributor

eddiebergman commented Jul 18, 2023

Will add that the deprecation is mostly when used with np.method(..., dtype=np.int) as this is now made equivalent to np.method(..., dtype=int) and the latter should be preferred. In the case you've shown there, the best way to do instance checking right now is isinstance(x, (int, np.integer)). (Likewise you have np.floating super classes np.float32/64)

@Bronzila
Copy link
Collaborator Author

Hey @Bronzila I will make these required changes. Can you assign me this issue?

@SandboxHead I will do so, thanks.
It would be great if you could have a look at our contributing guidelines. Since this is currently just a draft, it is not merged to master yet, however it should still be a good guidance.

Bronzila added a commit that referenced this issue Jul 30, 2023
@Bronzila Bronzila self-assigned this Jul 30, 2023
@Bronzila Bronzila linked a pull request Aug 2, 2023 that will close this issue
Bronzila added a commit that referenced this issue Aug 2, 2023
@Bronzila Bronzila closed this as completed Aug 2, 2023
@Bronzila Bronzila mentioned this issue Aug 2, 2023
@Bronzila Bronzila linked a pull request Aug 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants