Commit e8d12b5
Replace deprecated np.bool with equivalent bool (#1524)
Summary:
## Motivation
`np.bool` has been removed in numpy 1.24.0, currently only available as a pre-release. This caused failures like [this one](https://github.com/pytorch/botorch/actions/runs/3542694073)
`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.
Pull Request resolved: #1524
Test Plan: Added a test that the dtype mapping in `torch_to_numpy_dtype_dict` matches the behavior of torch `.numpy()`
Reviewed By: Balandat
Differential Revision: D41527521
Pulled By: esantorella
fbshipit-source-id: 0718aa3af5eb5a2423c152cb911babf7754e6b891 parent 9f55da2 commit e8d12b5
File tree
2 files changed
+19
-15
lines changed- botorch/optim/utils
- test/optim/utils
2 files changed
+19
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 20 | | |
35 | 21 | | |
36 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
37 | 33 | | |
38 | 34 | | |
39 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
0 commit comments