[SciPy-user] Pros and Cons of Python verses other array environments

John Hassler hasslerjc at adelphia.net
Thu Sep 28 14:37:49 CDT 2006

I really don't agree that "python is slightly harder to figure out for 
complete beginners" (Gael). (You knew SOMEBODY would be disagreeable).  
I've used/taught Matlab, Mathcad, Scilab, and Python ... not to mention 
Fortran, QBasic, VBasic, etc.

In Python, I click on Idle and start calculating.  Maybe I have to 
"import math," but that's it.  Sure, there are some points I have to 
know, but believe me, it's a lot easier than starting a beginner on 
Mathcad.  Scilab is very similar to Matlab (except that Scilab is free, 
and has a nicer syntax for functions).  If I want array calculations, 
it's one more "import," but otherwise no more difficult than Matlab and 
friends, and much easier than Mathcad.

Now, suppose I want to do something a little more complicated, and I 
want a function.  In Python (and Scilab), I can define the function on 
the fly, and then use it.  In Matlab, I have to save the function in an 
"m-file" before I can use it, which brings up all kinds of problems of 
where to put the file, what to name it, etc.  Easy enough for us, maybe, 
but not for our prototypical "complete beginner."  (It's also not 
esthetically pleasing ... but that's a different problem.)  In Mathcad, 
simple functions are pretty easy; complex ones are pretty not easy, but 
there's a fair bit to learn before you can make any of them work.

I wouldn't expect a student to write functions in any of these without 
at least some background, and the required background in Python is 
certainly no more than that in any of the others.  The biggest 
difference, for me, is that Python can "keep going."  
Matlab/Scilab/Mathcad all hit the wall fairly quickly, in terms of 
program size and/or complexity.

But my real peeve is that Matlab is incomplete (batteries NOT 
included).  I'm "visiting faculty" (hired help - I've retired, but I'm 
teaching a course).  There came a point where we needed to solve a small 
set of simultaneous nonlinear equations.  The students here are required 
to have Matlab, so I said, "Just call up fsolve."  Oops.  In Matlab, 
that's not in the student version.  They'd have to buy the "optimization 
toolbox" to get it.  EVERY other math system has it ... but it costs 
extra in Matlab.

I wasn't fond of Matlab before that, but that little incident really 
soured me on it.  (So I taught them flowsheet tearing.  If you know what 
that is, you're a Chemical Engineer, and you're old.)

I've never taught Python to "complete beginners," but I _have_ taught 
Matlab and Mathcad, and I can't imagine that Python would be any more 
difficult to teach.  Maybe a beginners tutorial aimed at scientific 
calculation would help (although they exist on the web), but I think 
that the problem is really more of perception than reality.


Gael Varoquaux wrote:
> I agree with Rob that python is slightly harder to figure out for
> complete beginners. And I agree that it lacks integration. I would like
> to have a application, with an icon on the Desktop, or in the menus,
> that you can start, and start right away typing calculations in, without
> importing packages, figuring out how with shell use, it might even have
> an editor. It would have proper branding, look pretty, have menus
> (including a help menu that would give help on python, scipy, and all
> the other packages)...
> I am (as everybody) lacking time to do this but I see enthought's
> envisage a good starting point for this. It seems possible to integrate
> pylab to it, in order to have dockable pylab windows. It already has an
> editor and a shell. The shell is not as nice as ipython: it is pycrust,
> but I hope one day ipython will be easy to integrate in wxpython
> applications, and that it will have syntax highlighting and docstrings
> popup like pycrust (beginners really love that).
> I think developing such an application would definitely help our
> community get more exposure. I know this will not interest the people
> who are currently investing a lot of time on scipy/ipython, as they are
> aiming for the other end of the spectrum: difficult tasks where no good
> answers are available, like distributed computing. I think that we
> should still keep this in mind, and as pycrust, envisage, and other
> inegration tools make progress see if and when we can put together such
> application. Maybe we should put up a wiki page to throw down some ideas
> about this.
> Gaël
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list