Re: [Numpy-discussion] patching docs

2009-04-23 Thread Stéfan van der Walt
2009/4/24 william ratcliff : > I signed up for an account as williamratcliff > > May I have edit rights? Done! Cheers Stéfan ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] patching docs

2009-04-23 Thread william ratcliff
I signed up for an account as williamratcliff May I have edit rights? Thanks, William 2009/4/24 Stéfan van der Walt > Hi William > > Please sign up for an account on the docs editor at > > http://docs.scipy.org > > Regards > Stéfan > > 2009/4/24 william ratcliff : > > Hi! I'd like to suggest

Re: [Numpy-discussion] patching docs

2009-04-23 Thread Stéfan van der Walt
Hi William Please sign up for an account on the docs editor at http://docs.scipy.org Regards Stéfan 2009/4/24 william ratcliff : > Hi!  I'd like to suggest a patch for: > > numpy.core.fromnumeric.put [...] > This would be more consistent with the rest of the docstring.  For the > future, is t

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread David Cournapeau
Christopher Barker wrote: > Though I'm a bit surprised that that's not how the print function is > written in the first place (maybe it is in py3k -- I'm testing on 2.5) > That's actually how it works as far as I can tell. The thing with removing those print is that we can do it without too mu

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread David Cournapeau
Robert Kern wrote: > > Doesn't the 2to3 tool do this conversion for you? > I have not seen it handling everything. It does not handle reduce, for example: print reduce(lambda x, y: x+y, [1, 2, 3]) is translated to print(reduce(lambda x, y: x + y, [1, 1, 1])) I guess an alternative to a comp

[Numpy-discussion] patching docs

2009-04-23 Thread william ratcliff
Hi! I'd like to suggest a patch for: numpy .core .fromnumeric .put The docstring contains: for i, val in zip(ind,v): x.flat[i]=val It should be: fo

Re: [Numpy-discussion] numpy 1.3.0 test() failures on ubuntu 9.04

2009-04-23 Thread David Cournapeau
On Fri, Apr 24, 2009 at 7:59 AM, Michael Abshoff wrote: > Pauli Virtanen wrote: >> Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote: >> [clip] >>> libatlas-sse2-dev >> [clip] >>> The pastebin links to site.cfg build.log and test.log are at the end of >>> this email. If anyone could help me out

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread ross smith
On Thu, Apr 23, 2009 at 15:39, Robert Kern wrote: > On Thu, Apr 23, 2009 at 09:52, David Cournapeau > wrote: > > On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen wrote: > >> Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti: > >> [clip] > >>> I looked more in detail on what would

Re: [Numpy-discussion] numpy 1.3.0 test() failures on ubuntu 9.04

2009-04-23 Thread Michael Abshoff
Pauli Virtanen wrote: > Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote: > [clip] >> libatlas-sse2-dev > [clip] >> The pastebin links to site.cfg build.log and test.log are at the end of >> this email. If anyone could help me out here as to what the problems may >> be, i would appreciate it! >

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread Robert Kern
On Thu, Apr 23, 2009 at 09:52, David Cournapeau wrote: > On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen wrote: >> Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti: >> [clip] >>>     I looked more in detail on what would be needed to port numpy to >>> py3k. In particular, I was intere

Re: [Numpy-discussion] numpy 1.3.0 test() failures on ubuntu 9.04

2009-04-23 Thread Chris Colbert
ha! gotta love the one line answers. Thanks Pauli! On Thu, Apr 23, 2009 at 2:57 PM, Pauli Virtanen wrote: > Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote: > [clip] > > libatlas-sse2-dev > [clip] > > The pastebin links to site.cfg build.log and test.log are at the end of > > this email.

Re: [Numpy-discussion] numpy 1.3.0 test() failures on ubuntu 9.04

2009-04-23 Thread Pauli Virtanen
Thu, 23 Apr 2009 14:54:10 -0400, Chris Colbert wrote: [clip] > libatlas-sse2-dev [clip] > The pastebin links to site.cfg build.log and test.log are at the end of > this email. If anyone could help me out here as to what the problems may > be, i would appreciate it! The SSE-optimized Atlas librarie

[Numpy-discussion] numpy 1.3.0 test() failures on ubuntu 9.04

2009-04-23 Thread Chris Colbert
Hi all, I'm building numpy 1.3.0 from source with libatlas-sse2-dev from the jaunty repos. I'm running into 16 failures when running the nose test. This is a fresh install of 9.04 and i've repod the following packages: build-essential swig gfortran python-dev libatlas-sse2-dev libatlas-base-dev

Re: [Numpy-discussion] bug in stats.randint

2009-04-23 Thread josef . pktd
On Thu, Apr 23, 2009 at 11:18 AM, Flavio Coelho wrote: > > > On Thu, Apr 23, 2009 at 2:56 PM, wrote: >> >> On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho wrote: >> > >> > Hi, >> > >> > I stumbled upon something I think is a bug in scipy: >> > >> > In [4]: stats.randint(1.,15.).ppf([.1, >> > .2,.

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread Ryan May
On Thu, Apr 23, 2009 at 11:23 AM, Christopher Barker wrote: > Ryan May wrote: > > On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau > But replacing print is not as easy as reduce. Things like print > > "yoyo", a do not work, for example. > > > > I think the point is that you can just chan

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread Christopher Barker
Ryan May wrote: > On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau But replacing print is not as easy as reduce. Things like print > "yoyo", a do not work, for example. > > I think the point is that you can just change it to print("yoyo") which > will work in both python 2.x and 3.x. I

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread Ryan May
On Thu, Apr 23, 2009 at 9:52 AM, David Cournapeau wrote: > On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen wrote: > > Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti: > > [clip] > >> I looked more in detail on what would be needed to port numpy to > >> py3k. In particular, I was

Re: [Numpy-discussion] bug in stats.randint

2009-04-23 Thread Flavio Coelho
On Thu, Apr 23, 2009 at 2:56 PM, wrote: > On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho wrote: > > > > Hi, > > > > I stumbled upon something I think is a bug in scipy: > > > > In [4]: stats.randint(1.,15.).ppf([.1, > > .2,.3,.4,.5]) > > Out[4]: array([ 2., 3., 5., 6., 7.]) > > > > When you

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread David Cournapeau
On Thu, Apr 23, 2009 at 11:21 PM, Bruce Southey wrote: > I agree that a single code base should be used if possible however there > are a lot of C code changes required as well as Python code changes: > http://www.scipy.org/Python3k > http://jarrodmillman.blogspot.com/2009/01/when-will-numpy-and-

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread David Cournapeau
On Thu, Apr 23, 2009 at 11:20 PM, Pauli Virtanen wrote: > Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti: > [clip] >>     I looked more in detail on what would be needed to port numpy to >> py3k. In particular, I was interested at the possible strategies to keep >> one single codebase

Re: [Numpy-discussion] NaN as dictionary key?

2009-04-23 Thread Bruce Southey
josef.p...@gmail.com wrote: > 2009/4/20 Wes McKinney : > >> I assume that, because NaN != NaN, even though both have the same hash value >> (hash(NaN) == -32768), that Python treats any NaN double as a distinct key >> in a dictionary. >> >> In [76]: a = np.repeat(nan, 10) >> >> In [77]: d = {} >

Re: [Numpy-discussion] bug in stats.randint

2009-04-23 Thread josef . pktd
On Thu, Apr 23, 2009 at 9:56 AM, wrote: > On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho wrote: >> >> Hi, >> >> I stumbled upon something I think is a bug in scipy: >> >> In [4]: stats.randint(1.,15.).ppf([.1, >> .2,.3,.4,.5]) >> Out[4]: array([ 2.,  3.,  5.,  6.,  7.]) >> >> When you pass float

Re: [Numpy-discussion] Masking an array with another array

2009-04-23 Thread Neil Crighton
gmail.com> writes: > setmember1d is very fast compared to the other solutions for large b. > > However, setmember1d requires that both arrays only have unique elements. > > So it doesn't work if, for example, your first array is a data vector > with member ship in different groups (therefore n

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread Bruce Southey
David Cournapeau wrote: > Hi, > > I looked more in detail on what would be needed to port numpy to > py3k. In particular, I was interested at the possible strategies to > keep one single codebase for both python 2.x and python 3.x. The first > step is to remove all py3k warnings reported by pyt

Re: [Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread Pauli Virtanen
Thu, 23 Apr 2009 22:38:21 +0900, David Cournapeau kirjoitti: [clip] > I looked more in detail on what would be needed to port numpy to > py3k. In particular, I was interested at the possible strategies to keep > one single codebase for both python 2.x and python 3.x. The first step > is to remo

Re: [Numpy-discussion] NaN as dictionary key?

2009-04-23 Thread josef . pktd
2009/4/20 Wes McKinney : > I assume that, because NaN != NaN, even though both have the same hash value > (hash(NaN) == -32768), that Python treats any NaN double as a distinct key > in a dictionary. > > In [76]: a = np.repeat(nan, 10) > > In [77]: d = {} > > In [78]: for i, v in enumerate(a): >   

Re: [Numpy-discussion] bug in stats.randint

2009-04-23 Thread josef . pktd
On Thu, Apr 23, 2009 at 9:27 AM, Flavio Coelho wrote: > > Hi, > > I stumbled upon something I think is a bug in scipy: > > In [4]: stats.randint(1.,15.).ppf([.1, > .2,.3,.4,.5]) > Out[4]: array([ 2.,  3.,  5.,  6.,  7.]) > > When you pass float arguments to stats.randint and then call the ppf meth

[Numpy-discussion] Porting strategy for py3k

2009-04-23 Thread David Cournapeau
Hi, I looked more in detail on what would be needed to port numpy to py3k. In particular, I was interested at the possible strategies to keep one single codebase for both python 2.x and python 3.x. The first step is to remove all py3k warnings reported by python 2.6. A couple of recurrent prob

[Numpy-discussion] bug in stats.randint

2009-04-23 Thread Flavio Coelho
Hi, I stumbled upon something I think is a bug in scipy: In [4]: stats.randint(1.,15.).ppf([.1,.2,.3,.4,.5]) Out[4]: array([ 2., 3., 5., 6., 7.]) When you pass float arguments to stats.randint and then call the ppf method, you get an array of floats, which clearly wrong. The rvs method doesn

Re: [Numpy-discussion] Masking an array with another array

2009-04-23 Thread josef . pktd
On Thu, Apr 23, 2009 at 1:24 AM, Gökhan SEVER wrote: > Ahaa,, > > Thanks Gaël. That method is more elegance than the previous inputs, and the > simplest of all. > > Although one line of "import this" says: > > There should be one-- and preferably only one --obvious way to do it. > > I always find

Re: [Numpy-discussion] String manipulation

2009-04-23 Thread Francesc Alted
A Thursday 23 April 2009, Nils Wagner escrigué: > Hi all, > > How can I obtain the position of the minus sign within the > following string ? > > >>> liste[1] > > '1.5-te' That's easy by using basic weaponery in Python: In [8]: liste[1].find('-') Out[8]: 3 In [9]: liste[1][3] Out[9]: '-' -- F

[Numpy-discussion] String manipulation

2009-04-23 Thread Nils Wagner
Hi all, How can I obtain the position of the minus sign within the following string ? >>> liste[1] '1.5-te' Nils ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion