Skip to content

Commit df90d82

Browse files
committed
work around for numpy issue with casting recarrays
see numpy/numpy#3256 for problem
1 parent 5fc0ff1 commit df90d82

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/expWorkbench/ema_optimization.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ def evaluate_population_outcome(population, ri, toolbox, ensemble):
120120
ordering.pop(ordering.index('policy'))
121121

122122
indices = {}
123-
experiments = experiments[ordering].tolist()
124-
for i in range(len(experiments)):
125-
experiment = tuple(experiments[i])
123+
for i in range(experiments.shape[0]):
124+
experiment = experiments[i]
125+
experiment = [experiment[unc] for unc in ordering]
126+
experiment = tuple(experiment)
127+
126128
indices[experiment] = i
127129

128130
for member in population:

0 commit comments

Comments
 (0)