[Numpy-discussion] Python vector and matrix formatter similar to Matlab
Sat Mar 10 11:12:01 CST 2007
On 10 Mar 2007 16:57:30 +0000, Alexander Schmolck <firstname.lastname@example.org>
> "Simon Wood" <email@example.com> writes:
> > To all,
> > I came across an old thread in the archives in which Alexander Schmolck
> > an example of a Matlab like matrix formatter he authored for Python. Is
> > formatter still available some where?
> Yup. I've still got it as part of a matrix class I wrote many years ago
> (because I found the one in Numeric mostly useless and arrays
> syntactically to
> awkward for linear algebra). Numpy sort of broke my design (which was
> anyway and partly rather incompetently implemented) and for various
> reasons I
> ended up mostly coding numeric stuff in matlab for some time anyway, but
> as I
> thankfully seem to be moving mostly back to python again, I do intend to
> salvage, port and clean up at least the formatting code (possibly more,
> were some other things I liked about it).
> With a bit of work this could either go into numpy/scipy if there's
> or maybe make a useful addition to ipython (as the main benefit is that
> really a much more handy way to display matrices (or indeed arrays) for
> interactive work).
> How urgently are you interested in this?
I wouldn't mind getting my hands on the formatting code sooner rather than
later if you can dig it up. I'm in the process of extending some underlying
C++ matrix and vector classes into Python and would like a good way (i.e.
Matlab way) to display the vectors and matrices. I currently convert my
underlying data to an array using the 'asarryay' method and then simply use
the 'repr' for arrays in displaying my data. I assume I will have to do some
work in getting my array/matrix data to work with your formatter as well.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion