Re: [Numpy-discussion] New functions.

2011-05-31 Thread Charles R Harris
On Tue, May 31, 2011 at 8:50 PM, Bruce Southey wrote: > On Tue, May 31, 2011 at 9:26 PM, Charles R Harris > wrote: > > > > > > On Tue, May 31, 2011 at 8:00 PM, Skipper Seabold > > wrote: > >> > >> On Tue, May 31, 2011 at 9:53 PM, Warren Weckesser > >> wrote: > >> > > >> > > >> > On Tue, May 31

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Bruce Southey
On Tue, May 31, 2011 at 9:26 PM, Charles R Harris wrote: > > > On Tue, May 31, 2011 at 8:00 PM, Skipper Seabold > wrote: >> >> On Tue, May 31, 2011 at 9:53 PM, Warren Weckesser >> wrote: >> > >> > >> > On Tue, May 31, 2011 at 8:36 PM, Skipper Seabold >> > wrote: >> >> I don't know if it's one p

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Charles R Harris
On Tue, May 31, 2011 at 8:00 PM, Skipper Seabold wrote: > On Tue, May 31, 2011 at 9:53 PM, Warren Weckesser > wrote: > > > > > > On Tue, May 31, 2011 at 8:36 PM, Skipper Seabold > > wrote: > >> I don't know if it's one pass off the top of my head, but I've used > >> percentile for interpercentil

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Skipper Seabold
On Tue, May 31, 2011 at 9:53 PM, Warren Weckesser wrote: > > > On Tue, May 31, 2011 at 8:36 PM, Skipper Seabold > wrote: >> I don't know if it's one pass off the top of my head, but I've used >> percentile for interpercentile ranges. >> >> [docs] >> [1]: X = np.random.random(1000) >> >> [docs] >>

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Warren Weckesser
On Tue, May 31, 2011 at 8:36 PM, Skipper Seabold wrote: > On Tue, May 31, 2011 at 9:31 PM, Benjamin Root wrote: > > > > > > On Tue, May 31, 2011 at 8:18 PM, Warren Weckesser > > wrote: > >> > >> > >> On Tue, May 31, 2011 at 8:08 PM, Charles R Harris > >> wrote: > >>> > >>> Hi All, > >>> > >>> I

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Benjamin Root
On Tue, May 31, 2011 at 8:26 PM, Charles R Harris wrote: > > > On Tue, May 31, 2011 at 7:18 PM, Warren Weckesser < > warren.weckes...@enthought.com> wrote: > >> >> >> On Tue, May 31, 2011 at 8:08 PM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> Hi All, >>> >>> I've been contempl

Re: [Numpy-discussion] New functions.

2011-05-31 Thread David
On 06/01/2011 10:34 AM, Charles R Harris wrote: > > > On Tue, May 31, 2011 at 7:33 PM, David > wrote: > > On 06/01/2011 10:08 AM, Charles R Harris wrote: > > Hi All, > > > > I've been contemplating new functions that could be added to > numpy an

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Skipper Seabold
On Tue, May 31, 2011 at 9:31 PM, Benjamin Root wrote: > > > On Tue, May 31, 2011 at 8:18 PM, Warren Weckesser > wrote: >> >> >> On Tue, May 31, 2011 at 8:08 PM, Charles R Harris >> wrote: >>> >>> Hi All, >>> >>> I've been contemplating new functions that could be added to numpy and >>> thought I

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Charles R Harris
On Tue, May 31, 2011 at 7:33 PM, David wrote: > On 06/01/2011 10:08 AM, Charles R Harris wrote: > > Hi All, > > > > I've been contemplating new functions that could be added to numpy and > > thought I'd run them by folks to see if there is any interest. > > > > 1) Modified sort/argsort functions

Re: [Numpy-discussion] New functions.

2011-05-31 Thread David
On 06/01/2011 10:08 AM, Charles R Harris wrote: > Hi All, > > I've been contemplating new functions that could be added to numpy and > thought I'd run them by folks to see if there is any interest. > > 1) Modified sort/argsort functions that return the maximum k values. > This is easy to do wi

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Benjamin Root
On Tue, May 31, 2011 at 8:18 PM, Warren Weckesser < warren.weckes...@enthought.com> wrote: > > > On Tue, May 31, 2011 at 8:08 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Hi All, >> >> I've been contemplating new functions that could be added to numpy and >> thought I'd run them

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Charles R Harris
On Tue, May 31, 2011 at 7:18 PM, Warren Weckesser < warren.weckes...@enthought.com> wrote: > > > On Tue, May 31, 2011 at 8:08 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> Hi All, >> >> I've been contemplating new functions that could be added to numpy and >> thought I'd run them

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Warren Weckesser
On Tue, May 31, 2011 at 8:08 PM, Charles R Harris wrote: > Hi All, > > I've been contemplating new functions that could be added to numpy and > thought I'd run them by folks to see if there is any interest. > > 1) Modified sort/argsort functions that return the maximum k values. > This is eas

