"examples/attention_sink/test_example_attention_sink.py" did not exist on "b44830905df5cd0088eaa2f820e4686df21407c3"
Unverified Commit e08515ce authored by Erik Fäßler's avatar Erik Fäßler Committed by GitHub
Browse files

Fix bug where numpy array is used as a truth value (#4286)

parent e875f1db
......@@ -243,7 +243,7 @@ class CG_BOHB:
while np.any(nan_indices):
nan_idx = nan_indices[0]
valid_indices = np.argwhere(np.isfinite(array[:, nan_idx])).flatten()
if valid_indices:
if len(valid_indices) > 0:
# pick one of them at random and overwrite all NaN values
row_idx = np.random.choice(valid_indices)
datum[nan_indices] = array[row_idx, nan_indices]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment