[Numpy-discussion] Arrays of poly1d objects, is this a bug?
oliphant at ee.byu.edu
Fri Jan 26 14:50:14 CST 2007
Fernando Perez wrote:
>I'm puzzled by this behavior a colleague ran into:
>In : p1=N.poly1d([1.])
>In : a=N.array([p1],dtype='O')
>In : a
>Out: array(, shape=(1, 0), dtype=object)
>In : 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...
More information about the Numpy-discussion