You can subscribe to this list here.
2003 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}
(1) 
_{Nov}
(33) 
_{Dec}
(20) 

2004 
_{Jan}
(7) 
_{Feb}
(44) 
_{Mar}
(51) 
_{Apr}
(43) 
_{May}
(43) 
_{Jun}
(36) 
_{Jul}
(61) 
_{Aug}
(44) 
_{Sep}
(25) 
_{Oct}
(82) 
_{Nov}
(97) 
_{Dec}
(47) 
2005 
_{Jan}
(77) 
_{Feb}
(143) 
_{Mar}
(42) 
_{Apr}
(31) 
_{May}
(93) 
_{Jun}
(93) 
_{Jul}
(35) 
_{Aug}
(78) 
_{Sep}
(56) 
_{Oct}
(44) 
_{Nov}
(72) 
_{Dec}
(75) 
2006 
_{Jan}
(116) 
_{Feb}
(99) 
_{Mar}
(181) 
_{Apr}
(171) 
_{May}
(112) 
_{Jun}
(86) 
_{Jul}
(91) 
_{Aug}
(111) 
_{Sep}
(77) 
_{Oct}
(72) 
_{Nov}
(57) 
_{Dec}
(51) 
2007 
_{Jan}
(64) 
_{Feb}
(116) 
_{Mar}
(70) 
_{Apr}
(74) 
_{May}
(53) 
_{Jun}
(40) 
_{Jul}
(519) 
_{Aug}
(151) 
_{Sep}
(132) 
_{Oct}
(74) 
_{Nov}
(282) 
_{Dec}
(190) 
2008 
_{Jan}
(141) 
_{Feb}
(67) 
_{Mar}
(69) 
_{Apr}
(96) 
_{May}
(227) 
_{Jun}
(404) 
_{Jul}
(399) 
_{Aug}
(96) 
_{Sep}
(120) 
_{Oct}
(205) 
_{Nov}
(126) 
_{Dec}
(261) 
2009 
_{Jan}
(136) 
_{Feb}
(136) 
_{Mar}
(119) 
_{Apr}
(124) 
_{May}
(155) 
_{Jun}
(98) 
_{Jul}
(136) 
_{Aug}
(292) 
_{Sep}
(174) 
_{Oct}
(126) 
_{Nov}
(126) 
_{Dec}
(79) 
2010 
_{Jan}
(109) 
_{Feb}
(83) 
_{Mar}
(139) 
_{Apr}
(91) 
_{May}
(79) 
_{Jun}
(164) 
_{Jul}
(184) 
_{Aug}
(146) 
_{Sep}
(163) 
_{Oct}
(128) 
_{Nov}
(70) 
_{Dec}
(73) 
2011 
_{Jan}
(235) 
_{Feb}
(165) 
_{Mar}
(147) 
_{Apr}
(86) 
_{May}
(74) 
_{Jun}
(118) 
_{Jul}
(65) 
_{Aug}
(75) 
_{Sep}
(162) 
_{Oct}
(94) 
_{Nov}
(48) 
_{Dec}
(44) 
2012 
_{Jan}
(49) 
_{Feb}
(40) 
_{Mar}
(88) 
_{Apr}
(35) 
_{May}
(52) 
_{Jun}
(69) 
_{Jul}
(90) 
_{Aug}
(123) 
_{Sep}
(112) 
_{Oct}
(120) 
_{Nov}
(105) 
_{Dec}
(116) 
2013 
_{Jan}
(76) 
_{Feb}
(26) 
_{Mar}
(78) 
_{Apr}
(43) 
_{May}
(61) 
_{Jun}
(53) 
_{Jul}
(147) 
_{Aug}
(85) 
_{Sep}
(83) 
_{Oct}
(122) 
_{Nov}
(18) 
_{Dec}
(27) 
2014 
_{Jan}
(58) 
_{Feb}
(25) 
_{Mar}
(49) 
_{Apr}
(17) 
_{May}
(29) 
_{Jun}
(39) 
_{Jul}
(53) 
_{Aug}
(52) 
_{Sep}
(35) 
_{Oct}
(25) 
_{Nov}

