On 10/18/06, Daniel Arbuckle <[EMAIL PROTECTED]> wrote:
> Why does a[b1, b2] not mean the same thing as a[b1][:, b2], when "a"
> is an array and "b1" and "b2" are appropriately sized arrays of
> booleans?

>From my previous experience with R I am used to a[b1, b2] being
equivalent to a[b1][:, b2], so this is a little strange to me as well.
In numpy I think you need to use the function ix_ to get the cross
product.

e.g. a[ix_(b1,b2)] is equivalent to a[b1][:, b2]

a[b1,b2] raises an error about a type mismatch. I have no idea what
this syntax is supposed to do in numpy.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to