On 7/7/06, Martin Wiechert <[EMAIL PROTECTED]> wrote: > Hi all, > > for me > > M [ix_(I, J)] > > does not work if I, J are boolean arrays. Is this intended or a bug/missing > feature? > > And is there a way (other than I = where (I) [0] etc.) to make it work? > > Thanks, > Martin
it is a recent feature. It works for me on version '0.9.9.2660' pau >>> import numpy >>> numpy.__version__ '0.9.9.2660' >>> a = numpy.rand(3,4) >>> a array([[ 0.24347161, 0.25636386, 0.64373189, 0.82730095], [ 0.02062571, 0.12244009, 0.60053928, 0.10624435], [ 0.75472591, 0.00614411, 0.75388955, 0.40481918]]) >>> I = a[:,0]<0.5 >>> J = a[0,:]<0.5 >>> a[numpy.ix_(I,J)] array([[ 0.24347161, 0.25636386], [ 0.02062571, 0.12244009]]) 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