[Numpy-discussion] matlab to numpy help

Gabriel J.L. Beckers beckers@orn.mpg...
Sun Dec 23 11:52:38 CST 2007

I found a matlab script that I want to translate into numpy, but have
difficulties with understanding indexing in matlab. I haven't used
matlab very much and I was hoping that someone could help with the

It says:

	Uns = ones(1,m);
... and then later


m is a positive integer. The problem is that Xijm should be a
1-dimensional array (I think), so what is Uns doing in the second
statement? Is this some way to expand Xijm into a second dimension? What
would be a numpy equivalent?


More information about the Numpy-discussion mailing list