[PYTHON MATRIX-SIG] fft's
Paul. Dubois
dubois1@llnl.gov
Wed, 28 Feb 1996 09:19:27 -0800
Most routines of this type written in C or Fortran allow for the
possibility that an array has been declared of a larger size than it
actually is. For example
#define N 32
#define M 20
int n, m, c[N]{M];
n = something
m = something
...now you want to do something with c and as far as you are
concerned it is n by m.
In C, the arrays are stored so that in considering
c[i][j] and c[i][j+1], they are 1 storage unit apart, but
c[i][j] and c[i+1][j] are M apart. For Fortran, it works the
other way, and it is c(i,j) and c(i, j+1) that are N apart.
When you pass such a beast to a general routine, therefore, it is
necessary to tell it N in Fortran or M in C. So in your fft what they
want for lda is M.
However, when working with an object-oriented language, this kind of
partially full matrix just doesn't arise very often, and in most of
your work the python array x with shape (n,m) will be passed to the
library fft routine with lda = m.
Hope this helps.
--
Paul F. Dubois, L-472 (510)-422-5426
Lawrence Livermore National Laboratory FAX (510)-423-9969
Livermore, CA 94550 dubois1@llnl.gov
Consulting: PaulDubois@aol.com
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================