fix unique_list
This commit is contained in:
parent
fa298d6f1c
commit
35cea6dcfa
@ -422,12 +422,11 @@ class Hyperopt:
|
|||||||
6. Return a list with length truncated at `n_points`
|
6. Return a list with length truncated at `n_points`
|
||||||
'''
|
'''
|
||||||
def unique_list(a_list):
|
def unique_list(a_list):
|
||||||
seen = []
|
new_list = []
|
||||||
for x in a_list:
|
for item in a_list:
|
||||||
key = repr(x)
|
if item not in new_list:
|
||||||
if key not in seen:
|
new_list.append(item)
|
||||||
seen.append(key)
|
return new_list
|
||||||
return [eval(x) for x in seen]
|
|
||||||
i = 0
|
i = 0
|
||||||
asked_non_tried: List[List[Any]] = []
|
asked_non_tried: List[List[Any]] = []
|
||||||
is_random: List[bool] = []
|
is_random: List[bool] = []
|
||||||
|
Loading…
Reference in New Issue
Block a user