售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Mastering Python Scientific Computing
Table of Contents
Mastering Python Scientific Computing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. The Landscape of Scientific Computing – and Why Python?
Definition of scientific computing
A simple flow of the scientific computation process
Examples from scientific/engineering domains
A strategy for solving complex problems
Approximation, errors, and associated concepts and terms
Error analysis
Conditioning, stability, and accuracy
Backward and forward error analysis
Is it okay to ignore these errors?
Computer arithmetic and floating-point numbers
The background of the Python programming language
The guiding principles of the Python language
Why Python for scientific computing?
Compact and readable code
Holistic language design
Free and open source
Language interoperability
Portable and extensible
Hierarchical module system
Graphical user interface packages
Data structures
Python's testing framework
Available libraries
The downsides of Python
Summary
2. A Deeper Dive into Scientific Workflows and the Ingredients of Scientific Computing Recipes
Mathematical components of scientific computations
A system of linear equations
A system of nonlinear equations
Optimization
Interpolation
Extrapolation
Numerical integration
Numerical differentiation
Differential equations
The initial value problem
The boundary value problem
Random number generator
Python scientific computing
Introduction to NumPy
The SciPy library
The SciPy Subpackage
Data analysis using pandas
A brief idea of interactive programming using IPython
IPython parallel computing
IPython Notebook
Symbolic computing using SymPy
The features of SymPy
Why SymPy?
The plotting library
Summary
3. Efficiently Fabricating and Managing Scientific Data
The basic concepts of data
Data storage software and toolkits
Files
Structured files
Unstructured files
Database
Possible operations on data
Scientific data format
Ready-to-use standard datasets
Data generation
Synthetic data generation (fabrication)
Using Python's built-in functions for random number generation
Bookkeeping functions
Functions for integer random number generation
Functions for sequences
Statistical-distribution-based functions
Nondeterministic random number generator
Designing and implementing random number generators based on statistical distributions
A program with simple logic to generate five-digit random numbers
A brief note about large-scale datasets
Summary
4. Scientific Computing APIs for Python
Numerical scientific computing in Python
The NumPy package
The ndarrays data structure
File handling
Some sample NumPy programs
The SciPy package
The optimization package
The interpolation package
Integration and differential equations in SciPy
The stats module
Clustering package and spatial algorithms in SciPy
Image processing in SciPy
Sample SciPy programs
Statistics using SciPy
Optimization in SciPy
Image processing using SciPy
Symbolic computations using SymPy
Computer Algebra System
Features of a general-purpose CAS
A brief idea of SymPy
Core capability
Polynomials
Calculus
Solving equations
Discrete math
Matrices
Geometry
Plotting
Physics
Statistics
Printing
SymPy modules
Simple exemplary programs
Basic symbol manipulation
Expression expansion in SymPy
Simplification of an expression or formula
Simple integrations
APIs and toolkits for data analysis and visualization
Data analysis and manipulation using pandas
Important data structures of pandas
Special features of pandas
Data visualization using matplotlib
Interactive computing in Python using IPython
Sample data analysis and visualization programs
Summary
5. Performing Numerical Computing
The NumPy fundamental objects
The ndarray object
The attributes of an array
Basic operations on arrays
Special operations on arrays (shape change and conversion)
Classes associated with arrays
The matrix sub class
Masked array
The structured/recor array
The universal function object
Attributes
Methods
Various available ufunc
The NumPy mathematical modules
Introduction to SciPy
Mathematical functions in SciPy
Advanced modules/packages
Integration
Signal processing (scipy.signal)
Fourier transforms (scipy.fftpack)
Spatial data structures and algorithms (scipy.spatial)
Optimization (scipy.optimize)
Interpolation (scipy.interpolate)
Linear algebra (scipy.linalg)
Sparse eigenvalue problems with ARPACK
Statistics (scipy.stats)
Multidimensional image processing (scipy.ndimage)
Clustering
Curve fitting
File I/O (scipy.io)
Summary
6. Applying Python for Symbolic Computing
Symbols, expressions, and basic arithmetic
Equation solving
Functions for rational numbers, exponentials, and logarithms
Polynomials
Trigonometry and complex numbers
Linear algebra
Calculus
Vectors
The physics module
Hydrogen wave functions
Matrices and Pauli algebra
The quantum harmonic oscillator in 1-D and 3-D
Second quantization
High-energy Physics
Mechanics
Pretty printing
LaTeX Printing
The cryptography module
Parsing input
The logic module
The geometry module
Symbolic integrals
Polynomial manipulation
Sets
The simplify and collect operations
Summary
7. Data Analysis and Visualization
Matplotlib
The architecture of matplotlib
The scripting layer (pyplot)
The artist layer
The backend layer
Graphics with matplotlib
Output generation
The pandas library
Series
DataFrame
Panel
The common functionality among the data structures
Time series and date functions
Handling missing data
I/O operations
Working on CSV files
Ready-to-eat datasets
The pandas plotting
IPython
The IPython console and system shell
The operating system interface
Nonblocking plotting
Debugging
IPython Notebook
Summary
8. Parallel and Large-scale Scientific Computing
Parallel computing using IPython
The architecture of IPython parallel computing
The components of parallel computing
The IPython engine
The IPython controller
IPython view and interfaces
The IPython client
Example of performing parallel computing
A parallel decorator
IPython's magic functions
Activating specific views
Engines and QtConsole
Advanced features of IPython
Fault-tolerant execution
Dynamic load balancing
Pushing and pulling objects between clients and engines
Database support for storing the requests and results
Using MPI in IPython
Managing dependencies among tasks
Functional dependency
Decorators for functional dependency
Graph dependency
Impossible dependencies
The DAG dependency and the NetworkX library
Using IPython on an Amazon EC2 cluster with StarCluster
A note on security of IPython
Well-known parallel programming styles
Issues in parallel programming
Parallel programming
Concurrent programming
Distributed programming
Multiprocessing in Python
Multithreading in Python
Hadoop-based MapReduce in Python
Spark in Python
Summary
9. Revisiting Real-life Case Studies
Scientific computing applications developed in Python
The one Laptop per Child project used Python for their user interface
ExpEYES – eyes for science
A weather prediction application in Python
An aircraft conceptual designing tool and API in Python
OpenQuake Engine
SMS Siemag AG application for energy efficiency
Automated code generator for analysis of High-energy Physics data
Python for computational chemistry applications
Python for developing a Blind Audio Tactile Mapping System
TAPTools for air traffic control
Energy-efficient lights with an embedded system
Scientific computing libraries developed in Python
A maritime designing API by Tribon
Molecular Modeling Toolkit
Standard Python packages
Summary
10. Best Practices for Scientific Computing
The best practices for designing
The implementation of best practices
The best practices for data management and application deployment
The best practices to achieving high performance
The best practices for data privacy and security
Testing and maintenance best practices
General Python best practices
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