summaryrefslogtreecommitdiff
path: root/lib/utils/string.py
blob: cb852ce3ded831042e5c2a7dfa0dc47e1f16a543 (plain)
1
2
3
4
5
6
7
8
9
10
# Authors: see git history
#
# Copyright (c) 2010 Authors
# Licensed under the GNU GPL version 3.0 or later.  See the file LICENSE for details.

def string_to_floats(string, delimiter=","):
    """Convert a string of delimiter-separated floats into a list of floats."""

    floats = string.split(delimiter)
    return [float(num) for num in floats]