~ubuntu-branches/ubuntu/feisty/python-numpy/feisty

« back to all changes in this revision

Viewing changes to numpy/lib/info.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-12 10:00:24 UTC
  • Revision ID: james.westby@ubuntu.com-20060712100024-5lw9q2yczlisqcrt
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
__doc_title__ = """Basic functions used by several sub-packages and
 
2
useful to have in the main name-space."""
 
3
__doc__ = __doc_title__ + """
 
4
 
 
5
Type handling
 
6
==============
 
7
iscomplexobj     --  Test for complex object, scalar result
 
8
isrealobj        --  Test for real object, scalar result
 
9
iscomplex        --  Test for complex elements, array result
 
10
isreal           --  Test for real elements, array result
 
11
imag             --  Imaginary part
 
12
real             --  Real part
 
13
real_if_close    --  Turns complex number with tiny imaginary part to real
 
14
isneginf         --  Tests for negative infinity ---|
 
15
isposinf         --  Tests for positive infinity    |
 
16
isnan            --  Tests for nans                 |----  array results
 
17
isinf            --  Tests for infinity             |
 
18
isfinite         --  Tests for finite numbers    ---|
 
19
isscalar         --  True if argument is a scalar
 
20
nan_to_num       --  Replaces NaN's with 0 and infinities with large numbers
 
21
cast             --  Dictionary of functions to force cast to each type
 
22
common_type      --  Determine the 'minimum common type code' for a group
 
23
                       of arrays
 
24
mintypecode      --  Return minimal allowed common typecode.
 
25
 
 
26
Index tricks
 
27
==================
 
28
mgrid            --  Method which allows easy construction of N-d 'mesh-grids'
 
29
r_               --  Append and construct arrays: turns slice objects into
 
30
                       ranges and concatenates them, for 2d arrays appends
 
31
                       rows.
 
32
index_exp        --  Konrad Hinsen's index_expression class instance which
 
33
                     can be useful for building complicated slicing syntax.
 
34
 
 
35
Useful functions
 
36
==================
 
37
select           --  Extension of where to multiple conditions and choices
 
38
extract          --  Extract 1d array from flattened array according to mask
 
39
insert           --  Insert 1d array of values into Nd array according to mask
 
40
linspace         --  Evenly spaced samples in linear space
 
41
logspace         --  Evenly spaced samples in logarithmic space
 
42
fix              --  Round x to nearest integer towards zero
 
43
mod              --  Modulo mod(x,y) = x % y except keeps sign of y
 
44
amax             --  Array maximum along axis
 
45
amin             --  Array minimum along axis
 
46
ptp              --  Array max-min along axis
 
47
cumsum           --  Cumulative sum along axis
 
48
prod             --  Product of elements along axis
 
49
cumprod          --  Cumluative product along axis
 
50
diff             --  Discrete differences along axis
 
51
angle            --  Returns angle of complex argument
 
52
unwrap           --  Unwrap phase along given axis (1-d algorithm)
 
53
sort_complex     --  Sort a complex-array (based on real, then imaginary)
 
54
trim_zeros       --  trim the leading and trailing zeros from 1D array.
 
55
 
 
56
vectorize        --  a class that wraps a Python function taking scalar
 
57
                         arguments into a generalized function which
 
58
                         can handle arrays of arguments using the broadcast
 
59
                         rules of numerix Python.
 
60
 
 
61
Shape manipulation
 
62
===================
 
63
squeeze          --  Return a with length-one dimensions removed.
 
64
atleast_1d       --  Force arrays to be > 1D
 
65
atleast_2d       --  Force arrays to be > 2D
 
66
atleast_3d       --  Force arrays to be > 3D
 
67
vstack           --  Stack arrays vertically (row on row)
 
68
hstack           --  Stack arrays horizontally (column on column)
 
69
column_stack     --  Stack 1D arrays as columns into 2D array
 
70
dstack           --  Stack arrays depthwise (along third dimension)
 
71
split            --  Divide array into a list of sub-arrays
 
72
hsplit           --  Split into columns
 
73
vsplit           --  Split into rows
 
74
dsplit           --  Split along third dimension
 
75
 
 
76
Matrix (2d array) manipluations
 
77
===============================
 
78
fliplr           --  2D array with columns flipped
 
79
flipud           --  2D array with rows flipped
 
80
rot90            --  Rotate a 2D array a multiple of 90 degrees
 
81
eye              --  Return a 2D array with ones down a given diagonal
 
82
diag             --  Construct a 2D array from a vector, or return a given
 
83
                       diagonal from a 2D array.
 
84
mat              --  Construct a Matrix
 
85
bmat             --  Build a Matrix from blocks
 
86
 
 
87
Polynomials
 
88
============
 
89
poly1d           --  A one-dimensional polynomial class
 
90
 
 
91
poly             --  Return polynomial coefficients from roots
 
92
roots            --  Find roots of polynomial given coefficients
 
93
polyint          --  Integrate polynomial
 
94
polyder          --  Differentiate polynomial
 
95
polyadd          --  Add polynomials
 
96
polysub          --  Substract polynomials
 
97
polymul          --  Multiply polynomials
 
98
polydiv          --  Divide polynomials
 
99
polyval          --  Evaluate polynomial at given argument
 
100
 
 
101
Import tricks
 
102
=============
 
103
ppimport         --  Postpone module import until trying to use it
 
104
ppimport_attr    --  Postpone module import until trying to use its
 
105
                      attribute
 
106
ppresolve        --  Import postponed module and return it.
 
107
 
 
108
Machine arithmetics
 
109
===================
 
110
machar_single    --  MachAr instance storing the parameters of system
 
111
                     single precision floating point arithmetics
 
112
machar_double    --  MachAr instance storing the parameters of system
 
113
                     double precision floating point arithmetics
 
114
 
 
115
Threading tricks
 
116
================
 
117
ParallelExec     --  Execute commands in parallel thread.
 
118
 
 
119
1D array set operations
 
120
=======================
 
121
Set operations for 1D numeric arrays based on sort() function.
 
122
 
 
123
ediff1d          --  Array difference (auxiliary function).
 
124
unique1d         --  Unique elements of 1D array.
 
125
intersect1d      --  Intersection of 1D arrays with unique elements.
 
126
intersect1d_nu   --  Intersection of 1D arrays with any elements.
 
127
setxor1d         --  Set exclusive-or of 1D arrays with unique elements.
 
128
setmember1d      --  Return an array of shape of ar1 containing 1 where
 
129
                     the elements of ar1 are in ar2 and 0 otherwise.
 
130
union1d          --  Union of 1D arrays with unique elements.
 
131
setdiff1d        --  Set difference of 1D arrays with unique elements.
 
132
 
 
133
"""
 
134
 
 
135
depends = ['core','testing']
 
136
global_symbols = ['*']