您的位置:首页 > 运维架构

「2013-4-20」SciPy, Numerical Python, matplotlib, Enthought Canopy Express

2013-04-20 17:30 429 查看
《数值分析》这门课需要做一些实验,实现一些 Numerical Analysis 算法。科学计算最好的工具,自然是 Matlab 或者 Mathematica(符号运算);但是考虑到实验的重点在于「算法实现」,所以通用程序设计语言,也是不错的选择,于是就考虑 Python 咯。

1. http://goo.gl/AQViw,工具包简介。


Numpy is a language extension that defines the numerical array and matrix type and basic operations on them.

Scipy is another language extension that uses numpy to do advanced math, signal processing, optimization, statistics and much more.

Matplotlib is a language extension to facilitate plotting.


2. http://www.scipy.org/Getting_Started;其中提到 Python 由于是 dynamic typing,因此 numpy 相对于 list 而言有更高的效率;结尾提到了一些 import 的好习惯(尽量不要使用 from package_name import *)。


Not only is this much more compact and readable, it is almost instantaneous by comparison, and even the numpy import is faster than the loop in plain Python. Why? Python is an interpreted language with dynamic typing. This means that on each loop iteration it needs to check the type of the operands a and b to select the right variant of the '+' operator for those types (in Python, '+' is used for many things, like concatenating strings, and lists can have elements of different types).


3. 其他链接:

matplotlib introduction & pyplot tutorial.

SciPy tutorial. 基于天文学数据,大致扫了下 pdf,整体觉得科学计算坑有点大……

Introduction to scipy》,array 部分可参考。

Enthought Canopy Express,一种集成了很多科学计算 package 的 Python distribution,express 版免费。免费版和收费版功能对比packages list;但是一般直接下载 Python 2.6/2.7,然后单独下载安装 numpy scipy matplotlib 也很方便。

如何引用,http://www.scipy.org/Citing_SciPy,很多不少学院出品的开源 package 都有类似的 citing 页面。

后话:《Matlab vs. scipy & numpy》,可参考。作者的观点是,如果正儿八经搞科学计算,那还是「如果有 Matlab 可以用的话,就用 Matlab 好了」;虽然 Matlab 对于 generic programming 支持不够好,和 external library 互操作性不够高(相比开源社区而言,商业软件的互操作性一般都要弱一些),但是毕竟是科学计算的王牌……
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: