Keith Goodman wrote:
> diag(NxN matrix) should return a Nx1 matrix
> diag(Nx1 or 1xN matrix) should return a NxN matrix

This is the key problem: extracting the diagonal of a matrix and 
creating a matrix from a diagonal are two different operations: 
overloading one function to do both was a bad idea to begin with.

Maybe we should just keep diag() as is is for backward compatibility 
(deprecated), and make:

get_diag() and make_diag() instead.

Then it would be unambiguous what you wanted with:

make_diag(<Nx1array>)

You can call them something else, but you get the idea.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer
                                                
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to