[Numpy-discussion] Problem with concatenate and object arrays

Charles R Harris charlesr.harris at gmail.com
Sun Sep 3 15:43:42 CDT 2006


On 9/3/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
>
> Hi all,
>
> I'm wondering if the following difference in behavior of object arrays
> should
> be considered a bug.  Let a and b be:
>
> In [21]: a = [0,1]
>
> In [22]: b = [ None, None]
>
> If we concatenate a with an empty list, it works:
>
> In [23]: numpy.concatenate(([],a))
> Out[23]: array([0, 1])
>
> But not so for b:
>
> In [24]: numpy.concatenate(([],b))
>
> ---------------------------------------------------------------------------
> exceptions.ValueError                                Traceback (most
> recent
> call last)
>
> /home/fperez/<ipython console>
>
> ValueError: 0-d arrays can't be concatenated


I think it's propably a bug:

>>> concatenate((array([]),b))
array([None, None], dtype=object)

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060903/50a5a9de/attachment.html 


More information about the Numpy-discussion mailing list