全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管文库(原现金交易版)
185 0
2025-03-23

2024新资料,内容清晰,易学易用,欢迎下载学习!

I Introduction to Python 3
1 About Python 5
1.1 Overview...... . 5
1.2 What’s Python?..... . . . . . . 5
1.3 Scientific Programming..... . . 7
2 Getting Started 15
2.1 Overview...... . 15
2.2 Python in the Cloud..... . . . . 15
2.3 Local Install...... 15
2.4 Jupyter Notebooks..... . . . . 17
2.5 Installing Libraries..... . . . . 31
2.6 Working with Python Files..... 32
2.7 Exercises...... . 33
3 An Introductory Example 35
3.1 Overview...... . 35
3.2 The Task: Plotting a White Noise Process.... 35
3.3 Version 1...... . 35
3.4 Alternative Implementations....39
3.5 Another Application..... . . . 44
3.6 Exercises...... . 45
4 Functions 53
4.1 Overview...... . 53
4.2 Function Basics..... . . . . . . 53
4.3 Defining Functions..... . . . . 54
4.4 Applications.....57
4.5 Recursive Function Calls (Advanced).... . . . 62
4.6 Exercises...... . 62
4.7 Advanced Exercises..... . . . . 65
5 Python Essentials 67
5.1 Overview...... . 67
5.2 Data Types...... 67
5.3 Input and Output..... . . . . . 72
5.4 Iterating...... . . 74
5.5 Comparisons and Logical Operators.... . . . 77
5.6 Coding Style and Documentation.... . . . . . 80
5.7 Exercises...... . 81
i
6 OOP I: Objects and Methods 87
6.1 Overview...... . 87
6.2 Objects...... . . 88
6.3 Inspection Using Rich..... . . 91
6.4 A Little Mystery..... . . . . . 93
6.5 Summary...... . 94
6.6 Exercises...... . 94
7 Names and Namespaces 97
7.1 Overview...... . 97
7.2 Variable Names in Python..... 97
7.3 Namespaces...... 98
7.4 Viewing Namespaces..... . . . 104
7.5 Interactive Sessions..... . . . . 105
7.6 The Global Namespace..... . . 106
7.7 Local Namespaces..... . . . . 107
7.8 The __builtins__ Namespace.... . . . . 107
7.9 Name Resolution..... . . . . . 108
8 OOP II: Building Classes 115
8.1 Overview...... . 115
8.2 OOP Review.....116
8.3 Defining Your Own Classes..... 117
8.4 Special Methods..... . . . . . 129
8.5 Exercises...... . 130
9 Writing Longer Programs 133
9.1 Overview...... . 133
9.2 Working with Python files..... 133
9.3 Development environments..... 134
9.4 A step forward from Jupyter Notebooks: JupyterLab... . . . 135
9.5 A walk through Visual Studio Code.... . . . 139
9.6 Git your hands dirty..... . . . 143
II The Scientific Libraries 147
10 Python for Scientific Computing 149
10.1 Overview...... . 149
10.2 Scientific Libraries..... . . . . 149
10.3 The Need for Speed..... . . . 150
10.4 Vectorization.....153
10.5 Beyond Vectorization..... . . . 157
11 NumPy 159
11.1 Overview...... . 159
11.2 NumPy Arrays..... . . . . . . 159
11.3 Arithmetic Operations..... . . 166
11.4 Matrix Multiplication..... . . . 167
11.5 Broadcasting.....168
11.6 Mutability and Copying Arrays.... . . . . . . 173
11.7 Additional Functionality..... . 175
11.8 Exercises...... . 178
12 Matplotlib 185
ii
12.1 Overview...... . 185
12.2 The APIs...... . 185
12.3 More Features..... . . . . . . 191
12.4 Further Reading..... . . . . . 201
12.5 Exercises...... . 201
13 SciPy 203
13.1 Overview...... . 203
13.2 SciPy versus NumPy..... . . . 203
13.3 Statistics...... . 204
13.4 Roots and Fixed Points..... . . 207
13.5 Optimization.....210
13.6 Integration...... 211
13.7 Linear Algebra..... . . . . . . 211
13.8 Exercises...... . 212
14 Pandas 217
14.1 Overview...... . 217
14.2 Series...... . . . 218
14.3 DataFrames...... 220
14.4 On-Line Data Sources..... . . 234
14.5 Exercises...... . 237
15 Pandas for Panel Data 245
15.1 Overview...... . 245
15.2 Slicing and Reshaping Data..... 246
15.3 Merging Dataframes and Filling NaNs.... . . 251
15.4 Grouping and Summarizing Data.... . . . . . 256
15.5 Final Remarks..... . . . . . . 262
15.6 Exercises...... . 262
16 SymPy 267
16.1 Overview...... . 267
16.2 Getting Started..... . . . . . . 267
16.3 Symbolic algebra..... . . . . . 268
16.4 Symbolic Calculus..... . . . . 274
16.5 Plotting...... . . 277
16.6 Application: Two-person Exchange Economy... . . . . . . 281
16.7 Exercises...... . 284
III High Performance Computing 287
17 Numba 289
17.1 Overview...... . 289
17.2 Compiling Functions..... . . . 290
17.3 Decorator Notation..... . . . . 292
17.4 Type Inference..... . . . . . . 293
17.5 Compiling Classes..... . . . . 296
17.6 Alternatives to Numba..... . . 298
17.7 Summary and Comments..... . 299
17.8 Exercises...... . 300
18 Parallelization 303
18.1 Overview...... . 303
iii
18.2 Types of Parallelization..... . . 304
18.3 Implicit Multithreading in NumPy.... . . . . 304
18.4 Multithreaded Loops in Numba.... . . . . . 307
18.5 Exercises...... . 310
19 JAX 315
IV Advanced Python Programming 317
20 Writing Good Code 319
20.1 Overview...... . 319
20.2 An Example of Poor Code..... 319
20.3 Good Coding Practice..... . . 323
20.4 Revisiting the Example..... . . 325
20.5 Exercises...... . 327
21 More Language Features 335
21.1 Overview...... . 335
21.2 Iterables and Iterators..... . . . 335
21.3 * and ** Operators..... . . . . 340
21.4 Decorators and Descriptors..... 344
21.5 Generators...... 349
21.6 Exercises...... . 354
22 Debugging and Handling Errors 357
22.1 Overview...... . 357
22.2 Debugging...... 357
22.3 Handling Errors..... . . . . . . 363
22.4 Exercises...... . 367
V Other 369
23 Troubleshooting 371
23.1 Fixing Your Local Environment.... . . . . . 371
23.2 Reporting an Issue..... . . . . 372
24 Execution Statistics 373
Index 375
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群