[Numpy-discussion] hashing dtypes, new variation, old theme

Mark Wiebe mwwiebe@gmail....
Thu Mar 17 17:48:48 CDT 2011

On Thu, Mar 17, 2011 at 3:30 PM, Pauli Virtanen <pav@iki.fi> wrote:

> Thu, 17 Mar 2011 15:23:19 -0700, Christopher Barker wrote:
> > On 3/17/11 2:57 PM, Mark Wiebe wrote:
> >> Dtypes being mutable looks like a serious bug to me, it's violating the
> >> definition of 'hashable' given here:
> >
> > I can imagine other problems is would cause, as well -- is there any
> > reason that dtypes should be mutable?
> Changing field names via the `names` attribute. AFAIK, the other
> attributes in dtypes are not mutable, and mutability was added long ago
> as a workaround for `.view()` not handling name changes properly.
> There's possibly some code out there that touches the `names` attribute,
> so it's not clear if this can be fixed in the 1.x series.

Fixing ticket #1619 looks like it needs changes to dtype construction and
__repr__, probably all these things should be fixed together at once. I
agree they likely have too many ripple effects to change for 1.6.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110317/cf0c164f/attachment.html 

More information about the NumPy-Discussion mailing list