[SciPy-dev] I can't find howto get exp(x) or a^x in NumPy_for_Matlab_Users page

Robert Kern robert.kern@gmail....
Thu Jun 28 10:24:23 CDT 2007


Anne Archibald wrote:
> On 28/06/07, Matthieu Brucher <matthieu.brucher@gmail.com> wrote:
> 
>> numpy.exp for a element-wise exponentiation, and a**x for a^x
> 
> To expand on this: if M is a matrix (not array), then M**3 will
> compute the cube of the matrix (fairly efficiently). But this will not
> handle fractional exponents (I'm not totally sure those are
> well-defined anyway) and I don't know if there is a matrix exponential
> in numpy.

scipy.linalg has expm, expm2, and expm3 which do the matrix exponential by Padé
approximation, eigenvalues, and Taylor series, respectively.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


More information about the Scipy-dev mailing list