Skip to content

Commit

Permalink
fix subtle bug related to shape 1 or (1,) for doe
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Jun 11, 2020
1 parent d58845c commit bac3d9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/models/meta_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ def training_input_values
end

def training_output_values(varname, coord_index)
@training_outputs = operation.output_cases
.detect {|c| c.variable.name == varname && c.coord_index == coord_index}.values
@training_outputs = operation.output_cases.detect do |c|
c.variable.name == varname &&
(c.coord_index == coord_index ||
(c.variable.dim == 1 && coord_index == 0)) # manage case where output is typed (1,) while DOE data (ie cases) are pushed as scalar
end
@training_outputs.values
end

def qualification
Expand Down

0 comments on commit bac3d9b

Please sign in to comment.