没有合适的资源?快使用搜索试试~ 我知道了~
首页NumPy入门指南第二版:实战教程与高性能开源库详解
NumPy入门指南第二版:实战教程与高性能开源库详解
需积分: 10 1 下载量 15 浏览量
更新于2024-07-17
收藏 3.71MB PDF 举报
《NumPy入门指南第二版》是一本由Ivan Idris编著的实用手册,由Packt Publishing于2013年出版。这本书是专为初学者设计的,它以实际案例为引导,深入介绍了易于使用、性能强大且开源的NumPy数学库。NumPy在科学计算、数据分析和机器学习等领域中扮演着核心角色,它提供了高效的多维数组操作和高级数学函数。 本书覆盖了从安装和配置NumPy基础开始,逐步深入到数组创建、索引与切片、广播机制、数组操作、统计分析、线性代数以及高级功能如傅立叶变换等。作者通过丰富的实例,帮助读者理解如何利用NumPy进行高效的数据处理和科学计算,无论是进行简单的数据清洗,还是执行复杂的矩阵运算,都能在书中找到对应的指导。 该版本是第二版,这意味着它可能包含了对NumPy早期版本的改进和更新,以及对Python 3语言特性的兼容。此外,书中的版权信息强调了未经许可,任何形式的复制、存储或传输内容都是被禁止的,同时也声明了尽管作者和出版社尽力确保信息的准确性,但不对因本书使用导致的直接或间接损失承担责任。 《NumPy入门指南第二版》不仅适合那些初次接触NumPy的读者,也适合有一定编程基础,希望提升其在数值计算能力的开发者。通过阅读这本书,读者可以快速掌握NumPy的基本操作,并在此基础上进一步探索Python的科学计算生态系统,如Pandas和SciPy等工具。 这是一本值得拥有和深入学习的资源,无论是作为学习材料,还是作为开发者的参考书籍,都能从中获得巨大的价值。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/11725812/bg10.jpg)
Table of Contents
[ v ]
Time for acon – extracng elements from an array 160
Financial funcons 161
Time for acon – determining future value 161
Present value 163
Time for acon – geng the present value 163
Net present value 163
Time for acon – calculang the net present value 163
Internal rate of return 164
Time for acon – determining the internal rate of return 164
Periodic payments 165
Time for acon – calculang the periodic payments 165
Number of payments 165
Time for acon – determining the number of periodic payments 165
Interest rate 166
Time for acon – guring out the rate 166
Window funcons 166
Time for acon – plong the Bartle window 167
Blackman window 167
Time for acon – smoothing stock prices with the Blackman window 168
Hamming window 170
Time for acon – plong the Hamming window 170
Kaiser window 171
Time for acon – plong the Kaiser window 171
Special mathemacal funcons 172
Time for acon – plong the modied Bessel funcon 172
sinc 173
Time for acon – plong the sinc funcon 173
Summary 175
Chapter 8: Assure Quality with Tesng 177
Assert funcons 178
Time for acon – asserng almost equal 178
Approximately equal arrays 179
Time for acon – asserng approximately equal 180
Almost equal arrays 180
Time for acon – asserng arrays almost equal 181
Equal arrays 182
Time for acon – comparing arrays 182
Ordering arrays 183
欢迎加入非盈利Python编程学习交流QQ群783462347,群里免费提供500+本Python书籍!
![](https://csdnimg.cn/release/download_crawler_static/11725812/bg11.jpg)
Table of Contents
[ vi ]
Time for acon – checking the array order 183
Objects comparison 184
Time for acon – comparing objects 184
String comparison 184
Time for acon – comparing strings 185
Floang point comparisons 185
Time for acon – comparing with assert_array_almost_equal_nulp 186
Comparison of oats with more ULPs 187
Time for acon – comparing using maxulp of 2 187
Unit tests 187
Time for acon – wring a unit test 188
Nose tests decorators 190
Time for acon – decorang tests 191
Docstrings 193
Time for acon – execung doctests 194
Summary 195
Chapter 9: Plong with Matplotlib 197
Simple plots 198
Time for acon – plong a polynomial funcon 198
Plot format string 200
Time for acon – plong a polynomial and its derivave 200
Subplots 201
Time for acon – plong a polynomial and its derivaves 201
Finance 204
Time for acon – plong a year’s worth of stock quotes 204
Histograms 207
Time for acon – charng stock price distribuons 207
Logarithmic plots 209
Time for acon – plong stock volume 209
Scaer plots 211
Time for acon – plong price and volume returns with scaer plot 211
Fill between 213
Time for acon – shading plot regions based on a condion 213
Legend and annotaons 215
Time for acon – using legend and annotaons 215
Three dimensional plots 218
Time for acon – plong in three dimensions 219
Contour plots 220
Time for acon – drawing a lled contour plot 220
欢迎加入非盈利Python编程学习交流QQ群783462347,群里免费提供500+本Python书籍!
![](https://csdnimg.cn/release/download_crawler_static/11725812/bg12.jpg)
Table of Contents
[ vii ]
Animaon 222
Time for acon – animang plots 222
Summary 223
Chapter 10: When NumPy is Not Enough – SciPy and Beyond 225
MATLAB and Octave 225
Time for acon – saving and loading a .mat le 226
Stascs 227
Time for acon – analyzing random values 227
Samples’ comparison and SciKits 230
Time for acon – comparing stock log returns 230
Signal processing 232
Time for acon – detecng a trend in QQQ 233
Fourier analysis 235
Time for acon – ltering a detrended signal 236
Mathemacal opmizaon 238
Time for acon – ng to a sine 239
Numerical integraon 242
Time for acon – calculang the Gaussian integral 242
Interpolaon 243
Time for acon – interpolang in one dimension 243
Image processing 245
Time for acon – manipulang Lena 245
Audio processing 247
Time for acon – replaying audio clips 247
Summary 249
Chapter 11: Playing with Pygame 251
Pygame 251
Time for acon – installing Pygame 252
Hello World 252
Time for acon – creang a simple game 252
Animaon 255
Time for acon – animang objects with NumPy and Pygame 255
Matplotlib 258
Time for acon – using Matplotlib in Pygame 258
Surface pixels 261
Time for acon – accessing surface pixel data with NumPy 262
Arcial intelligence 263
Time for acon – clustering points 264
OpenGL and Pygame 266
欢迎加入非盈利Python编程学习交流QQ群783462347,群里免费提供500+本Python书籍!
![](https://csdnimg.cn/release/download_crawler_static/11725812/bg14.jpg)
Preface
Sciensts, engineers, and quantave data analysts face many challenges nowadays.
Data sciensts want to be able to do numerical analysis of large datasets with minimal
programming eort. They want to write readable, ecient, and fast code, which is as close
as possible to the mathemacal language package they are used to. A number of accepted
soluons are available in the scienc compung world.
The C, C++, and Fortran programming languages have their benets, but they are not
interacve and considered too complex by many. The common commercial alternaves are
amongst others, Matlab, Maple and Mathemaca. These products provide powerful scripng
languages, which are sll more limited than any general purpose programming language.
Other open source tools similar to Matlab exist such as R, GNU Octave, and Scilab. Obviously,
they also lack the power of a language such as Python.
Python is a popular general-purpose programming language, widely used in the scienc
community. You can access legacy C, Fortran, or R code easily from Python. It is object-oriented
and considered more high level than C or Fortran. Python allows you to write readable and
clean code with minimal fuss. However, it lacks a Matlab equivalent out of the box. That's
where NumPy comes in. This book is about NumPy and related Python libraries such as SciPy
and Matplotlib.
What is NumPy?
NumPy (from Numerical Python) is an open-source Python library for scienc compung.
NumPy let's you work with arrays and matrices in a natural way. The library contains
a long list of useful mathemacal funcons including some for linear algebra, Fourier
transformaon, and random number generaon rounes. LAPACK, a linear algebra library,
is used by the NumPy linear algebra module (that is, if you have LAPACK installed on your
system), otherwise, NumPy provides its own implementaon. LAPACK is a well-known library
originally wrien in Fortran on which Matlab relies as well. In a sense, NumPy replaces some
of the funconality of Matlab and Mathemaca, allowing rapid interacve prototyping.
欢迎加入非盈利Python编程学习交流QQ群783462347,群里免费提供500+本Python书籍!
剩余309页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/default.jpg!1)
weixin_38744270
- 粉丝: 0
- 资源: 2万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 解决Eclipse配置与导入Java工程常见问题
- 真空发生器:工作原理与抽吸性能分析
- 爱立信RBS6201开站流程详解
- 电脑开机声音解析:故障诊断指南
- JAVA实现贪吃蛇游戏
- 模糊神经网络实现与自学习能力探索
- PID型模糊神经网络控制器设计与学习算法
- 模糊神经网络在自适应PID控制器中的应用
- C++实现的学生成绩管理系统设计
- 802.1D STP 实现与优化:二层交换机中的生成树协议
- 解决Windows无法完成SD卡格式化的九种方法
- 软件测试方法:Beta与Alpha测试详解
- 软件测试周期详解:从需求分析到维护测试
- CMMI模型详解:软件企业能力提升的关键
- 移动Web开发框架选择:jQueryMobile、jQTouch、SenchaTouch对比
- Java程序设计试题与复习指南
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)