[PYTHON MATRIX-SIG] Final conventions for alpha2
Sat, 17 Aug 1996 21:04:47 +0100 (BST)
On Fri, 16 Aug 1996, Konrad HINSEN wrote:
> > I don't have a particular bias towards fft, but I do have one towards
> > the huge collection of non-strctural numeric operations that have the
> > same properties. Things like histogram, spline, sort, argmax, etc.
> That may be a long list, but how often are they applied to arrays
> of rank higher than 1? In other words, how frequently would one
> have to override a default of zero?
Everytime one wanted to evaluate the fft (or whatever) of multiple
one-dimensional signals at once. In genetic algorithms (GAs, what I would
like to write code for), individuals can all be evaluated independently
from each other, which is ideal for vectorized operations. If assessing
each individual involves computing the fft of a different 1d signal, then
If one can say that individuals (in GAs, that is) will mostly be described
by 1d (vector of decision variables, vector of objective values, etc) or
2d structures (a covariance matrix, a 2d pattern), and that outer
dimensions will be used to structure the population, since most
computations will be local to the individual itself, -1 and -2 will
definetely be the most common choices for axes.
I am still new to Python (but experieced with MATLAB), and I've only
written a couple of functions so far. But the answer to your question is
"very often", in my case...
> most typical application of a function. Basically, the default
> should be zero for structural operations, -1 for non-structural
> operations acting on vectors, and -2 for non-structural operations
> acting on matrices (e.g. inversion). I don't think this is difficult
> to remember, and I can't think of a function for which the answer
> according to this rule is not obvious.
I am afraid I do not understand what you mean by structural and
non-structural operations. In particular, why is take() structural and
argsort() non-structural? For take(a,argsort(a)) to make sense, both
should have the same defaults, whatever the dimensions of a.
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org