Skip to content

Commit

Permalink
MAINT add file I forgot to upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeurer committed Feb 14, 2017
1 parent 3f37e01 commit 15b442c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions smac/configspace/util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import List

import numpy as np

from smac.configspace import Configuration


def impute_inactive_hyperparameters(configs: List[Configuration]) -> np.ndarray:
configs_array = np.array([config.get_array() for config in configs],
dtype=np.float64)
configs_array[~np.isfinite(configs_array)] = -1
return configs_array

0 comments on commit 15b442c

Please sign in to comment.