Fetches a float parameter via :func:`get_string`.
3146
def get_float(strings: Sequence[str],
              prefix: str,
              ignoreleadingcolon: bool = False,
              precedingline: str = "") -> Optional[float]:
    
    return get_float_raw(get_string(strings, prefix,
                                    ignoreleadingcolon=ignoreleadingcolon,
                                    precedingline=precedingline))
362996
def print_float(self, value, decimal_digits=2, justify_right=True):
        
        format_string = '{{0:0.{0}F}}'.format(decimal_digits)
        self.print_number_str(format_string.format(value), justify_right)
752854
def get_float_value(self, section, option, default=0.0):
        """"""
        try:
            return self.parser.getfloat(section, option)
        except NoOptionError:
            return float(default)
1101220
def positive_float(string):
    """"""
    error_msg = 'Positive float required, {string} given.'.format(string=string)
    try:
        value = float(string)
    except ValueError:
        raise ArgumentTypeError(error_msg)
    if value < 0:
        raise ArgumentTypeError(error_msg)
    return value
321143
def get_float_relative(strings: Sequence[str],
                       prefix1: str,
                       delta: int,
                       prefix2: str,
                       ignoreleadingcolon: bool = False) -> Optional[float]:
    
    return get_float_raw(get_string_relative(
        strings, prefix1, delta, prefix2,
        ignoreleadingcolon=ignoreleadingcolon))
269801
def from_string(cls, prjs):
        
        def parse(v):
            try:
                return int(v)
            except ValueError:
                pass
            try:
                return float(v)
            except ValueError:
                return v

        parts = [o.lstrip('+') for o in prjs.strip().split()]

        items = map(
            lambda kv: len(kv) == 2 and (kv[0], parse(kv[1])) or (kv[0], True),
            (p.split('=') for p in parts))

        return cls({k: v for k, v in items if '+'+k in PROJ4_PARAMS.keys()})
685790
def read_float(self):
        """"""
        self.bitcount = self.bits = 0
        return unpack('>d', self.input.read(8))[0]
1482
public float getFloat(String name, float defaultValue) {
        try {
            String value = getString(name, null);
            if (!StringUtils.isNullOrEmpty(value)) {
                return Float.parseFloat(value.trim());
            }
        } catch (NumberFormatException e) {
            log.warn("Failed to parse float for " + name + USING_DEFAULT_OF
                + defaultValue);
        }

        return defaultValue;
    }
1196034
def get_string(self, offset, length):
        
        return struct.unpack(str(length) + "s", self.data[
                                                offset:offset + length
                                                ])[0]
1095713
def numberize(string):
    ''''''
    if not isinstance(string,basestring):
        return string
    just_int = r'^\s*[-+]?\d+\s*$'
    just_float = r'^\s*[-+]?\d+\.(\d+)?\s*$'
    if re.match(just_int,string):
        return int(string)
    if re.match(just_float,string):
        return float(string)
    return string
291148
public static Float parseFloat(final String str) {
        if (null != str) {
            try {
                return new Float(Float.parseFloat(str.trim()));
            } catch (final Exception e) {
                // :IGNORE:
            }
        }
        return null;
    }
1272784
def get(self, col_str):
        '''
        

        '''
        data_column=zeros(self.ilines)
        for i in range(self.ilines):
            data_column[i]=self.data[i][self.col_num[col_str]]
        return data_column
787178
def get_output_str(item, detect_numerics, precision, sign_value):
    """"""
    if detect_numerics:
        item = _convert_to_numeric(item)
    if isinstance(item, float):
        item = round(item, precision)
    try:
        item = '{:{sign}}'.format(item, sign=sign_value)
    except (ValueError, TypeError):
        pass
    return to_unicode(item)
535618
def convert_string(string):
    
    if is_int(string):
        return int(string)
    elif is_float(string):
        return float(string)
    elif convert_bool(string)[0]:
        return convert_bool(string)[1]
    elif string == 'None':
        return None
    else:
        return string
1069706
def __get_float(section, name):
    """"""
    try:
        return float(section[name])
    except (ValueError, TypeError, KeyError):
        return float(0)
1082308
def value(self):
        
        if self.opts['int']:
            return int(self.val)
        else:
            return float(self.val)
1314957
def float(self, item, default=None):
        
        try:
            item = self.__getattr__(item)
        except AttributeError as err:
            if default is not None:
                return default
            raise err
        return float(item)