Re: [Numpy-discussion] 0/0 == 0?

2014-10-04 Thread Georg Brandl
On 10/03/2014 11:24 PM, Charles R Harris wrote: > What I want is that the following script would warn three times > > import numpy as np > > z = np.zeros(1, dtype=np.int ) > > def f(x): > return x/x > > f(z) > f(z) > f(z) > > But it only warns once. That is not helpful when

Re: [Numpy-discussion] 0/0 == 0?

2014-10-03 Thread Georg Brandl
On 10/03/2014 06:13 AM, Charles R Harris wrote: > Plus the g*dawful warning default to only warn once. That has always bothered > me, it just seems useless. If you use a custom warning, there's no reason why you couldn't set a filter that shows it every time by default. Georg __

Re: [Numpy-discussion] The "I" dtype character

2013-04-11 Thread Georg Brandl
Am 08.04.2013 09:14, schrieb Georg Brandl: > Hi, > > is it intentional that "I" is supported as a dtype character, but cannot be > suffixed with a size? > >>>> dtype('i1') > dtype('int8') >>>> dtype('I1') >

[Numpy-discussion] The "I" dtype character

2013-04-08 Thread Georg Brandl
Hi, is it intentional that "I" is supported as a dtype character, but cannot be suffixed with a size? >>> dtype('i1') dtype('int8') >>> dtype('I1') dtype('uint32') I know "u" is documented as unsigned integer, but this seems an unnecessary restriction that is confusing. thanks, Georg _

Re: [Numpy-discussion] Casting Bug or a "Feature"?

2013-01-18 Thread Georg Brandl
Am 17.01.2013 17:21, schrieb Chris Barker - NOAA Federal: > On Wed, Jan 16, 2013 at 11:34 PM, Matthieu Brucher > >> Of course a += b is not the same as a = a + b. The first one modifies the >> object a, the second one creates a new object and puts it inside a. The >> behavior IS consistent. > > E