Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 210 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 210 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 210 -

Image of the Page - 210 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 210 -

210 A GettingAccesstoPython SymPy12 [2] for symbolicmathematics SciPy13 [10] foradvancedscientificcomputing Python2or3? Pythoncomes in twoversions, version2and3, and these arenot fully compati- ble. However, for the programs in this book, thedifferences are very small, the majoronebeingprint,which inPython2 is a statement like print ’a:’, a, ’b:’, b while inPython3 it is a functioncall print( ’a:’, a, ’b:’, b) Theauthors havewrittenPythonv2.7 code in this book in away thatmakes porting to version 3.4 or later trivial: most programswill just need afix of the printstatement. Thiscanbeautomaticallydonebyrunning2to3 prog.py to transform a Python 2 program prog.py to its Python 3 counterpart. One can also use tools likefutureorsix to easilywrite programs that run under both versions 2 and 3, or the futurize program can automatically do this for you basedonv2.7code. Sincemanytools fordoingscientificcomputinginPythonarestill onlyavail- able forPythonversion2,weuse thisversionin thepresentbook,butemphasize that it has tobev2.7andnotolderversions. Therearedifferentways toget access toPythonwith the requiredpackages: 1. Use a computer system at an institutionwhere the software is installed. Such a system can also be used from your local laptop through remote login over anetwork. 2. Install the softwareonyourown laptop. 3. Useawebservice. Asystemadministratorcantakethelistofsoftwarepackagesandinstall themissing ones on a computer system. For the two other options, detailed descriptions are givenbelow. Using aweb service is very straightforward, but has the disadvantage that you areconstrainedby thepackages thatareallowed to install on theservice. Thereare services at the timeof thiswriting that suffice forworkingwithmost of this book, but if you are going to solvemore complicatedmathematical problems, youwill needmore sophisticated mathematical Python packages, more storage andmore computer resources, and thenyouwill benefitgreatly fromhavingPython installed onyourowncomputer. 12http://sympy.org 13http://scipy.org
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python