_{Dec}

S  M  T  W  T  F  S 







1

2

3

4
(4) 
5
(3) 
6

7

8

9
(2) 
10
(2) 
11
(7) 
12
(3) 
13

14
(1) 
15
(1) 
16

17
(4) 
18
(1) 
19

20
(1) 
21
(1) 
22

23

24

25
(5) 
26
(3) 
27
(4) 
28
(1) 
29

30

31






From: Perry Greenfield <perry@st...>  20040511 21:38:09

What you are seeing is one of the odd inconsistencies present in Numeric regarding what kind of thing is returned for a single element. This has been discussed on the numpy list some years back. >>> a = zeros((3,3), 'f') >>> type(a[0,0]) <type 'array'> >>> type(a[0][0]) <type 'float'> >>> b = zeros((3,3), 'd') >>> type(b[0,0]) <type 'float'> >>> type(b[0][0]) <type 'float'> So what kind of thing you get back when indexing a 2d array depends on both the type and dimensionality of the array. The basic rule is that if the array is more than one dimension, and not one of the basic python numerical types (e.g., 'f') then indexing a single element tries to preserve the type by returning a rank0 array of the same type. Oddly though, indexing a single element of a 1d 'f' array returns a Python float scalar (why the difference, I have no idea). This is why a[0][0] returns something different than a[0,0] since one is indexing a 1d array (a[0]). For numarray we decided that indexing a single element would always return a Python scalar since that seemed to be what most expected. There were those that argued that it should always return a rank0 array, but we decided against that. Perry > Original Message > From: matplotlibdeveladmin@... > [mailto:matplotlibdeveladmin@...]On Behalf Of rod > holland > Sent: Tuesday, May 11, 2004 4:59 PM > To: matplotlibdevel@... > Subject: [matplotlibdevel] problem with <type 'array'> in pcolor > > > The following code > > ====================== > from matplotlib.matlab import * > > x = arange(0,20,.2) > y = arange(0,20,.2) > X, Y = meshgrid(x,y) > z=zeros((len(x),len(y)),'f') > for i in enumerate(x): > for j in enumerate(y): > z[i[0]][j[0]]=10*sin(i[1]*j[1]) > #or z[i[0],j[0]]=10*sin(i[1]*j[1]) > pcolor(X,Y, transpose(z),shading='faceted') > show() > ======================= > > breaks in the module color.py > > ============================= > def get_color(self, val, valmin, valmax): > # map val to a range > from 0 to 1 > if iterable(val): > s = "val must be a scalar. > Perhaps you meant to call get_colors?" > #print val,type(val) > raise ValueError, s > #print valmin, valmax > #print > val,type(val) > ind = self.indmax*(valvalmin)/(valmaxvalmin) > return > self.rgbs[self._bound_ind(ind)] > ============================== > > because the test for iterable fails since the element C[i,j] is type > <array>. One solution is to change the code section around line 1126 in > axes.py from c = C[i,j] to the following. > > ===================== > for i in range(Nx1): > for j in range(Ny1): > > c = C[i][j] > ======================= > > > the form C[i][j] seems to always return float. > > > >  > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to > deliver higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > _______________________________________________ > Matplotlibdevel mailing list > Matplotlibdevel@... > https://lists.sourceforge.net/lists/listinfo/matplotlibdevel > 
From: rod holland <rhh@st...>  20040511 21:05:06

