Fernando Perez wrote:

>Hi all,
>
>I'm puzzled by this behavior a colleague ran into:
>
>In [38]: p1=N.poly1d([1.])
>
>In [39]: a=N.array([p1],dtype='O')
>
>In [40]: a
>Out[40]: array([], shape=(1, 0), dtype=object)
>
>In [42]: print a
>[]
>
>  
>

Stefan correctly identified the problem.   The dimension-discovery code 
is getting confused.
This might actually be a fixable bug.  But, in general getting the 
N.array() code to correctly guess where the "Object-line" should be 
drawn is difficult at best.   The current code is a re-write of a 
previous code.  But, still it cannot solve the poorly defined problem.

So, I would suggest creating empty arrays and populating them...

-Travis

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

Reply via email to