[Numpy-discussion] Matrix construction (original) (raw)

Travis Oliphant oliphant at ee.byu.edu
Fri Jun 23 13:14:26 EDT 2006


Ed Schofield wrote:

On 22/06/2006, at 12:40 AM, Bill Baxter wrote:

Actually I think using mat() (just an alias for the matrix constructor) is a bad way to do it. That mat() (and most others on that page) should probably be replaced with asmatrix() to avoid the copy.

Perhaps the 'mat' function should become an alias for 'asmatrix'. I've thought this for a while. Then code and documentation like this page could remain short and simple without incurring the performance penalty. I wanted this too a while back but when I tried it a lot of code broke because there were quite a few places (in SciPy and NumPy) that were using the fact that mat returned a copy of the array.

-Travis



More information about the NumPy-Discussion mailing list