On 8-Jul-09, at 4:19 AM, Pauli Virtanen wrote:

> Tue, 07 Jul 2009 21:30:06 -0500, alan kirjoitti:
>> Mathematica vs Matlab vs Python
>>
>> http://www.larssono.com/musings/matmatpy/index.html
>
> The Python code there is not very idiomatic Numpy code. It's written  
> for
> Numeric, and fancy indexing etc. are not used.
>
> Seems like the author also left it as an exercise for the reader to
> implement the data file parser in Matlab. I doubt it can be easily  
> done
> in 20 lines :)

Yup. It's not even very idiomatic Python. readlines() is probably a  
bad idea unless your file is trivial length, and even ignoring  
numpy.loadtxt(), all of this could be considerably simplified with the  
built-in csv module.

David
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to