@@ -5,12 +5,12 @@ Scientific Applications
5
5
Context
6
6
:::::::
7
7
8
- Python is frequently used for high-performance scientific applications. Python
9
- is widely used in academia and scientific projects because it is easy to write,
10
- and it performs really well.
8
+ Python is frequently used for high-performance scientific applications. It
9
+ is widely used in academia and scientific projects because it is easy to write
10
+ and performs well.
11
11
12
- Due to its high performance nature, scientific computing in Python often refers
13
- to external libraries, typically written in faster languages (like C, or
12
+ Due to its high performance nature, scientific computing in Python often
13
+ utilizes external libraries, typically written in faster languages (like C, or
14
14
FORTRAN for matrix operations). The main libraries used are `NumPy `_, `SciPy `_
15
15
and `Matplotlib `_. Going into detail about these libraries is beyond the scope
16
16
of the Python guide. However, a comprehensive introduction to the scientific
@@ -24,13 +24,14 @@ Tools
24
24
IPython
25
25
-------
26
26
27
- `IPython <http://ipython.org/ >`_ is an enhanced version of Python interpreter.
28
- The features it provides are of great interest for the scientists. The `inline mode `
27
+ `IPython <http://ipython.org/ >`_ is an enhanced version of Python interpreter,
28
+ which provides features of great interest to scientists. The `inline mode `
29
29
allow graphics and plots to be displayed in the terminal (Qt based version).
30
- Moreover the `notebook ` mode supports literate programming and reproducible science
31
- generating a web-based Python notebook. This notebook allowing to store chunk of
32
- Python code along side to the results and additional comments (HTML, LaTeX, Markdown).
33
- The notebook could be shared and exported in various file formats.
30
+ Moreover, the `notebook ` mode supports literate programming and reproducible
31
+ science generating a web-based Python notebook. This notebook allows you to
32
+ store chunks of Python code along side the results and additional comments
33
+ (HTML, LaTeX, Markdown). The notebook can then be shared and exported in various
34
+ file formats.
34
35
35
36
36
37
Libraries
@@ -45,9 +46,9 @@ problem of running slower algorithms on Python by using multidimensional arrays
45
46
and functions that operate on arrays. Any algorithm can then be expressed as a
46
47
function on arrays, allowing the algorithms to be run quickly.
47
48
48
-
49
49
NumPy is part of the SciPy project, and is released as a separate library so
50
- people who only need the basic requirements can just use NumPy.
50
+ people who only need the basic requirements can use it without installing the
51
+ rest of SciPy.
51
52
52
53
NumPy is compatible with Python versions 2.4 through to 2.7.2 and 3.1+.
53
54
@@ -56,88 +57,90 @@ Numba
56
57
57
58
`Numba <http://numba.pydata.org >`_ is an Numpy aware Python compiler
58
59
(just-in-time (JIT) specializing compiler) which compiles annotated Python (and
59
- Numpy) code to LLVM (Low Level Virtual Machine) ( through special decorators) .
60
- Briefly, Numba using system that compiles Python code with LLVM to code which
60
+ Numpy) code to LLVM (Low Level Virtual Machine) through special decorators.
61
+ Briefly, Numba uses a system that compiles Python code with LLVM to code which
61
62
can be natively executed at runtime.
62
63
63
64
SciPy
64
65
-----
65
66
66
- `SciPy <http://scipy.org/ >`_ is a library that uses Numpy for more mathematical
67
- functions. SciPy uses NumPy arrays as the basic data structure. SciPy comes
68
- with modules for various commonly used tasks in scientific programming, for
69
- example: linear algebra, integration (calculus), ordinary differential equation
70
- solvers and signal processing.
67
+ `SciPy <http://scipy.org/ >`_ is a library that uses NumPy for more mathematical
68
+ functions. SciPy uses NumPy arrays as the basic data structure, and comes
69
+ with modules for various commonly used tasks in scientific programming,
70
+ including linear algebra, integration (calculus), ordinary differential equation
71
+ solving and signal processing.
71
72
72
73
Matplotlib
73
74
----------
74
75
75
76
`Matplotlib <http://matplotlib.sourceforge.net/ >`_ is a flexible plotting
76
77
library for creating interactive 2D and 3D plots that can also be saved as
77
- manuscript-quality figures. The API in many ways reflects that of `MATLAB
78
+ manuscript-quality figures. The API in many ways reflects that of `MATLAB
78
79
<http://www.mathworks.com/products/matlab/> `_, easing transition of MATLAB
79
- users to Python. Many examples, along with the source code to re-create them,
80
- can be browsed at the `matplotlib gallery
80
+ users to Python. Many examples, along with the source code to re-create them,
81
+ are available in the `matplotlib gallery
81
82
<http://matplotlib.sourceforge.net/gallery.html> `_.
82
83
83
84
Pandas
84
85
------
86
+
85
87
`Pandas <http://pandas.pydata.org/ >`_ is data manipulation library
86
- based on Numpy and which provides many useful functions for accessing,
88
+ based on Numpy which provides many useful functions for accessing,
87
89
indexing, merging and grouping data easily. The main data structure (DataFrame)
88
- is close to what could be found in the R statistical package, that is
89
- an heterogeneous data tables with name indexing, time series operations
90
- and auto-alignment of data.
90
+ is close to what could be found in the R statistical package; that is,
91
+ heterogeneous data tables with name indexing, time series operations and
92
+ auto-alignment of data.
91
93
92
94
Rpy2
93
95
----
96
+
94
97
`Rpy2 <http://rpy.sourceforge.net/rpy2.html >`_ is a Python binding for the R
95
- statistical package allowing to execute R functions from Python and passing
96
- data back and forth the two environments. Rpy2 is the object oriented
97
- implementation of the binding based on `Rpy <http://rpy.sourceforge.net/rpy.html >`_.
98
+ statistical package allowing the execution of R functions from Python and passing
99
+ data back and forth between the two environments. Rpy2 is the object oriented
100
+ implementation of the `Rpy <http://rpy.sourceforge.net/rpy.html >`_ bindings .
98
101
99
102
PsychoPy
100
103
--------
101
104
102
105
`PsychoPy <http://www.psychopy.org/ >`_ is a library for cognitive scientists
103
- allowing to create cognitive psychology and neuroscience experiments. The library
104
- handles both presentation of stimuli, scripting of experimental design and
105
- data collection.
106
+ allowing the creation of cognitive psychology and neuroscience experiments.
107
+ The library handles presentation of stimuli, scripting of experimental design
108
+ and data collection.
106
109
107
110
108
111
Resources
109
112
:::::::::
110
113
111
- Installation of scientific Python packages can be troublesome. Many of these
112
- packages are implemented as Python C extensions which need to be compiled.
114
+ Installation of scientific Python packages can be troublesome, as many of
115
+ these packages are implemented as Python C extensions which need to be compiled.
113
116
This section lists various so-called scientific Python distributions which
114
117
provide precompiled and easy-to-install collections of scientific Python
115
118
packages.
116
119
117
120
Unofficial Windows Binaries for Python Extension Packages
118
121
---------------------------------------------------------
119
122
120
- Many people who do scientific computing are on Windows. And yet many of the
121
- scientific computing packages are notoriously difficult to build and install.
122
- `Christoph Gohlke <http://www.lfd.uci.edu/~gohlke/pythonlibs/ >`_ however, has
123
- compiled a list of Windows binaries for many useful Python packages. The list
124
- of packages has grown from a mainly scientific Python resource to a more
125
- general list. It might be a good idea to check it out if you're on Windows .
123
+ Many people who do scientific computing are on Windows, yet many of the
124
+ scientific computing packages are notoriously difficult to build and install
125
+ on this platform. `Christoph Gohlke <http://www.lfd.uci.edu/~gohlke/pythonlibs/ >`_
126
+ however, has compiled a list of Windows binaries for many useful Python packages.
127
+ The list of packages has grown from a mainly scientific Python resource to a more
128
+ general list. If you're on Windows, you may want to check it out.
126
129
127
130
Anaconda
128
131
--------
129
132
130
133
`Continuum Analytics <http://continuum.io/ >`_ offers the `Anaconda
131
134
Python Distribution <https://store.continuum.io/cshop/anaconda> `_ which
132
- includes all the common scientific Python packages and additionally many
133
- packages related to data analytics and big data. Anaconda itself is free, and
134
- Continuum sells a number of proprietary add-ons. Free
135
- licenses for the add-ons are available for academics and researchers.
135
+ includes all the common scientific Python packages as well as many packages
136
+ related to data analytics and big data. Anaconda itself is free, and
137
+ Continuum sells a number of proprietary add-ons. Free licenses for the
138
+ add-ons are available for academics and researchers.
136
139
137
140
Canopy
138
141
------
139
142
140
- `Canopy <https://www.enthought.com/products/canopy/>' _ is another scientific Python
141
- distribution, produced by `Enthought <https://www.enthought.com/>`_. A limited
142
- 'Canopy Express' variant is available for free, and Enthought charge for the
143
- full distribution. Free licenses are available for academics.
143
+ `Canopy <https://www.enthought.com/products/canopy/ >` _ is another scientific
144
+ Python distribution, produced by `Enthought <https://www.enthought.com/ >`_.
145
+ A limited 'Canopy Express' variant is available for free, but Enthought
146
+ charges for the full distribution. Free licenses are available for academics.
0 commit comments