can't assign value to array element
Roy Smith
roy at panix.com
Sun Nov 3 21:31:04 EST 2002
Joe Heafner <heafnerj at spam.vnet.net> wrote:
> y[j+1] = y+(k1+2.*k2+2.k3+k4)/6.
> When run, this code give the error "TypeError: object does not support
> item assignment"
I didn't follow everything your code is doing, but one thing that
doesn't make sense is that you use y as both a scalar (on the right hand
side) and a list (on the left hand side) in the above statement. I'm
sure that's related to your problem.
More information about the Python-list
mailing list