On 10 Mar 2007 16:57:30 +0000, Alexander Schmolck <[EMAIL PROTECTED]> wrote:
"Simon Wood" <[EMAIL PROTECTED]> writes: > To all, > I came across an old thread in the archives in which Alexander Schmolck gave > an example of a Matlab like matrix formatter he authored for Python. Is this > 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 flawed 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, there were some other things I liked about it). With a bit of work this could either go into numpy/scipy if there's interest or maybe make a useful addition to ipython (as the main benefit is that it's really a much more handy way to display matrices (or indeed arrays) for interactive work). How urgently are you interested in this? 'as
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. -Simon
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion