Nagar | Introduction to Python for Engineers and Scientists | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 264 Seiten

Nagar Introduction to Python for Engineers and Scientists

Open Source Solutions for Numerical Computation
1. ed
ISBN: 978-1-4842-3204-0
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

Open Source Solutions for Numerical Computation

E-Book, Englisch, 264 Seiten

ISBN: 978-1-4842-3204-0
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



Familiarize yourself with the basics of Python for engineering and scientific computations using this concise, practical tutorial that is focused on writing code to learn concepts. Introduction to Python is useful for industry engineers, researchers, and students who are looking for open-source solutions for numerical computation. In this book you will learn by doing, avoiding technical jargon, which makes the concepts easy to learn. First you'll see how to run basic calculations, absorbing technical complexities incrementally as you progress toward advanced topics. Throughout, the language is kept simple to ensure that readers at all levels can grasp the concepts.  What You'll Learn Understand the fundamentals of the Python programming language Apply Python to numerical computational programming projects in engineering and science Discover the Pythonic way of life Apply data types, operators, and arrays Carry out plotting for visualization Work with functions and loops Who This Book Is For Engineers, scientists, researchers, and students who are new to Python. Some prior programming experience would be helpful but not required.  

Sandeep Nagar, Ph.D. teaches and consults on the use of Python and other open source programming languages for for data science/analysis and numerical computing for engineering and science applications. In addition to teaching at universities, he frequently gives workshops covering open source software.  Sandeep has a Ph.D. in Material Science from KTH, Sweden in May 2012. Prior to that degree, he obtained a M.Sc. in Physics with specialization in Electronics and Radio Physics and a B.Sc.B.Ed degrees in India.

