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

Replace deprecated np.bool with equivalent bool #1524

Closed
wants to merge 2 commits into from

Conversation

esantorella
Copy link
Member

@esantorella esantorella commented Nov 24, 2022

Motivation

np.bool has been removed in numpy 1.24.0, currently only available as a pre-release. This caused failures like this one

np.bool has always been equivalent to bool, so I replaced it with bool.

Surprisingly (to me), we are only running that version of numpy in the tutorials and are using an older version of unit tests, so tests all passed.

Test Plan

Added a test that the dtype mapping in torch_to_numpy_dtype_dict matches the behavior of torch .numpy()

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 24, 2022
@esantorella esantorella self-assigned this Nov 24, 2022
@esantorella esantorella added bug Something isn't working and removed CLA Signed Do not delete this pull request or issue due to inactivity. labels Nov 24, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 25, 2022
@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #1524 (3f4c5cb) into main (9f55da2) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #1524   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          149       149           
  Lines        12936     12935    -1     
=========================================
- Hits         12936     12935    -1     
Impacted Files Coverage Δ
botorch/optim/utils/numpy_utils.py 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@facebook-github-bot
Copy link
Contributor

@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@esantorella has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants