@@ -235,7 +235,7 @@ def get_hyperparam(name: str, default, supported_values=list()):
235235 self .invalid_value = 1e20
236236 self .opt_direction = opt_direction
237237 if opt_direction == "min" :
238- self .worst_value = np .PINF
238+ self .worst_value = np .inf
239239 self .argopt = np .argmin
240240 elif opt_direction == "max" :
241241 self .worst_value = np .NINF
@@ -262,7 +262,7 @@ def get_hyperparam(name: str, default, supported_values=list()):
262262 self .__visited_num = 0
263263 self .__visited_valid_num = 0
264264 self .__visited_searchspace_indices = [False ] * self .searchspace_size
265- self .__observations = [np .NaN ] * self .searchspace_size
265+ self .__observations = [np .nan ] * self .searchspace_size
266266 self .__valid_observation_indices = [False ] * self .searchspace_size
267267 self .__valid_params = list ()
268268 self .__valid_observations = list ()
@@ -311,7 +311,7 @@ def is_not_visited(self, index: int) -> bool:
311311
312312 def is_valid (self , observation : float ) -> bool :
313313 """Returns whether an observation is valid."""
314- return not (observation is None or observation == self .invalid_value or observation == np .NaN )
314+ return not (observation is None or observation == self .invalid_value or observation == np .nan )
315315
316316 def get_af_by_name (self , name : str ):
317317 """Get the basic acquisition functions by their name."""
0 commit comments