[Numpy-discussion] array vs. matrix for matlab-compatible stuff

Travis Oliphant oliphant.travis at ieee.org
Wed Jan 18 16:10:11 CST 2006

Sven Schreiber wrote:

> Hi,
> I've spent a couple of weeks with scipy/numpy and the old-to-new 
> transition; now that the transition is over (?) but some confusion is 
> remaining (on my side) I feel the need to ask a basic question about 
> matlab compatibility in terms of matrix (linear algebra) programming.
> Take "eye" and "identity" for example; given that "eye" supposedly 
> exists to facilitate transiton from matlab to numpy/scipy (correct?), 
> I expected eye to be/return a matrix.

Historical is the only reason.  Numeric always returned an array for eye 
not a matrix.  We could return a matrix without difficulty especially if 
we put an eye --> identity transition in convertcode.py


More information about the Numpy-discussion mailing list