Matt Knox wrote:
> is the following behaviour expected? or is this a bug with 
> numpy.object_  ?  I'm using numpy 1.0b1
>  
> >>> print numpy.array([],numpy.float64).size
> 0
>
> >>> print numpy.array([],numpy.object_).size
> 1
>
> Should the size of an array initialized from an empty list not always 
> be 1 ? or am I just crazy?
>  
Not in this case.  Explictly creating an object array from any object 
(even the empty-list object) gives you a 0-d array containing that 
object.   When you explicitly create an object array a different section 
of code handles it and gives this result.  This is a recent change, and 
I don't think this use-case was considered as a backward incompatibility 
(which I believe it is).   Perhaps we should make it so array([],....) 
always returns an empty array.   I'm not sure.   Comments?

-Travis




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to