Sorry for coming very late to the thread, but you mean something like:
for i in range(len(cols):
Alan G Isaac schrieb:> On Mon, 8 Oct 2007, Robin apparently wrote:Robin, Alan is right, you want numpy matrices which are always 2d. Check
>> However in my code (I am converting from MATLAB) it is
>> important to maintain 2d arrays, and keep the difference
>> between row and column vectors.
>
> How about using matrices?
> help(numpy.mat)
>
> hth,
> Alan Isaac
>
out numpy.matlib; if you replace
from numpy import [whatever]
by
from numpy.matlib import [whatever]
you get everything there is in numpy, and things like ones() zeros()
empty() etc. will always be 2d matrices.
-sven
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion