583fbccfb801eeb02e4385d8ad8df62046678450,studio/optimizer_plugins/cmaes.py,Optimizer,__unpack_solution,#Optimizer#Any#,61

Before Change


        for i in xrange(len(solution)):
            name = self.itoname[i]
            solution_dict[name] = solution[i]
            solution_dict[name] = min(1.0, max(0.0, solution_dict[name]))
            solution_dict[name] = self.__unscale_var(solution_dict[name],
                self.bounds[i][0], self.bounds[i][1])
            if self.log_scale_dict[name]:
                solution_dict[name] = math.exp(solution_dict[name])
        return solution_dict

After Change


            else:
                h.values = solutution[h.index: h.index + h.array_length]
            if not h.unbounded:
                h.values = np.clip(h.values, h.min_value, h.max_value)
            h.values = self.__unscale_var(h.values, h.min_value, h.max_value)
            if h.is_log:
                h.values = np.exp(h.values)
            if h.array_length is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: studioml/studio
Commit Name: 583fbccfb801eeb02e4385d8ad8df62046678450
Time: 2017-08-26
Author: jasonzliang@utexas.edu
File Name: studio/optimizer_plugins/cmaes.py
Class Name: Optimizer
Method Name: __unpack_solution


Project Name: matplotlib/matplotlib
Commit Name: bad265755784a5e6c142d233c9ff67ec1708d620
Time: 2017-06-09
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/backend_tools.py
Class Name: ToolZoom
Method Name: _mouse_move


Project Name: matplotlib/matplotlib
Commit Name: a1b5e5d281b9b08e99d5ddfb98c67e42dceffddb
Time: 2020-04-13
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/widgets.py
Class Name: _SelectorWidget
Method Name: _get_data