On Thursday, October 30, 2014 10:57:53 PM UTC-7, [email protected] wrote:
>
> def Sch(t,y):
>     return [ -i*sum(f[j,k]*y[j] for k in range(2^L)) for j in 
> range(2^L)]   
>
Your error is here 

sage: Sch(1,[1,2,3,4])
[-6*t, 0, 9/2*t - 9/2, -24*t]

as you can see, you're returning a vector that has a symbolic t in it. GSL 
doesn't like that and I suppose it's not accoring to GSL's specification.

You should be substituting t for the input value:

    def Sch(t0,y):
        return [ (-i*sum(f[j,k]*y[j] for k in range(2^L)))(t=t0) for j in 
range(2^L)]  

does the trick (at least no error arises). It's not strictly necessary to 
write t0 instead of t, but it makes for slightly less confusing code.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to