def get_real_sol(IC):
    """Return a pointset solution based on an explicit solution of the
    ODE when it has purely real eigenvalues
    """
    c1, c2 = np.dot(np.linalg.inv(array([ev1, ev2]).T), fp.point-IC)

    # define a local function that uses c1, c2, and some of the globals
    def real_sol(t):
        """Demonstration of explicit solution:
        Only works for non-oscillatory solutions
        with real eigenvalues!

        Accepts single scalars only
        """
        assert isreal(e1)
        assert isreal(e2)
        return c1*ev1*np.exp(e1*t) + c2*ev2*np.exp(e2*t) + fp.point

    # make times
    ts = linspace(0, 7, 500)
    # empty state points list
    vs = []
    for t in ts:
        # appends array for each t
        vs.append(real_sol(t))

    # change vs from list of arrays to 2 x N array
    # transposed so that vs[0] is all x values,
    # vs[1] is all y values
    vs = array(vs).T
    return Pointset(coorddict={'x': vs[0], 'y': vs[1]},
                    indepvararray=ts)
dataset/ETHPy150Open robclewley/compneuro/linear_ODE_2D.py/get_real_sol/swapped operands of `-`