[The following problem seems to occur with Numeric but not with numarray] The following code ====================== from matplotlib.matlab import * x = arange(0,20,.2) y = arange(0,20,.2) X, Y = meshgrid(x,y) z=zeros((len(x),len(y)),'f') for i in enumerate(x): for j in enumerate(y): z[i[0]][j[0]]=10*sin(i[1]*j[1]) #or z[i[0],j[0]]=10*sin(i[1]*j[1]) pcolor(X,Y, transpose(z),shading='faceted') show() ======================= breaks in the module color.py ============================= def get_color(self, val, valmin, valmax): # map val to a range from 0 to 1 if iterable(val): s = "val must be a scalar. Perhaps you meant to call get_colors?" #print val,type(val) raise ValueError, s #print valmin, valmax #print val,type(val) ind = self.indmax*(valvalmin)/(valmaxvalmin) return self.rgbs[self._bound_ind(ind)] ============================== because the test for iterable fails since the element C[i,j] is type <array>. One solution is to change the code section around line 1126 in axes.py from c = C[i,j] to the following. ===================== for i in range(Nx1): for j in range(Ny1): c = C[i][j] ======================= the form C[i][j] seems to always return float. 
From: rod holland <rhh@st...>  20040511 20:58:09

The following code ====================== from matplotlib.matlab import * x = arange(0,20,.2) y = arange(0,20,.2) X, Y = meshgrid(x,y) z=zeros((len(x),len(y)),'f') for i in enumerate(x): for j in enumerate(y): z[i[0]][j[0]]=10*sin(i[1]*j[1]) #or z[i[0],j[0]]=10*sin(i[1]*j[1]) pcolor(X,Y, transpose(z),shading='faceted') show() ======================= breaks in the module color.py ============================= def get_color(self, val, valmin, valmax): # map val to a range from 0 to 1 if iterable(val): s = "val must be a scalar. Perhaps you meant to call get_colors?" #print val,type(val) raise ValueError, s #print valmin, valmax #print val,type(val) ind = self.indmax*(valvalmin)/(valmaxvalmin) return self.rgbs[self._bound_ind(ind)] ============================== because the test for iterable fails since the element C[i,j] is type <array>. One solution is to change the code section around line 1126 in axes.py from c = C[i,j] to the following. ===================== for i in range(Nx1): for j in range(Ny1): c = C[i][j] ======================= the form C[i][j] seems to always return float. 
From: Todd Miller <jmiller@st...>  20040511 19:24:41

