This page is intended to help people evaluate the benefits of some commercial packages against Python+NumPy+SciPy+Matplotlib+IPython (PyLab) for scientific computing. This is done by listing the advantages of PyLab and its disadvantages compared to other packages. Basic functionality is similar enough that the detailed stylistic differences are not necessary to document here.
PyLab Advantages
- Modern language with great builtin-objects, widely used, does everything (graphics, networking, databases, OS interaction, encryption, etc.)
- Uncompromisingly object-oriented: anything you should be able to do in an OO language, you can
- Uncompromisingly interactive: you can change objects and even classes on the fly
- No superfluous syntactic junk - no excess commas (IDL), semicolons and braces (C), parentheses (LISP), command words ("CALL") and strict columns (FORTRAN)
- Featureful extended library means sophisticated, large-scale programs can be written quickly.
- Designed to access your C/C++/FORTRAN routines to extend language or access legacy code
- Hundreds of third-party libraries (because of the previous point) that allow Python to do almost anything a computer can do
- Everything is passed by reference rather than by value
NumPy arrays - A multi-dimensional array object containing any data type including complex objects
- Highly elaborate vector operations possible in simple, clear syntax
- Unary and binary vector operations go at machine speed
- Slicing gives a view into an array rather than a copy
- Data types in arrays can include misaligned, non-native byte-order formats
- Record arrays allow addressing rows/columns by name rather than number
- Large data files (many TB) can be memory-mapped to arrays so that only what's needed is read/written
- Algorithms (mostly) based on fast, robust legacy code
- Libraries available to input and output binary files in a variety of formats (raster images in practically any consumer format, CDF, FITS (astronomy), MATLAB or IDL save formats, ...)
A variety of different tools is available to accelerate key pieces of code (see PerformancePython for a comparison)
- Free as in 'beer' and as in 'speech'
- No licensing issues --- you are not becoming dependent on a single vendor
- Source code is available, so you can see what is really being done
PyLab Disadvantages (compared with MATLAB)
- nothing quite like Simulink
- not as much documentation
- not as much functionality in select areas (assuming you've purchased all the toolboxes)
- smaller user-base
- verbose-ness in code that does a lot of linear algebra caused by switching between arrays and matrices. This is due to not having two in-fix operators to represent array multiplication and element-by-element multiplication.
- package functionality is sometimes duplicated
- moving target; many bugs in older versions
- often difficult to determine which of the many packages available on the Net is needed to solve your problem
- IDEs not as integrated or as easy to use (especially for profiling)
PyLab Disadvantages (compared with Maple)
- no graphical representation of formulas
- no arbitrary-precision floating-point
- no equivalent of "notebooks"
no built-in symbolic manipulation (SymPy is coming along nicely though.)
PyLab Disadvantages (compared with Mathematica)
- no equivalent of "notebooks"
no built-in symbolic manipulation (SymPy is coming along nicely though.)
Some of these deficiencies are expected to be remedied by packages now in development. See PyLabAwaits
User testimony on comparing the MatLab/PyLab comparison.
See also NumPyProConDiscussion for a more free-form page.