Skip to content

Commit

Permalink
coerce arrays to lists in random_sample()
Browse files Browse the repository at this point in the history
  • Loading branch information
dannygoldstein committed Oct 27, 2021
1 parent ed2b882 commit ff65af2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sweeps/bayes_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def sigmoid(x: ArrayLike) -> ArrayLike:


def random_sample(X_bounds: ArrayLike, num_test_samples: integer) -> ArrayLike:
if hasattr(X_bounds, "tolist"):
X_bounds = X_bounds.tolist()
num_hyperparameters = len(X_bounds)
test_X = np.empty((int(num_test_samples), num_hyperparameters))
for ii in range(num_test_samples):
Expand Down

0 comments on commit ff65af2

Please sign in to comment.