Home | Trees | Indices | Help |
|
---|
|
|
|||
| MathUtilError | ||
|
Test Test case |
|
|||
float
|
accumulate(a) cumulative sum of a[0], a[0]+a[1], a[0]+a[1]+[a2], ...
normalized by N.sum( a )
|
||
float
|
variance(x,
avg=None) Variance, σ^2 |
||
float
|
SD(x,
avg=None) Standard deviation, σ |
||
array('f') or float
|
wMean(x,
w=None) Weighted mean: Mean of data (x) weighted by (w). |
||
array('f') or float
|
wVar(x,
w) Variance of weighted (w) data (x). |
||
array('f') or float
|
wSD(x,
w) Standard deviation of weighted data. |
||
array('f') or float
|
cross(v,
w) Cross product between two coordinates. |
||
list
|
aboveDiagonal(pw_m) Collect att the values above the diagonal in a square matrix. |
||
1|0
|
arrayEqual(a,
b) Compare 2 arrays or lists of numbers for equality. |
||
array
|
pairwiseDistances(u,
v) Pairwise distances between two arrays. |
||
array( 1|0 )
|
randomMask(nOnes,
length) Create random array of given lenght and number of ones. |
||
2D array
|
random2DArray(matrix,
ranNr=1,
mask=None) Create randomized 2D array containing ones and zeros. |
||
[ float ]
|
runningAverage(x,
interval=2,
preserve_boundaries=0) Running average (smoothing) over a given data window. |
||
dict
|
packBinaryMatrix(cm) Compress sparse array of 0 and ones to list of one-positions (space saving function, upack with unpackBinaryMatrix). |
||
2D array
|
unpackBinaryMatrix(pcm,
raveled=0) Uncompress array of 0 and 1 that was compressed with packBinaryMatrix. |
||
dict
|
matrixToList(cm) Convert matrix into standard python list remembering the dimensions. |
||
|
listToMatrix(lcm) Convert result of matrixToList back into Numeric array |
||
array
|
eulerRotation(alpha,
beta,
gamma) Builds a rotation matrix from successive rotations: |
||
array
|
randomRotation() Get random rotation matrix. |
||
[any]
|
intersection(a,
b,
optimize=1) Intersection of the two lists (i.e. |
||
[any]
|
nonredundant(l) All members of a list without duplicates noredundant( [any]
) -> [any]
|
||
[any]
|
union(a,
b) Union of two lists (without duplicates) union( [any], [any]
) -> [any]
|
||
[any]
|
difference(a,
b) All members of a that are not in b difference([any], [any])
-> [any]
|
||
[any]
|
removeFromList(l,
v,
all=1) Remove all or first occurrence(s) of v from l. |
||
[int]
|
randomRange(start,
stop,
n) Creates a set of n unique integers randomly distributed between start and stop. |
||
float, float, float
|
linfit(x,
y) Calculate linear least-square fit to the points given by x and y. |
||
array
|
cartesianToPolar(xyz) Convert cartesian coordinate array to polar coordinate array: x,y,z -> r, θ, φ
|
||
array
|
polarToCartesian(rtp) Convert polar coordinate array to cartesian coordinate array: r, θ, φ -> x,y,z
|
||
array
|
projectOnSphere(xyz,
radius=None,
center=None) Project the coordinates xyz on a sphere with a given radius around a given center. |
|
cumulative sum of a[0], a[0]+a[1], a[0]+a[1]+[a2], ...
normalized by N.sum( a )
|
Variance, σ^2
|
Standard deviation, σ
|
Weighted mean: Mean of data (x) weighted by (w).
|
Variance of weighted (w) data (x).
|
Standard deviation of weighted data.
|
Cross product between two coordinates.
|
Collect att the values above the diagonal in a square matrix.
|
Compare 2 arrays or lists of numbers for equality.
|
Pairwise distances between two arrays.
|
Create random array of given lenght and number of ones.
|
Create randomized 2D array containing ones and zeros.
|
Running average (smoothing) over a given data window.
|
Compress sparse array of 0 and ones to list of one-positions (space saving function, upack with unpackBinaryMatrix).
|
Uncompress array of 0 and 1 that was compressed with packBinaryMatrix.
|
Convert matrix into standard python list remembering the dimensions. Unpack with listToMatrix.
|
Convert result of matrixToList back into Numeric array
|
Builds a rotation matrix from successive rotations:
|
Get random rotation matrix.
|
Intersection of the two lists (i.e. all values common to both two lists). intersection( [any], [any] ) -> [any]
|
All members of a list without duplicates noredundant( [any] )
-> [any]
|
Union of two lists (without duplicates) union( [any], [any] )
-> [any]
|
All members of a that are not in b difference([any], [any])
-> [any]
|
Remove all or first occurrence(s) of v from l. removeFromList(
l, v, [all=1] )
|
Creates a set of n unique integers randomly distributed between start and stop.
|
Calculate linear least-square fit to the points given by x and y. see http://mathworld.wolfram.com/LeastSquaresFitting.html
|
Convert cartesian coordinate array to polar coordinate array:
x,y,z -> r, θ, φ
|
Convert polar coordinate array to cartesian coordinate array:
r, θ, φ -> x,y,z
|
Project the coordinates xyz on a sphere with a given radius around a given center.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Tue May 1 22:34:50 2007 | http://epydoc.sourceforge.net |