From: Alan G I. <ai...@am...> - 2006-06-23 18:22:09
|
> Alan G Isaac wrote:=20 >> Hmm. One would think that diag() would accept a flatiter=20 >> object, but it does not. Shouldn't it??=20 On Fri, 23 Jun 2006, Travis Oliphant apparently wrote:=20 > It doesn't?=20 > try:=20 > a =3D rand(3,4)=20 > diag(a.flat).shape=20 OK, but then try: >>> a=3DN.mat(a) >>> N.diag(a.flat).shape (1,) Why is a.flat not the same as a.A.flat? Alan Isaac |