[Numpy-discussion] Numpy performance vs Matlab.

David Warde-Farley dwf at cs.toronto.edu
Wed Jan 7 16:41:53 EST 2009


On 7-Jan-09, at 2:26 PM, Sturla Molden wrote:

> Matlab does not have broadcasting. Array shapes must always match.

Not totally true. They introduced a clunky, clunky syntax for it in  
version 7, IIRC, called 'bsxfun'.

See http://tinyurl.com/9e7kyt . It's a better solution than indexing  
with a huge ones() or repmat()'ing all over the place, but not nearly  
as nice as NumPy overloading.

David



More information about the NumPy-Discussion mailing list