Live data from Hacker News

Python+Scipy+Matplotlib vs Matlab?

news.ycombinator.com

41–45 of 45 posts

Re: Python+Scipy+Matplotlib vs Matlab?

#41
post #39
post #33

Earlier quoted context omitted.

You're misrepresenting the situation a bit. Matlab was not stupid here. The evolutionary algorithm you implemented found a way to satisfy your constraints that you didn't think of. That would have happened regardless of the language you chose. I'm not arguing that Matlab is beautiful - it's not. I have worked in Matlab for years and years, and know most of its ugliness. But your example highlights your frustration wi…

No. The point is that the behavior changes based on whether you are running from the command line or from inside a script, that this is completely arbitrary, and that there was no override possible for this behavior. When run from the command line, simulations for combinations of gains that caused the system to career away did indeed career away, they just continued to do so for the full length of time specified in t…

Please accept my apology.

It seems I didn't read the final paragraph in your original post very well.

I was not defending a weakness of Matlab, but instead misunderstood what you said. Indeed, I'm a pretty harsh Matlab critic myself because I know its ugly parts well.

(edit: grammar)

Re: Python+Scipy+Matplotlib vs Matlab?

#42
post #34

integer division JUST KILLS Python for scientific computing, it introduces the most disgusting silent errors everywhere. And the visualization functions generally suck compared to the handy plot() of Matlab. Still, Py handily beats other free alternatives to Matlab

Two comments about this:

1. In Python 3.0, integer division will return a float, e.g., 1/3 will be 0.3333... At Scipy 2006, Guido explicitly stated in his keynote talk that the design choice he made in Python (i.e., that n/m is floor(n/m)) was a mistake.

2. In Sage (http://sagemath.org), which is built on Python, we do some very minimal preparsing of input, so that 1/3 is the exact rational number 1/3 (instead of Python's stupid 1/3 == 0). We also replace, e.g., 2^3 by 23. Sage is does a lot of exact symbolic and high precision arithmetic, so 1/3 staying the rational 1/3 makes sense as the default (though one can easily change this).

Disclaimer: I started the Sage project.

Re: Python+Scipy+Matplotlib vs Matlab?

#43
Tastes vary (as the mix of comments here will attest), but having sampled a variety of development and analysis tools, I have settled on MATLAB as my tool of choice. Part of my reasoning can be found in the Nov-08-2006 posting to my Weblog, "Why MATLAB for Data Mining?":

http://matlabdatamining.blogspot.com/2006/11/why-matlab-for-...

Re: Python+Scipy+Matplotlib vs Matlab?

#44

I'm going to say the unthinkable here: In my Information Retrieval class, I got numpy/scipy set up and went about implementing homework assignments with it. However, no matter how much I tried to push as much as possible down into the matrix libraries implemented in C/C++, the surrounding Python code slowed everything down. I was having trouble getting everything to finish in time to hand in my homework by the deadli…

I've been wondering, are there Java libs as good as numpy/scipy? Sure, in general Java has more libraries but is that true when it comes to math?

Oh, and great call on Clojure. I've been having fun with it too.

Re: Python+Scipy+Matplotlib vs Matlab?

#45

Tastes vary (as the mix of comments here will attest), but having sampled a variety of development and analysis tools, I have settled on MATLAB as my tool of choice. Part of my reasoning can be found in the Nov-08-2006 posting to my Weblog, "Why MATLAB for Data Mining?": http://matlabdatamining.blogspot.com/2006/11/why-matlab-for-...

I am a climate scientist and Matlab offers a lot to me : great matrix syntax, very fast algorithms (SVD, matrix inversion, FFT), large mindshare (cf Central File Exchange), and advanced toolboxes for statistics, spectral analysis and the like. Not being a programmer by birth, I couldn't care less about the fact that it's not a general purpose language ; it is very adequate for my own purpose.

BUT... it is proprietary, pretty expensive, and at the moment I am considering problems that require parallel computations on dozens of CPU. Matlab has a Parallel Computation Toolbox that is a joke (Does NumPy enable parallel computations ? Is it reasonably easy to translate Matlab code into NumPy ? Is there a good library of linear algebra routines (like SVD, eigendecompositions, inversions, LU, Cholesky decompositions, etc..) ? A large user community with a comprehensive archive ?

Post reply on HN