From: Josh C. <jc...@nc...> - 2011-06-30 16:37:26
|
On Wed, 29 Jun 2011, arvaniti wrote: > so when i try > > for i in range(r): > for j in range(c): > c[i][j]=in1[i][j] > > I am a syntax error > > TypeError: 'Mat' object does not support indexing Square brackets are necessarily a special case. You'll have to provide __getitem__ and/or __setitem__ (in your class or with %extend). > for i in range(r): > for j in range(c): > c(i,j)=in1(i,j) > > SyntaxError: can't assign to function call In Python, it is never possible to assign to a function call, with or without SWIG. BTW, providing just a short, minimal illustration of an issue makes it more likely that you'll get an answer. Josh |