| Total Complexity | 2 | 
| Total Lines | 12 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | import numpy as np | ||
| 4 | class PositionUpdater: | ||
| 5 | def __init__(self, stage): | ||
| 6 | self.stage = stage | ||
| 7 | self.lower_bounds = np.asarray(self.stage.lower_bounds) | ||
| 8 | self.upper_bounds = np.asarray(self.stage.upper_bounds) | ||
| 9 | |||
| 10 | |||
| 11 | def set_initial_control_params(self): | ||
| 12 | random = np.random.rand(len(self.stage.control_params)) | ||
| 13 | delta = self.upper_bounds - self.lower_bounds | ||
| 14 | control_params = self.lower_bounds + random * delta | ||
| 15 | self.stage.control_params = control_params.tolist() | ||
| 16 | |||
| 19 | 
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.