SciPy 0.2 release: was Re: [SciPy-user] Couple of Matrix() questions

Jeff Layton jeffrey.b.layton at lmco.com
Tue Sep 23 10:26:55 EDT 2003


Nils Wagner wrote:

> Jeff Layton schrieb:
> >
> > Pearu Peterson wrote:
> >
> > >
> > >
> > > On Sun, 31 Aug 2003, Gary Pajer wrote:
> > >
> > > > [...]
> > > > >  >>> E=hstack((vstack((A,C)),vstack((B,D))))
> > > > >
> > > > > which is not an array type (maybe not a bad thing). However, I'd
> > > still
> > > > > like to avoid so much work (typing, watching my tuples, etc.) 
> to just
> > > > > do something so simple. Oh well, Roberts matcat function seems to
> > > > > work just great. I just hate to have a function for each common
> > > matrix
> > > > > function when it could (or should) be part of the underlying 
> class.
> > > >
> > > > I argree entirely, and I continue to search for the syntax that
> > > makes it so.
> > >
> > > How about adding some new ?stack-type of methods to Matrix:
> > >
> > >   E = A.vstack(C).hstack(B.vstack(D))
> > >
> > > ? Suggestions for a better naming for such ?stack methods?
> > >
>
> Afaik, it is the so-called vec operator.
>

Can you give an example?

Thanks!

> Nils
>
> > > Another idea: extend Matrix constructor to accept a list of 
> matrix-like
> > > objects so that stacking of matrices can be achived as follows:
> > >
> > >   E = mat([[A,B],[C,D]])
> > >
> > > where A,B,C,D are Matrix instances with appropiate shapes.
> > >
> >
> > Could this be implemented for the 0.2 release? It doesn't seem too
> > difficult (but then again I didn't volunteer to do it) :)
> >
> > Thanks!
> >
> > Jeff
> >
> > > Pearu
> > >
>

-- 
Dr. Jeff Layton
Chart Monkey - Aerodynamics and CFD
Lockheed-Martin Aeronautical Company - Marietta





More information about the SciPy-User mailing list