def _floatfmt(val):

    if int(val) == val:
        return "%.1f"
    else:
        return "%.16g"
Synonym for case-insensitive grep.
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/util/namelist_util.py/_floatfmt--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/utils/text.py/igrep