Commit 759c4a4
committed
Support NumPy 2
Not too long ago, NumPy 2.0 got released. cluster_utils didn't work
with it out of the box, so we restricted the dependency to numpy<2.
Looking into it now, it seems the only actual problem was in the
`Discrete` distribution when using booleans: Using NumPy's `choice()`
converted the list of native bools to an array of np.bool. Later one,
this clashed when passing the parameters to the job script, where they
are parsed with `ast.literal_eval()`.
Simply converting back to list with `.tolist()` seems to be enough to
fix this.1 parent c73efde commit 759c4a4
3 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
250 | 259 | | |
251 | 260 | | |
252 | 261 | | |
| |||
0 commit comments