Differences between revisions 6 and 9 (spanning 3 versions)
Revision 6 as of 2006-05-16 14:23:39
Size: 575
Editor: ZhangYunfeng
Comment:
Revision 9 as of 2009-12-25 07:14:33
Size: 628
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
##language:zh #language zh
Line 6: Line 6:
::-- flyaflya [[[DateTime(2005-08-07T02:30:26Z)]]]
[[TableOfContents]]
= Numerical Python =
<<TableOfContents>>
= Numeric =
Line 10: Line 9:

Numeric又称为NumericalPython。Numeric已经不再继续开发(2005-11),NumPy是其下一代继承者。

1. Numeric

1.1. 简介

Numeric又称为NumericalPython。Numeric已经不再继续开发(2005-11),NumPy是其下一代继承者。

提供对序列(主要是矩阵)的快速操作

1.2. 例子

>>> import Numeric as N

>>> a = 0,0,1,1,0],[1,1,0,0,1],[0,0,1,0,1

>>> N.where(a, 100,99)

array([[ 99, 99, 100, 100, 99],

  • [100, 100, 99, 99, 100], [ 99, 99, 100, 99, 100]])

1.3. 函数

1.3.1. take

取出矩阵的几行或几列

Numeric (last edited 2009-12-25 07:14:33 by localhost)