Accepts: float
        Returns: float
12850
def publish(self, value):
        
        value = super(Float, self).publish(value)
        if isinstance(value, int):
            value = float(value)
        return value
61324
def values(self):
        
        lower = float(self.lowerSpnbx.value())
        upper = float(self.upperSpnbx.value())
        return (lower, upper)
208370
def is_float(obj):
    
    is_f = isinstance(obj, float)
    if not is_f:
        try:
            float(obj)
            is_f = True
        except (ValueError, TypeError):
            is_f = False
    return is_f and not is_bool(obj)
1215585
def __convert_num(number):
        
        try:
            return float(number)
        except ValueError as e:
            logger_noaa_lpd.warn("convert_num: ValueError: {}".format(e))
            return number
1242089
def float(self, **kwargs):
        
        for key in kwargs:
            setattr(self, key, kwargs[key])
        self.command = self.COMMAND_FLOAT
514217
def validate_float(cls, value):
        
        if not isinstance(value, (int, float)):
            raise TypeError(
                "value must be a number, got %s" % type(value)
            )
549576
def _timeout_to_float(self, timeout):
        
        if timeout is not None:
            try:
                timeout_float = float(timeout)
            except ValueError:
                raise ValueError(
                    'timeout_sec must be a valid number or None. timeout="{}"'.format(
                        timeout
                    )
                )
            if timeout_float:
                return timeout_float
139304
def float2int(x):
    
    if not pd.isnull(x):
        if is_numeric(x):
            x=int(x)
    return x
469939
def is_floating(self):
        """"""
        return (
            self.is_numpy_compatible and np.issubdtype(self.as_numpy_dtype, np.floating)
        ) or self.base_dtype == bfloat16
1071312
def ber(tp, tn, fp, fn):
    
    return (fp / float(tn + fp) + fn / float(fn + tp)) / 2
311721
def getFloat(self, name, default=0.0, parent_search=False, multikeys_search=False):
		
		try:
			value = self.get(name, default, parent_search, multikeys_search)
			return float(value)

		except:
			# pas de configuration trouvé ou convertion impossible ?
			return default
115428
def get_float(prompt=None):
    
    while True:
        s = get_string(prompt)
        if s is None:
            return None
        if len(s) > 0 and re.search(r"^[+-]?\d*(?:\.\d*)?$", s):
            try:
                return float(s)
            except ValueError:
                pass

        # Temporarily here for backwards compatibility
        if prompt is None:
            print("Retry: ", end="")
1028796
def decimals(self):
        
        self._decimals, value = self.get_attr_int(self._decimals, 'decimals')
        return value
269283
def convert_value(self, value):
        """"""
        if isinstance(value, str):
            value = value.replace(self.separator, '')
            if self.decimal_point not in value:
                return int(value)
            else:
                return float(value.replace(self.decimal_point, '.'))
        elif self.int_to_float:
            return float(value)
        else:
            return value
52608
def get_float(self, key, default=None):
        
        value = self.get(key, default)
        return None if value is None else float(value)
377981
def round_float(f, digits, rounding=ROUND_HALF_UP):
    
    return Decimal(str(f)).quantize(Decimal(10) ** (-1 * digits),
                                    rounding=rounding)
175634
def validate(self, value):
        
        if isinstance(value, (str, unicode, int, long)):
            value = float(value)
        value = super(Float, self).validate(value)
        if not isinstance(value, (float)):
            raise ValueError("Not an float: %r" % (value, ))
        return value