Matthew Brett wrote:
> Hi,
>
>   
>> This is a result of PyArray_FromAny changing when object arrays are
>> explicitly requested (which they are in this case --- although behind
>> the scenes).
>>     
>
> Hmm - I think I am hitting a related bug/feature/surprising change in
> behavior, which is showing up rather obscurely in a failure of the
> scipy.io matlab loading tests:
>
> http://projects.scipy.org/scipy/scipy/ticket/258
>
> Here's the change I wasn't expecting, present with current SVN:
>
> a = arange(2)
> b = arange(1)
> c = array([a, b], dtype=object)
> c
> ->
> array([[0, 1],
>        [0, 0]], dtype=object)
>
> On a previous version of numpy (1.02b.dev2975) I get the answer I was 
> expecting:
>
> array([[0], [0 1]], dtype=object)
>   

Grrr..    Object arrays are very hard to get right.  I have no idea why 
this is happening, but I'll look into it.   I think it's the bug that 
led me to put in the special-case object-array handling in the first 
place.   Now, that special-case object-array handling is only done on an 
error condition, I need to fix this right and raise an inconsistent 
shape error.  It will probably help with the TypeError messages that are 
currently raised in this situation with other types as well.

-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