[Numpy-discussion] matrix problem: float to matrix power

Alan G Isaac aisaac@american....
Thu Nov 1 14:20:11 CDT 2007


On Wed, 31 Oct 2007, Timothy Hochberg apparently wrote:
> because M**n results in the matrix power of n. It would be 
> confusing if n**M did a broadcast element wise power. 



In an attempt to summarize:
scalar to a matrix power

1. may have been overlooked, or may have been omitted as 
confusing
2. if overlooked there are two possible answers as to what 
it could reasonably be
        a. a**m = exp(ln(a)*m)          natural definition
        b. a**m = a**m.A                broadcasting

In languages that provide an answer, I have the impression
that the answer is usually (b).  (E.g., GAUSS.)  However 
perhaps in NumPy this is the least interesting way to go?
But it is what I was expecting.

Cheers,
Alan Isaac





More information about the Numpy-discussion mailing list