Re: [Numpy-discussion] matrix <-> ndarray bug

2008-01-31 Thread dmitrey
Alan G Isaac wrote:
> On Thu, 31 Jan 2008, dmitrey apparently wrote:
>   
>> already fixed in more recent versions? 
>> 
>
> Yes, at least it's fixed in my 1.0.4.
>
> By the way, do you know about the ``A`` attribute of matrices?
>   
Yes, I know, but numpy.ndarray has no the attribute (I had said it's 
better to be present, as well as .M for matrices, but numpy developers 
hadn't paid attention), and since I don't know does user pass ndarray or 
matrix to a func, it's better using asfarray(a) than a.A (later will 
fail on ndarrays)
Regards, D.

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] matrix <-> ndarray bug

2008-01-31 Thread Alan G Isaac
On Thu, 31 Jan 2008, dmitrey apparently wrote:
> already fixed in more recent versions? 

Yes, at least it's fixed in my 1.0.4.

By the way, do you know about the ``A`` attribute of matrices?

Cheers,
Alan Isaac



___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] matrix <-> ndarray bug

2008-01-31 Thread dmitrey
I don't know, maybe it's already fixed in more recent versions?

 >>> from numpy import *
 >>> a=mat('1  2')
 >>> b = asfarray(a).flatten()
 >>> print b[0]
[[ 1.  2.]]

# ^^ I expected getting 1.0 here

 >>> numpy.version.version
'1.0.3'
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion