[ ("." in x) and float(x) or int(x) for x in re.findall('(-?[0-9.]+)', line) ]
割とシンプルにいける.