{ } Raw JSON

bundles / astropy latest / astropy / extern / configobj / validate / is_float_list

function

astropy.extern.configobj.validate:is_float_list

source: /astropy/extern/configobj/validate.py :1157

Signature

def   is_float_list ( value min = None max = None )

Summary

Check that the value is a list of floats.

Extended Summary

You can optionally specify the minimum and maximum number of members.

Each list member is checked that it is a float.

>>> vtor.check('float_list', ())
[]
>>> vtor.check('float_list', [])
[]
>>> vtor.check('float_list', (1, 2.0))
[1.0, 2.0]
>>> vtor.check('float_list', [1, 2.0])
[1.0, 2.0]
>>> vtor.check('float_list', [1, 'a'])
Traceback (most recent call last):
VdtTypeError: the value "a" is of the wrong type.

Aliases

  • astropy.config.configuration.validate.is_float_list