title: Is there an equivalent to the MATLAB function bsxfun in python?
body: <p>I'm trying to port some of my code from matlab to python, and some of it uses the bsxfun() function for virtual replication followed by multiplication or division (I also use it for logical operations). I'd like to be able to do this without actually replicating the vector (either with a function or with some kind of diagonal matrix) before multiplying or dividing to save on memory and time.</p>
  
  <p>If there's an equivalent of bsxfun in a C library of some kind, that would of course also work.</p>