TypeError: unsubscriptable object
Steve Tregidgo
smst at bigfoot.com
Thu Jun 8 05:30:16 EDT 2000
More information about the Python-list mailing list
Thu Jun 8 05:30:16 EDT 2000
- Previous message (by thread): TypeError: unsubscriptable object
- Next message (by thread): TypeError: unsubscriptable object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Cyrille, Cyrille Artho wrote: > [code snipped] # Problem line: > P = 1 / (1 + math.exp(-sum)) # Exception raised by attempts to acces P[i] > self.W[i][j] = self.W[i][j] + n * ( > r(S[i] - P[i]) - alpha * (1 - r) > * (S[i] - (1 - P[i]))) * I[j] There's your problem -- on line 43 you assign a number to P, which you later try to access as if it were a sequence object. Python reports the error (on physical line 74) as being on line 73, which is how it sees the whole statement. HTH, Steve -- Steve Tregidgo Software Developer http://www.businesscollaborator.com
- Previous message (by thread): TypeError: unsubscriptable object
- Next message (by thread): TypeError: unsubscriptable object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list