[Numpy-discussion] How do I make a diagonal matrix? (original) (raw)
Alan G Isaac aisaac at american.edu
Fri Jun 23 17:34:26 EDT 2006
- Previous message (by thread): [Numpy-discussion] How do I make a diagonal matrix?
- Next message (by thread): [Numpy-discussion] How do I make a diagonal matrix?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alan G Isaac wrote:
I can roughly understand why a.ravel() returns a matrix; but is there a good reason to forbid truly flattening the matrix?
On Fri, 23 Jun 2006, Travis Oliphant apparently wrote:
Because matrices are never 1-d. This is actually pretty consistent behavior.
Yes; that's why I can understand ravel. But I was referring to flat with the question.
On Fri, 23 Jun 2006, Travis Oliphant apparently wrote:
I think you are right that this is a bug, though. Because array() (which is where the behavior comes from) should return a base-class array (not a sub-class).
Thanks for fixing this!!
Alan
- Previous message (by thread): [Numpy-discussion] How do I make a diagonal matrix?
- Next message (by thread): [Numpy-discussion] How do I make a diagonal matrix?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]