On 1/7/2009 6:56 PM, Christopher Barker wrote: >> So for simple loops python looses, but for other things, python wins >> by a huge margin. > > which emphasizes the point that you can't write code the same way in the > two languages, though I'd argue that that code needs refactoring in any > language!
Roux example would be bad in either language. Slices ('vectorization' in Matlab lingo) is preferred in both cases. It's just that neither Matlab nor Python/NumPy was designed to be used like Java. For loops should not be abused in Python nor in Matlab (but Matlab is more forgiving now than it used to be). Sturla Molden _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion