def METHOD_NAME(s):
    """
    Simplistic converter of strings from repr to float NumPy arrays.
    If the repr representation has ellipsis in it, then this will fail.
    Parameters
    ----------
    s : str
        The repr version of a NumPy array.
    Examples
    --------
    >>> s = "array([ 0.3,  inf,  nan])"
    >>> a = str_to_array(s)
    """
    import numpy as np
    # Need to make sure eval() knows about inf and nan.
    # This also assumes default printoptions for NumPy.
    from numpy import inf, nan
    if s.startswith(u'array'):
        # Remove array( and )
        s = s[6:-1]
    if s.startswith(u'['):
        a = np.array(eval(s), dtype=float)
    else:
        # Assume its a regular float. Force 1D so we can index into it.
        a = np.atleast_1d(float(s))
    return a