In a function I'm writing, I multiply two arrays together: A and B.  
where A.ndim == 2 and I don't know B.ndim in advance

If I knew B.ndim == 3,   then I would write    
A[:,:,newaxis,newaxis,newaxis]*B[newaxis,newaxis,...]

or if I knew that B.ndim == 1  then I would write 
A[:,:,newaxis*B[newaxis,newaxis,...]

but I don't know B.ndim.  Essentially I want to say something like:
A[:,:,repeat(newaxis, B.ndim)]*B[newaxis,newaxis,...]

How can I express what I mean, such that it actually works?

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to