3 ms·
A question: can anyone list some reasons why one might choose Octave over Scipy, or vice versa? (Not trolling, just curious. I've never used Octave, but I'm cu
by yummyfajitas 16y ago
A question: can anyone list some reasons why one might choose Octave over Scipy, or vice versa?
(Not trolling, just curious. I've never used Octave, but I'm curious whether I should try.)
- rflrob 16y agoThe main reason to use Octave over Scipy is direct compatibility with Matlab code. Installation may also be a hair easier (I'm not sure on this point) As someone who switched from Matlab (student license) to Scipy, I've come to the conclusion that Octave is a solution to the wrong problem. While non-student Matlab licenses are expensive, Matlab itself is also a crufty language that, once you exceed its core domain of "problems that only require (or can easily be represented as) N-dimensional arrays", quickly tends to spiral out of control. I've had this happen to me. Python, on the other hand, is a language that is already quite elegant, and the Scipy packages can allow for almost-verbatim translation of some Matlab code, but without losing a lot of other power and flexibility.
- gaius 16y agoRemember that MATLAB started life as an interpreter written in FORTRAN for doing matrix maths interactively. It's a little unfair to compare it to something that came much later. The guys at Mathworks could have written an all-new language as good as Python (or embedded a language like Tcl or Scheme) at any time - they chose to retain backwards compatibility instead. That may be the wrong call aesthetically or technically, but I bet it was the right call commercially.
- rflrob 16y ago> It's a little unfair to compare it [MATLAB] to something that came much later. You're certainly right that's it's not really a fair fight between the languages. WRT Octave, though, anyone for whom a MATLAB license is too expensive probably doesn't have the mountain of legacy code that would be required for me to justify staying with a technically and aesthetically less pleasant language.
- fluidcruft 16y agoFor me the biggest draws are a syntax that is closer to numerics and the C++ API for extensions. Scipy code looks clunky to me with a lot of distracting and irrelevant characters, but I'm probably just not used to it. Another difference is that Octave uses pass-by-value semantics with a copy-on-write implementation whereas I think scipy uses pass-by-reference. There are pros and cons to both approaches. I think in interactive use Octave is better able to recover from errors without trashing your data which is nice for quick calculations.