[Numpy-discussion] Mathematica vs Matlab vs Python
Wed Jul 8 14:45:42 CDT 2009
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
> The Python code there is not very idiomatic Numpy code. It's written
> 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
> 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.
More information about the NumPy-Discussion