Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread David Cournapeau
On Sun, Mar 8, 2009 at 3:49 PM, Charles R Harris wrote: > So it's off to look at the > tickets and trying to fix bugs. Urrgh. Oh, and I suppose I should look into > the argmax/argmin functions and see how they handle nans. I think they don't at the moment: they have an implementation defined beh

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread Charles R Harris
On Sat, Mar 7, 2009 at 11:10 PM, David Cournapeau wrote: > That's strange - I redid the compilation this morning, and I now get > the same results as you (modulo the function call - I forced the > function call because that's how it would work in numpy), that is the > return value is builtin at

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread David Cournapeau
On Sun, Mar 8, 2009 at 4:34 AM, Charles R Harris wrote: > > > On Sat, Mar 7, 2009 at 11:57 AM, David Cournapeau > wrote: >> >> On Sun, Mar 8, 2009 at 3:20 AM, Charles R Harris >> wrote: >> >> > >> > The macro is ugly, unneeded, and obfuscating. Why construct a number >> > from >> > characters an

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread Charles R Harris
On Sat, Mar 7, 2009 at 11:57 AM, David Cournapeau wrote: > On Sun, Mar 8, 2009 at 3:20 AM, Charles R Harris > wrote: > > > > > The macro is ugly, unneeded, and obfuscating. Why construct a number from > > characters and shifts when you can just *write it down*? > > The idea was to replace the 'AB

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread David Cournapeau
On Sun, Mar 8, 2009 at 3:20 AM, Charles R Harris wrote: > > The macro is ugly, unneeded, and obfuscating. Why construct a number from > characters and shifts when you can just *write it down*? The idea was to replace the 'ABCD' multi-byte constant. If you think that writing down the correspondin

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread Charles R Harris
On Sat, Mar 7, 2009 at 11:20 AM, Charles R Harris wrote: > > > On Sat, Mar 7, 2009 at 11:02 AM, David Cournapeau wrote: > >> On Sun, Mar 8, 2009 at 2:52 AM, Charles R Harris >> wrote: >> > >> > >> > On Sat, Mar 7, 2009 at 11:41 AM, David Cournapeau >> > wrote: >> >> >> >> On Sat, Mar 7, 2009 at

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread Charles R Harris
On Sat, Mar 7, 2009 at 11:02 AM, David Cournapeau wrote: > On Sun, Mar 8, 2009 at 2:52 AM, Charles R Harris > wrote: > > > > > > On Sat, Mar 7, 2009 at 11:41 AM, David Cournapeau > > wrote: > >> > >> On Sat, Mar 7, 2009 at 6:01 AM, Charles R Harris > >> wrote: > >> > Hi David, > >> > > >> > Cur

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread David Cournapeau
On Sun, Mar 8, 2009 at 2:52 AM, Charles R Harris wrote: > > > On Sat, Mar 7, 2009 at 11:41 AM, David Cournapeau > wrote: >> >> On Sat, Mar 7, 2009 at 6:01 AM, Charles R Harris >> wrote: >> > Hi David, >> > >> > Currently, >> > >> > bint.i = __STR2INTCST("ABCD"); >> > >> > It is probably more por

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread Charles R Harris
On Sat, Mar 7, 2009 at 11:41 AM, David Cournapeau wrote: > On Sat, Mar 7, 2009 at 6:01 AM, Charles R Harris > wrote: > > Hi David, > > > > Currently, > > > > bint.i = __STR2INTCST("ABCD"); > > > > It is probably more portable to just initialize the union > > > > union { > > char c[4];

Re: [Numpy-discussion] Changeset 6557

2009-03-07 Thread David Cournapeau
On Sat, Mar 7, 2009 at 6:01 AM, Charles R Harris wrote: > Hi David, > > Currently, > > bint.i = __STR2INTCST("ABCD"); > > It is probably more portable to just initialize the union > >     union { >         char c[4]; >         npy_uint32 i; >     } bint = {'A','B','C','D'}; > Ah, tempting, right

Re: [Numpy-discussion] Changeset 6557

2009-03-06 Thread Charles R Harris
On Fri, Mar 6, 2009 at 2:01 PM, Charles R Harris wrote: > Hi David, > > Currently, > > bint.i = __STR2INTCST("ABCD"); > > It is probably more portable to just initialize the union > > union { > char c[4]; > npy_uint32 i; > } bint = {'A','B','C','D'}; > > > If you use const

[Numpy-discussion] Changeset 6557

2009-03-06 Thread Charles R Harris
Hi David, Currently, bint.i = __STR2INTCST("ABCD"); It is probably more portable to just initialize the union union { char c[4]; npy_uint32 i; } bint = {'A','B','C','D'}; If you use const union the initialization will be done at compile time. Chuck ___