没有合适的资源?快使用搜索试试~ 我知道了~
python 的numpy
4星 · 超过85%的资源 需积分: 9 13 下载量 118 浏览量
2013-11-19
13:54:54
上传
评论
收藏 631KB PDF 举报
温馨提示
试读
109页
python的numpy模块的参考文档,内容十分全面。参考价值也较高。是学习numpy的较好资料。
资源推荐
资源详情
资源评论
NumPy User Guide
Release 1.9.0.dev-ce6f348
Written by the NumPy community
November 14, 2013
CONTENTS
1 Introduction 3
1.1 What is NumPy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Building and installing NumPy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 How to find documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Numpy basics 9
2.1 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Array creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 I/O with Numpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5 Broadcasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.6 Byte-swapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.7 Structured arrays (aka “Record arrays”) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.8 Subclassing ndarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3 Performance 43
4 Miscellaneous 45
4.1 IEEE 754 Floating Point Special Values: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2 How numpy handles numerical exceptions: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3 Examples: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.4 Interfacing to C: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.5 Interfacing to Fortran: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.6 Interfacing to C++: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.7 Methods vs. Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5 Using Numpy C-API 51
5.1 How to extend NumPy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.2 Using Python as glue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.3 Writing your own ufunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4 Beyond the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Index 105
i
ii
NumPy User Guide , Release 1.9.0.dev-ce6f348
This guide is intended as an introductory overview of NumPy and explains how to install and make use of the most
important features of NumPy. For detailed reference documentation of the functions and classes contained in the
package, see the reference.
Warning: This “User Guide” is still a work in progress; some of the material is not organized, and several aspects
of NumPy are not yet covered sufficient detail. We are an open source community continually working to improve
the documentation and eagerly encourage interested parties to contribute. For information on how to do so, please
visit the NumPy doc wiki.
More documentation for NumPy can be found on the numpy.org website.
Thanks!
CONTENTS 1
剩余108页未读,继续阅读
资源评论
- lemonwyc2014-10-17挺好的文档,蛮实用,就是分太高了。。
A1041850777
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功