def get_float(self, error=False): if isfloat(self.entry.text()): return float(self.entry.text()) if error: raise RuntimeError(self.name + ' could not be interpreted as a number') return self.default
def get_min(self, error=False): min_str = self.min.text() if isfloat(min_str): return float(min_str) if error: raise RuntimeError('Minimum bound not a number') return -np.inf
def get_max(self, error=False): max_str = self.max.text() if isfloat(max_str): return float(max_str) if error: raise RuntimeError('Maximum bound not a number') return np.inf
def get_start(self, error=False): start_str = self.start.text() if isfloat(start_str): return float(start_str) if error: raise RuntimeError('Start not a number') return 1
def get_float(self): if isfloat(self.entry.text()): return float(self.entry.text()) return self.start