[Numpy-discussion] repr and object arrays

Charles R Harris charlesr.harris at gmail.com
Thu Oct 1 02:23:45 EDT 2009


On Wed, Sep 30, 2009 at 8:52 PM, Robert Kern <robert.kern at gmail.com> wrote:

> On Wed, Sep 30, 2009 at 21:45, Charles R Harris
> <charlesr.harris at gmail.com> wrote:
> > Hi All,
> >
> > It seems that repr applied do an object array does not provide the info
> > needed to recreate it:
> >
> > In [22]: y = array([Decimal(1)]*2)
> >
> > In [23]: repr(y)
> > Out[23]: 'array([1, 1], dtype=object)'
> >
> > And of course, there is going to be a problem with arrays of more than
> one
> > dimension anyway. But I wonder if this should be fixed?
>
> Using repr() instead of str() for the items would probably be wise.
>
>
OK, I'll open a ticket for it.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20091001/0c7e5ffe/attachment.html>


More information about the NumPy-Discussion mailing list