Re: [Numpy-discussion] dtype comparison, hash

2012-03-05 Thread David Cournapeau
On Tue, Jan 17, 2012 at 9:28 AM, Robert Kern wrote: > On Tue, Jan 17, 2012 at 05:11, Andreas Kloeckner > wrote: >> Hi Robert, >> >> On Fri, 30 Dec 2011 20:05:14 +, Robert Kern >> wrote: >>> On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner >>> wrote: >>> > Hi Robert, >>> > >>> > On Tue, 27

Re: [Numpy-discussion] dtype comparison, hash

2012-01-17 Thread Robert Kern
On Tue, Jan 17, 2012 at 05:11, Andreas Kloeckner wrote: > Hi Robert, > > On Fri, 30 Dec 2011 20:05:14 +, Robert Kern wrote: >> On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner >> wrote: >> > Hi Robert, >> > >> > On Tue, 27 Dec 2011 10:17:41 +, Robert Kern >> > wrote: >> >> On Tue, Dec

Re: [Numpy-discussion] dtype comparison, hash

2012-01-16 Thread Andreas Kloeckner
Hi Robert, On Fri, 30 Dec 2011 20:05:14 +, Robert Kern wrote: > On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner > wrote: > > Hi Robert, > > > > On Tue, 27 Dec 2011 10:17:41 +, Robert Kern > > wrote: > >> On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner > >> wrote: > >> > Hi all, > >>

Re: [Numpy-discussion] dtype comparison, hash

2011-12-30 Thread Robert Kern
On Fri, Dec 30, 2011 at 18:57, Andreas Kloeckner wrote: > Hi Robert, > > On Tue, 27 Dec 2011 10:17:41 +, Robert Kern wrote: >> On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner >> wrote: >> > Hi all, >> > >> > Two questions: >> > >> > - Are dtypes supposed to be comparable (i.e. implement '==

Re: [Numpy-discussion] dtype comparison, hash

2011-12-30 Thread Andreas Kloeckner
Hi Robert, On Tue, 27 Dec 2011 10:17:41 +, Robert Kern wrote: > On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner > wrote: > > Hi all, > > > > Two questions: > > > > - Are dtypes supposed to be comparable (i.e. implement '==', '!=')? > > Yes. > > > - Are dtypes supposed to be hashable? > >

Re: [Numpy-discussion] dtype comparison, hash

2011-12-27 Thread Robert Kern
On Tue, Dec 27, 2011 at 01:22, Andreas Kloeckner wrote: > Hi all, > > Two questions: > > - Are dtypes supposed to be comparable (i.e. implement '==', '!=')? Yes. > - Are dtypes supposed to be hashable? Yes, with caveats. Strictly speaking, we violate the condition that objects that equal each o

[Numpy-discussion] dtype comparison, hash

2011-12-26 Thread Andreas Kloeckner
Hi all, Two questions: - Are dtypes supposed to be comparable (i.e. implement '==', '!=')? - Are dtypes supposed to be hashable? PyCUDA and PyOpenCL assume both in a few places, but at least hashability doesn't seem to be true. (If so, __hash__ should be implemented to throw an error. If not, w