Simple Matrix class

Paul McGuire ptmcg at
Wed Jan 24 19:49:00 CET 2007

On Jan 24, 11:21 am, Gabriel Genellina <gagsl... at> wrote:
> At Wednesday 24/1/2007 02:40, Paul McGuire wrote:
> > > The points should be aligned on a log-log plot to be a power function.
> > > As Robert Kern stated before, this problem should be not worse than
> > > O(n**3) - how have you implemented it?
> >Sure enough, the complete equation is t = 5e-05exp(1.1n), or t = 5e-05
> >X 3**n.
> So either reimplement it better, or place a notice in BIG letters to
> your users about the terrible time and memory penalties of using inverse()

Well, really, the "terrible time and memory penalties" aren't all that
terrible for matrices up to, oh, 10x10 or so, but you wouldn't want to
use this on anything much larger than that.  Hey, guess what?!  That's
exactly what I said in my original post!

And the purpose/motivation for "reimplementing it better" would be
what, exactly?  So I can charge double for it?  As it was, I felt a
little guilty for posting a solution to such a likely homework
assignment, but now there's room for a student to implement a kickass
inverter routine in place of the crappy-but-useful-for-small-matrices
brute force one I've written.

Cubs win!
-- Paul

More information about the Python-list mailing list