Nagar Introduction to Python for Engineers and Scientists jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Table of Contents;5
2;About the Author;13
3;About the Technical Reviewer;14
4;Acknowledgments;15
5;Chapter 1: Philosophy of Python;16
5.1;1.1 Introduction;16
5.1.1;1.1.1 High-Level Programming;17
5.1.2;1.1.2 Interactive Environment;17
5.1.3;1.1.3 Object Orientation;19
5.1.4;1.1.4 Multipurpose Nature;20
5.1.5;1.1.5 Minimalistic Design;21
5.1.6;1.1.6 Portability;22
5.1.7;1.1.7 Extensibility;22
5.2;1.2 History;23
5.2.1;1.2.1 Python 2 vs. Python 3;23
5.3;1.3 Python and Engineering;24
5.4;1.4 Modular Programming;25
5.5;1.5 Summary;26
5.6;1.6 Bibliography;26
6;Chapter 2: Introduction to Python Basics;28
6.1;2.1 Introduction;28
6.2;2.2 Installation;28
6.2.1;2.2.1 Windows;29
6.2.2;2.2.2 Ubuntu;30
6.2.3;2.2.3 Mac OS X;31
6.3;2.3 Using the Python Interpreter;32
6.4;2.4 Anaconda IDE;35
6.5;2.5 Python as a Calculator;37
6.6;2.6 Modules;39
6.6.1;2.6.1 Using a Module;41
6.7;2.7 Python Environment;42
6.7.1;2.7.1 Installing virtualenv;43
6.7.2;2.7.2 Activating virtualenv;44
6.7.3;2.7.3 Deactivating the Virtual Environment;44
6.8;2.8 Summary;45
6.9;2.9 Bibliography;45
7;Chapter 3: IPython;46
7.1;3.1 Introduction;46
7.2;3.2 Installing IPython;47
7.3;3.3 IPython Notebooks;53
7.3.1;3.3.1 Installing a Jupyter Notebook;53
7.4;3.4 Saving a Jupyter Notebook;57
7.5;3.5 Online Jupyter Environment;58
7.6;3.6 Summary;59
7.7;3.7 Bibliography;60
8;Chapter 4: Data Types;61
8.1;4.1 Introduction;61
8.2;4.2 Logical;62
8.3;4.3 Numeric;64
8.3.1;4.3.1 Integer;64
8.3.2;4.3.2 Floating Point Numbers;65
8.3.3;4.3.3 How to Store a Floating Point Number;66
8.3.4;4.3.4 Complex Numbers;69
8.4;4.4 Sequences;70
8.4.1;4.4.1 Strings;70
8.4.2;4.4.2 Lists and Tuples;72
8.5;4.5 Sets and Frozensets;73
8.6;4.6 Mappings;74
8.7;4.7 Null Objects;74
8.8;4.8 Summary;75
8.9;4.9 Bibliography;75
9;Chapter 5: Operators;76
9.1;5.1. Introduction;76
9.2;5.2. Concept of Variables;78
9.2.1;5.2.1 Rules of Naming Variables;80
9.3;5.3. Assignment Operator;81
9.4;5.4. Arithmetic Operators;88
9.5;5.5. Changing and Defining Data Type;90
9.5.1;5.5.1 Order of Usage;91
9.5.2;5.5.2 Comparison Operators;92
9.6;5.6. Membership Operator;93
9.7;5.7. Identity Operator;94
9.8;5.8. Bitwise Operators;95
9.8.1;5.8.1 Using Bitwise Operations;98
9.9;5.9. Summary;99
10;Chapter 6: Arrays;100
10.1;6.1 Introduction;100
10.2;6.2 numpy;101
10.3;6.3 ndarray;102
10.4;6.4 Automatic Creation of Arrays;105
10.4.1;6.4.1 zeros();105
10.4.2;6.4.2 ones();106
10.4.3;6.4.3 ones_like();107
10.4.4;6.4.4 empty();107
10.4.5;6.4.5 empty_like();108
10.4.6;6.4.6 eye();108
10.4.7;6.4.7 identity();110
10.4.8;6.4.8 full();111
10.4.9;6.4.9 full_like();111
10.4.10;6.4.10 Random Numbers;112
10.4.10.1; Random Integers;113
10.4.10.2; Random Floating Point Numbers;114
10.4.10.3; Random Choice;115
10.4.10.4; Beta Distribution;117
10.4.10.5; Binomial Distribution;118
10.4.10.6; Normal Distribution;118
10.4.10.7; Other Distributions;119
10.5;6.5 Numerical Ranges;119
10.5.1;6.5.1 A Range of Numbers;119
10.5.2;6.5.2 Linearly Spaced Numbers;120
10.5.3;6.5.3 Logarithmically Spaced Numbers;121
10.5.4;6.5.4 meshgrid();121
10.5.5;6.5.5 mgrid() and ogrid();122
10.6;6.6 tile();124
10.7;6.7 Broadcasting;125
10.8;6.8 Extracting Diagonal;127
10.9;6.9 Indexing;127
10.10;6.10 Slicing;129
10.11;6.11 Copies and Views;131
10.12;6.12 Masking;133
10.12.1;6.12.1 Fancy Indexing;133
10.12.2;6.12.2 Indexing with Boolean Arrays;134
10.13;6.13 Arrays Are Not Matrices;135
10.14;6.14 Some Basic Operations;139
10.14.1;6.14.1 sum;139
10.14.2;6.14.2 Minimum and Maximum;140
10.14.3;6.14.3 Statistics: Mean, Median, and Standard Deviation;140
10.14.4;6.14.4 sort();141
10.14.5;6.14.5 Rounding Off;142
10.15;6.15 asarray() and asmatrix();143
10.16;6.16 Summary;143
10.17;6.17 Bibliography;144
11;Chapter 7: Plotting;145
11.1;7.1 Introduction;145
11.2;7.2 matplotlib;146
11.2.1;7.2.1 pylab vs. pyplot;147
11.3;7.3 Plotting Basic Plots;148
11.3.1;7.3.1 Plotting More than One Graph on Same Axes;151
11.3.2;7.3.2 Various Features of a Plot;152
11.4;7.4 Setting Up to Properties;159
11.5;7.5 Histograms;159
11.6;7.6 Bar Charts;161
11.7;7.7 Error Bar Charts;164
11.8;7.8 Scatter Plots;166
11.9;7.9 Pie Charts;168
11.10;7.10 Polar Plots;170
11.11;7.11 Decorating Plots with Text, Arrows, and Annotations;171
11.12;7.12 Subplots;173
11.13;7.13 Saving a Plot to a File;175
11.14;7.14 Displaying Plots on Web Application Servers;176
11.14.1;7.14.1 IPython and Jupyter Notebook;178
11.15;7.15 Working with matplotlib in Object Mode;179
11.16;7.16 Logarithmic Plots;181
11.17;7.17 Two Plots on the Same Figure with at least One Axis Different;184
11.18;7.18 Contour Plots;185
11.19;7.19 3D Plotting in matplotlib;188
11.19.1;7.19.1 Line and Scatter Plots;188
11.19.2;7.19.2 Wiremesh and Surface Plots;191
11.19.3;7.19.3 Contour plots in 3D;194
11.19.4;7.19.4 Quiver Plots;195
11.20;7.20 Other Libraries for Plotting Data;197
11.20.1;7.20.1 plotly;197
11.21;7.21 Summary;198
11.22;7.22 Bibliography;198
12;Chapter 8: Functions and Loops;199
12.1;8.1 Introduction;199
12.2;8.2 Defining Functions;199
12.2.1;8.2.1 Function Name;200
12.2.2;8.2.2 Descriptive String;200
12.2.3;8.2.3 Indented Block of Statements;201
12.2.4;8.2.4 Return Statement;202
12.3;8.3 Multi-input and Multi-output Functions;203
12.4;8.4 Namespaces;204
12.4.1;8.4.1 Scope Rules;204
12.5;8.5 Concept of Loops;206
12.6;8.6 for Loop;207
12.7;8.7 if-else Loop;211
12.8;8.8 while Loop;213
12.9;8.9 Infinite Loops;215
12.10;8.10 while-else;216
12.11;8.11 Summary;217
13;Chapter 9: Object-Oriented Programming;218
13.1;9.1 Introduction;218
13.2;9.2 Procedural Programming vs. OOP;219
13.3;9.3 Objects;219
13.4;9.4 Types;223
13.5;9.5 Object Reference;225
13.5.1;9.5.1 Garbage Collection;226
13.5.2;9.5.2 Copy and Deepcopy;227
13.6;9.6 Class;230
13.6.1;9.6.1 Creating a Class;231
13.6.2;9.6.2 Class Variables and Class Methods;232
13.6.3;9.6.3 Constructor;234
13.6.3.1; Built-in Class Attributes;238
13.7;9.7 Summary;240
13.8;9.8 Bibliography;241
14;Chapter 10: Numerical Computing Formalism;242
14.1;10.1 Introduction;242
14.2;10.2 Physical Problems;243
14.3;10.3 Defining a Model;243
14.4;10.4 Python Packages;247
14.5;10.5 Python for Science and Engineering;247
14.6;10.6 Prototyping a Problem;248
14.6.1;10.6.1 What Is Prototyping?;249
14.6.2;10.6.2 Python for Fast Prototyping;249
14.7;10.7 Large Dataset Handling;250
14.8;10.8 Instrumentation and Control;252
14.9;10.9 Parallel Processing;254
14.10;10.10 Summary;255
14.11;10.11 Bibliography;256
15;Index;257



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.