pySAXS.tools.isNumeric — pySAXS 77.September2012 documentation

### Navigation

- index
- modules |
- pySAXS 77.September2012 documentation »
- Module code »

# Source code for pySAXS.tools.isNumeric

    '''
    tools package for numbers
    '''
    def isNumeric(val):
        ''' return true if val is a numeric value
        '''
        try:
            i = float(val)
        except ValueError, TypeError:
            # not numeric
            return False
        else:
            # numeric
            return True

### Navigation

- index
- modules |
- pySAXS 77.September2012 documentation »
- Module code »