From 3d4aa222943a738b8ec2a5382d7b363990ec7682 Mon Sep 17 00:00:00 2001 From: Danny Goldstein Date: Wed, 27 Oct 2021 13:43:20 -0700 Subject: [PATCH] fix test_squiggle_int --- src/sweeps/bayes_search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sweeps/bayes_search.py b/src/sweeps/bayes_search.py index 8ad8c87e..5b0153f9 100644 --- a/src/sweeps/bayes_search.py +++ b/src/sweeps/bayes_search.py @@ -61,8 +61,8 @@ def random_sample(X_bounds: ArrayLike, num_test_samples: integer) -> ArrayLike: test_X = np.empty((int(num_test_samples), num_hyperparameters)) for ii in range(num_test_samples): for jj in range(num_hyperparameters): - if type(X_bounds[jj][0]) == int: - assert type(X_bounds[jj][1]) == int + if type(X_bounds[jj][0].tolist()) == int: + assert type(X_bounds[jj][1].tolist()) == int test_X[ii, jj] = np.random.randint(X_bounds[jj][0], X_bounds[jj][1]) else: test_X[ii, jj] = (