Differences between revisions 3 and 6 (spanning 3 versions)
Revision 3 as of 2005-08-07 03:21:17
Size: 446
Editor: flyaflya
Comment:
Revision 6 as of 2006-05-16 14:23:39
Size: 575
Editor: ZhangYunfeng
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from NumericalPython
Line 9: Line 10:
提供对序列的快速操作 提供对序列(主要是矩阵)的快速操作
Line 12: Line 13:
Line 13: Line 15:
Line 14: Line 17:
Line 17: Line 21:

== 函数 ==
=== take ===
取出矩阵的几行或几列

::-- flyaflya [DateTime(2005-08-07T02:30:26Z)] TableOfContents

1. Numerical Python

1.1. 简介

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

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)