Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Todd Miller <jmiller@st...>  20030909 20:15:47

Now that Python has a bool type, I have received a patch for numarray's arrayprint module which alters the formatting of Boolean arrays from: >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a array([0, 1, 0, 1, 0, 1], type=Bool) to: >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a array([False, True, False, True, False, True], type=Bool) Which format do you prefer? Please vote for or against changing the format: +1 (for) or 1 (against).  Todd Miller jmiller@... STSCI / ESS / SSB 
From: Chris Barker <Chris.Barker@no...>  20030909 20:58:16

Todd Miller wrote: > >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > array([False, True, False, True, False, True], type=Bool) > > Which format do you prefer? Please vote for or against changing the > format: +1 (for) or 1 (against). 1 It just makes it harder to read, particularly for a large array Chris  Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 5266959 voice 7600 Sand Point Way NE (206) 5266329 fax Seattle, WA 98115 (206) 5266317 main reception Chris.Barker@... 
From: Colin J. Williams <cjw@sy...>  20030910 11:05:44

Chris Barker wrote: >Todd Miller wrote: > > > >>>>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a >>>>>> >>>>>> >>array([False, True, False, True, False, True], type=Bool) >> >>Which format do you prefer? Please vote for or against changing the >>format: +1 (for) or 1 (against). >> >> > >1 > >It just makes it harder to read, particularly for a large array > >Chris > Perhaps the important thing is to facilitate visual comparison between one row and another or between one array and another. Maybe 'False' and 'True ' (with a trailing space) could be used as representations of the Boolean values. If a compressed representation is desired then 'F' and 'T' might be used. This could be specified in a site constant which, for the distribution, would default to one of ('0, '1'), ('False', 'True'), ('False', 'True ') or ('F', 'T'). My feeling is that, since it can easily be done, it is desirable to distinguish between Integer and Boolean values. Colin W. > > > > 
From: Colin J. Williams <cjw@sy...>  20030909 21:42:40

Vote +1 Todd Miller wrote: >Now that Python has a bool type, I have received a patch for numarray's >arrayprint module which alters the formatting of Boolean arrays from: > > > >>>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a >>>>> >>>>> >array([0, 1, 0, 1, 0, 1], type=Bool) > >to: > > > >>>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a >>>>> >>>>> >array([False, True, False, True, False, True], type=Bool) > >Which format do you prefer? Please vote for or against changing the >format: +1 (for) or 1 (against). > > > 
From: Gerard Vermeulen <gvermeul@gr...>  20030910 07:28:23

1, because of readability Gerard On 09 Sep 2003 16:15:36 0400 Todd Miller <jmiller@...> wrote: > Now that Python has a bool type, I have received a patch for numarray's > arrayprint module which alters the formatting of Boolean arrays from: > > >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > array([0, 1, 0, 1, 0, 1], type=Bool) > > to: > > >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > array([False, True, False, True, False, True], type=Bool) > > Which format do you prefer? Please vote for or against changing the > format: +1 (for) or 1 (against). > >  > Todd Miller jmiller@... > STSCI / ESS / SSB > > > >  > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Numpydiscussion mailing list > Numpydiscussion@... > https://lists.sourceforge.net/lists/listinfo/numpydiscussion > 
From: Francesc Alted <falted@op...>  20030910 07:40:24

+ 1, because of consistency  Francesc Alted 
From: Pearu Peterson <pearu@ce...>  20030910 10:17:23

Considering the number of `1`s, how about >>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a array([F, T, F, T, F, T], type=Bool) which is short and readable. Pearu 
From: Michiel Jan Laurens de Hoon <mdehoon@im...>  20030910 15:15:38

1, for readability. 1's and 0's can be distinguished more easily visually than T's and F's. Michiel, U Tokyo. Pearu Peterson wrote: > Considering the number of `1`s, how about > > >>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > > array([F, T, F, T, F, T], type=Bool) > > which is short and readable. > > Pearu > > > >  > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Numpydiscussion mailing list > Numpydiscussion@... > https://lists.sourceforge.net/lists/listinfo/numpydiscussion > >  Michiel de Hoon Assistant Professor University of Tokyo, Institute of Medical Science Human Genome Center 461 Shirokanedai, Minatoku Tokyo 1088639 Japan http://bonsai.ims.utokyo.ac.jp/~mdehoon 
From: Chris Barker <Chris.Barker@no...>  20030910 16:21:09

Pearu Peterson wrote: > >>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > array([F, T, F, T, F, T], type=Bool) That's better. However, I"m still inclined to prefer [1, 0, 0, 1, .... Someone mentioned making clear the distiction between bool and int arrays. HOw distict are they? In Python, the bool type is really just a pretty wrapper around an Int anway. I like it, but if in NumArray, a bool is really and int in disguise, I'd be just as happy to ahve it be 0, 1, 0, .... If however, a bool really is a totally different beast (or will be in a future version), then maybe it's worth making the clear distiction. Chris For what I mean, note in Python 2.3: >>> a = True >>> a True >>> a * 5 5 Can you do this in NumArray?  Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 5266959 voice 7600 Sand Point Way NE (206) 5266329 fax Seattle, WA 98115 (206) 5266317 main reception Chris.Barker@... 
From: Todd Miller <jmiller@st...>  20030910 20:16:53

<snip> > > For what I mean, note in Python 2.3: > > >>> a = True > >>> a > True > >>> a * 5 > 5 > > > Can you do this in NumArray? The numarray analog is: >>> numarray.ones((10,), type=numarray.Bool)*5 array([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) So, yes.  Todd Miller jmiller@... STSCI / ESS / SSB 
From: Fernando Perez <fperez@co...>  20030910 16:35:47

Pearu Peterson wrote: > Considering the number of `1`s, how about > > >>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > > array([F, T, F, T, F, T], type=Bool) Somehow I seem to parse faster 0/1 arrays than F/T (the symbols are visually more different). 0.5, but better than the change to True/False. Cheers, f 
From: Chris Barker <Chris.Barker@no...>  20030911 16:29:02

Todd Miller wrote: > >>> numarray.ones((10,), type=numarray.Bool)*5 > array([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) > > So, yes. In that case, definately 1: if the data really are integers, that might as well be clear from the display Chris  Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 5266959 voice 7600 Sand Point Way NE (206) 5266329 fax Seattle, WA 98115 (206) 5266317 main reception Chris.Barker@... 
From: Paul Barrett <barrett@st...>  20030910 12:18:30

+1 for consistency and clarity. Todd Miller wrote: > Now that Python has a bool type, I have received a patch for numarray's > arrayprint module which alters the formatting of Boolean arrays from: > > >>>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > > array([0, 1, 0, 1, 0, 1], type=Bool) > > to: > > >>>>>a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > > array([False, True, False, True, False, True], type=Bool) > > Which format do you prefer? Please vote for or against changing the > format: +1 (for) or 1 (against). >  Paul Barrett, PhD Space Telescope Science Institute Phone: 4103384475 ESS/Science Software Group FAX: 4103384767 Baltimore, MD 21218 
From: Robert Kern <kern@ca...>  20030912 00:53:06

On Tue, Sep 09, 2003 at 04:15:36PM 0400, Todd Miller wrote: > Now that Python has a bool type, I have received a patch for numarray's > arrayprint module which alters the formatting of Boolean arrays from: > > >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > array([0, 1, 0, 1, 0, 1], type=Bool) > > to: > > >>>> a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a > array([False, True, False, True, False, True], type=Bool) > > Which format do you prefer? Please vote for or against changing the > format: +1 (for) or 1 (against). 1 If I'm using those kinds of values in arrays, I'm more likely to be thinking in terms of 1's and 0's not True's and False's anyways. E.g. frequency = float(sum(a)) / len(a)  Robert Kern kern@... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die."  Richard Harter 