On Tue, 20040511 at 14:03, John Hunter wrote: > Rod sent me the email included below this off list. I was hoping to > get some input from the numarray gurus. It's my thought that he > should just be doing > > z[i[0], j[0]]=10*sin(i[1]*j[1]) > > rather than > > z[i[0]][j[0]]=10*sin(i[1]*j[1]) > > Is there a compelling argument either way? I think the first form is preferred, because the zindexing evaluates to a single setitem. The second form creates a view of a row of z and then does a setitem on it... it is less efficient as well as harder to read. BTW, both forms worked for me. I got the impression that the first form would fail. If it failed for you, what value do you have for numarray.__version__? Todd > > JDH > > > ______________________________________________________________________ > > From: rod holland <rhh@...> > To: John Hunter <jdhunter@...> > Subject: Re: [matplotlibdevel] array bug fix > Date: 11 May 2004 11:18:22 0700 > > XFromLine: rhh@... Tue May 11 12:54:56 2004 > ReturnPath: <rhh@...> > XOriginalTo: jdhunter@... > DeliveredTo: jdhunter@... > Received: from webperception.com (nitace [128.135.97.130]) > by ace.bsd.uchicago.edu (Postfix) with ESMTP id 76C3CEF21 > for <jdhunter@...>; Tue, 11 May 2004 12:54:55 0500 (CDT) > Received: from nthome ([64.7.82.86]) > by webperception.com (WebPerception Mail Server) with SMTP id > HRA74455 > for <jdhunter@...>; Tue, 11 May 2004 11:17:10 0700 > MessageId: <3.0.3.32.20040511111822.00fb3e28@...> > XSender: rhh@... > XMailer: QUALCOMM Windows Eudora Pro Version 3.0.3 (32) > Date: Tue, 11 May 2004 11:18:22 0700 > To: John Hunter <jdhunter@...> > From: rod holland <rhh@...> > Subject: Re: [matplotlibdevel] array bug fix > Lines: 82 > Xref: mother.paradise.lost maillist.matplotlibdevel:322 > MIMEVersion: 1.0 > > fixit note: John  take the bracket off transpose(z)  that was put in for > testing. Once you make the change in C[i][j] you can add the bracket to > force failure and test. I took the bracket off in the code below. > > > If one forms a base array, for example, by using the ones or zeros > functions with the float type ('f') in numeric (or numarray) (and then > modfies elements wiht some loop  but this step really does not matter), > each element in the array will have type <array> when called as you do in > axes. Just give it a try. I do not know why this is the case  it may be > because the element type (float) is part of the data type. > > Here is a bit of code I tried that breaks your implementation: > > from matplotlib.matlab import * > > x = arange(0,20,.2) > y = arange(0,20,.2) > X, Y = meshgrid(x,y) > z=zeros((len(x),len(y)),'f') > for i in enumerate(x): > for j in enumerate(y): > z[i[0]][j[0]]=10*sin(i[1]*j[1]) > pcolor(X,Y, transpose(z),shading='faceted') > show() > > > The test for float occurs in color.py as follows: > > def get_color(self, val, valmin, valmax): > # map val to a range > from 0 to 1 > if iterable(val): > s = "val must be a scalar. > Perhaps you meant to call get_colors?" > #print val,type(val) > raise ValueError, s > #print valmin, valmax > #print > val,type(val) > ind = self.indmax*(valvalmin)/(valmaxvalmin) > return > self.rgbs[self._bound_ind(ind)] > > > This breaks unless you form the element array value as C[i][j]. > > > At 06:41 AM 5/11/2004 0500, you wrote: > >>>>>> "rod" == rod holland <rhh@...> writes: > > > > rod> lines 1123  1126 in axes.py should be changed at c = C[i,j] > > rod> to the following. As it now stands a floating point number > > rod> from a numeric array will generally register as type array > > rod> rather than type float and be rejected as not iterable when > > rod> later tested. > > > > rod> for i in range(Nx1): for j in range(Ny1): > > > > rod> c = C[i][j] > > > > > >Sorry to be dense, but even after your detailed explanation I don't > >really understand why you are getting an error. > > > > * Are you passing a numerix array of floats for C? If so C[i,j] > > should return the float we want > > > > * What do you mean will be "rejected as not iterable when later > > tested"? I don't see any tests for iterable in poclor. > > > > * What is it you are doing differently that causes pcolor to fail > > for you but not for the other uses, eg in pcolor_demo.py? > > > >If you could give me a little more information to clear up these > >questions that would be helpful. Also, if you could post the > >traceback you are getting that might help. > > > >Thanks! > >John Hunter > >  Todd Miller <jmiller@...> 
From: John Hunter <jdhunter@ac...>  20040511 18:26:01

From: John Hunter <jdhunter@ac...>  20040511 12:03:51

>>>>> "rod" == rod holland <rhh@...> writes: rod> lines 1123  1126 in axes.py should be changed at c = C[i,j] rod> to the following. As it now stands a floating point number rod> from a numeric array will generally register as type array rod> rather than type float and be rejected as not iterable when rod> later tested. rod> for i in range(Nx1): for j in range(Ny1): rod> c = C[i][j] Sorry to be dense, but even after your detailed explanation I don't really understand why you are getting an error. * Are you passing a numerix array of floats for C? If so C[i,j] should return the float we want * What do you mean will be "rejected as not iterable when later tested"? I don't see any tests for iterable in poclor. * What is it you are doing differently that causes pcolor to fail for you but not for the other uses, eg in pcolor_demo.py? If you could give me a little more information to clear up these questions that would be helpful. Also, if you could post the traceback you are getting that might help. Thanks! John Hunter 
From: rod holland <rhh@st...>  20040511 05:14:28

lines 1123  1126 in axes.py should be changed at c = C[i,j] to the following. As it now stands a floating point number from a numeric array will generally register as type array rather than type float and be rejected as not iterable when later tested. for i in range(Nx1): for j in range(Ny1): c = C[i][j] 