Re: [Numpy-discussion] New functions.

2011-05-31 Thread Robert Kern
On Tue, May 31, 2011 at 20:08, Charles R Harris wrote: > Hi All, > > I've been contemplating new functions that could be added to numpy and > thought I'd run them by folks to see if there is any interest. > > 1) Modified sort/argsort functions that return the maximum k values. >     This is easy t

[Numpy-discussion] New functions.

2011-05-31 Thread Charles R Harris
Hi All, I've been contemplating new functions that could be added to numpy and thought I'd run them by folks to see if there is any interest. 1) Modified sort/argsort functions that return the maximum k values. This is easy to do with heapsort and almost as easy with mergesort. 2) Ufunc fadd

Re: [Numpy-discussion] what does "in" do with numpy arrays?

2011-05-31 Thread Robert Kern
On Tue, May 31, 2011 at 11:25, Christopher Barker wrote: > Hi folks, > > I've re-titled this thread, as it's about a new question, now: > > What does: > > something in a_numpy_array > > mean? i.e. how has __contains__ been defined? > > A couple of us have played with it, and can't make sense of it

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
On May 31, 2011, at 9:06 PM, Ralf Gommers wrote: > > It is helpful to have this cleaned up, thanks Mark for taking the time for > this. Mind you, I do agree with y'all for the cleaning up. I just had a shock when I received the batch of what I thought were brand new bugs that turned up to have

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 6:37 PM, Derek Homeier wrote: > On 31 May 2011, at 18:25, Pierre GM wrote: > >> On May 31, 2011, at 5:52 PM, Derek Homeier wrote: >>> >>> I think stuff like multiple delimiters should have been dealt with >>> before, as the right place to insert the ndmin code (which include

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Ralf Gommers
On Tue, May 31, 2011 at 7:11 PM, Pauli Virtanen wrote: > Tue, 31 May 2011 11:44:15 -0500, Mark Wiebe wrote: > [clip] > >> I find very commendable to strive for consistency, mind you. I'm just > >> not not very comfortable with the idea of modifying old records a > >> posteriori to adjust to new p

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pauli Virtanen
Tue, 31 May 2011 11:44:15 -0500, Mark Wiebe wrote: [clip] >> I find very commendable to strive for consistency, mind you. I'm just >> not not very comfortable with the idea of modifying old records a >> posteriori to adjust to new policies... > > I was under the impression this already was the pol

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Mark Wiebe
On Tue, May 31, 2011 at 11:14 AM, Pierre GM wrote: > > On May 31, 2011, at 6:06 PM, Bruce Southey wrote: > > > On 05/31/2011 10:33 AM, Mark Wiebe wrote: > >> On Tue, May 31, 2011 at 10:09 AM, Pierre GM > wrote: > >> > >> On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: > >> > >> > It's so we can s

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 18:25, Pierre GM wrote: > On May 31, 2011, at 5:52 PM, Derek Homeier wrote: >> >> I think stuff like multiple delimiters should have been dealt with >> before, as the right place to insert the ndmin code (which includes >> the decision to squeeze or not to squeeze as well as to

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 5:52 PM, Derek Homeier wrote: > > I think stuff like multiple delimiters should have been dealt with > before, as the right place to insert the ndmin code (which includes > the decision to squeeze or not to squeeze as well as to add additional > dimensions, if required)

[Numpy-discussion] what does "in" do with numpy arrays?

2011-05-31 Thread Christopher Barker
Hi folks, I've re-titled this thread, as it's about a new question, now: What does: something in a_numpy_array mean? i.e. how has __contains__ been defined? A couple of us have played with it, and can't make sense of it: > In [24]: a > Out[24]: array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
On May 31, 2011, at 6:06 PM, Bruce Southey wrote: > On 05/31/2011 10:33 AM, Mark Wiebe wrote: >> On Tue, May 31, 2011 at 10:09 AM, Pierre GM wrote: >> >> On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: >> >> > It's so we can see what bugs are actually fixed for 2.0 (as opposed to a >> > prior

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Bruce Southey
On 05/31/2011 10:33 AM, Mark Wiebe wrote: On Tue, May 31, 2011 at 10:09 AM, Pierre GM > wrote: On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: > It's so we can see what bugs are actually fixed for 2.0 (as opposed to a prior release), and a bug that's mar

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 17:45, Benjamin Root wrote: > > At this point, I wonder if it might be smarter to create > a .atleast_Nd() function and use that everywhere it is needed. > Having similar logic tailored for each loading function might be a > little dangerous if bug fixes are made to one, b

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
On 31 May 2011, at 17:33, Bruce Southey wrote: >>> It certainly would make sense to provide the same functionality for >>> genfromtxt (which should then be inherited by [nd,ma,rec]fromtxt), >>> so >>> I'd go ahead and file a feature (enhancement) request. I can't >>> promise >>> I can take car

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Benjamin Root
On Tue, May 31, 2011 at 10:33 AM, Bruce Southey wrote: > On 05/31/2011 10:18 AM, Pierre GM wrote: > > On May 31, 2011, at 4:53 PM, Derek Homeier wrote: > > > >> Hi Chris, > >> > >> On 31 May 2011, at 13:56, cgraves wrote: > >> > >>> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndm

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Bruce Southey
On 05/31/2011 10:18 AM, Pierre GM wrote: > On May 31, 2011, at 4:53 PM, Derek Homeier wrote: > >> Hi Chris, >> >> On 31 May 2011, at 13:56, cgraves wrote: >> >>> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin >>> option, >>> however neither genfromtxt nor recfromtxt, which use l

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Mark Wiebe
On Tue, May 31, 2011 at 10:09 AM, Pierre GM wrote: > > On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: > > > It's so we can see what bugs are actually fixed for 2.0 (as opposed to a > prior release), and a bug that's marked 'closed' but Unscheduled simply > doesn't make sense to me. > > I'm sorry,

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Pierre GM
On May 31, 2011, at 4:53 PM, Derek Homeier wrote: > Hi Chris, > > On 31 May 2011, at 13:56, cgraves wrote: > >> I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin >> option, >> however neither genfromtxt nor recfromtxt, which use loadtxt, have it. >> Should they have inherited

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
On May 31, 2011, at 4:25 PM, Mark Wiebe wrote: > It's so we can see what bugs are actually fixed for 2.0 (as opposed to a > prior release), and a bug that's marked 'closed' but Unscheduled simply > doesn't make sense to me. I'm sorry, I'm still failing to see the logic. * You're not sure whet

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread Derek Homeier
Hi Chris, On 31 May 2011, at 13:56, cgraves wrote: > I've downloaded the latest numpy (1.6.0) and loadtxt has the ndmin > option, > however neither genfromtxt nor recfromtxt, which use loadtxt, have it. > Should they have inherited the option? Who can make it happen? you are mistaken, genfromt

Re: [Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Mark Wiebe
It's so we can see what bugs are actually fixed for 2.0 (as opposed to a prior release), and a bug that's marked 'closed' but Unscheduled simply doesn't make sense to me. -Mark On Tue, May 31, 2011 at 9:20 AM, Pierre GM wrote: > All, > Could somebody tell me the advantage of changing the milest

[Numpy-discussion] Changing milestones on tickets

2011-05-31 Thread Pierre GM
All, Could somebody tell me the advantage of changing the milestone of tickets that have been closed for more than 10 months ? I'm genuinely curious. P. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/

Re: [Numpy-discussion] loadtxt ndmin option

2011-05-31 Thread cgraves
Ralf Gommers-2 wrote: > > On Fri, May 6, 2011 at 12:57 PM, Derek Homeier < > de...@astro.physik.uni-goettingen.de> wrote: > >> >> On 6 May 2011, at 07:53, Ralf Gommers wrote: >> >> > >> > >> Looks okay, and I agree that it's better to fix it now. The timing >> > >> is a bit unfortunate though,

Re: [Numpy-discussion] local variable referenced before assignment

2011-05-31 Thread Edoardo Pasca
On Tue, May 31, 2011 at 11:34 AM, Vincent Schut wrote: > On 05/31/2011 11:04 AM, Edoardo Pasca wrote: >> UnboundLocalError: local variable 'maxFastSampling' referenced before >> assignment >> >> I wonder whether you see any way that the maxFastSampling variable >> might not be set. > > Edo, > >

Re: [Numpy-discussion] local variable referenced before assignment

2011-05-31 Thread Vincent Schut
On 05/31/2011 11:04 AM, Edoardo Pasca wrote: > Dear all, > > sometimes I encounter the problem that calling many times a function > it happens that some local variables are not defined and the procedure > crashes. > > For example I have a function defined as > > def procedure(tt, Ctissue, WeinmannF

[Numpy-discussion] local variable referenced before assignment

2011-05-31 Thread Edoardo Pasca
Dear all, sometimes I encounter the problem that calling many times a function it happens that some local variables are not defined and the procedure crashes. For example I have a function defined as def procedure(tt, Ctissue, WeinmannFit, bodyWeight): for maxFastSampling in range(1,len(tt))