Re: [Numpy-discussion] min bug

2009-11-16 Thread Alan McIntyre
On Mon, Nov 16, 2009 at 11:34 PM, "V. Armando Solé" wrote: > Sebastian Berg wrote: >> Known issue, I think someone posted about it a while ago too. The numpy >> min is array aware, and it expects an array. The second argument is the >> axis, which in the case of a single number doesn't matter. > >

Re: [Numpy-discussion] min bug

2009-11-16 Thread V. Armando Solé
Sebastian Berg wrote: > Known issue, I think someone posted about it a while ago too. The numpy > min is array aware, and it expects an array. The second argument is the > axis, which in the case of a single number doesn't matter. > > On Tue, 2009-11-17 at 07:07 +, Chris wrote: > >> I'm pret

Re: [Numpy-discussion] min bug

2009-11-16 Thread Alan McIntyre
On Mon, Nov 16, 2009 at 11:07 PM, Chris wrote: > I'm pretty sure this shouldn't happen: > > In [1]: from numpy import min > > In [2]: min(5000, 4) > Out[2]: 5000 The way you're calling it is working like this: min((5000,) , axis=4) so you'd need to do this instead: min((5000,4)) _

Re: [Numpy-discussion] min bug

2009-11-16 Thread Sebastian Berg
Known issue, I think someone posted about it a while ago too. The numpy min is array aware, and it expects an array. The second argument is the axis, which in the case of a single number doesn't matter. On Tue, 2009-11-17 at 07:07 +, Chris wrote: > I'm pretty sure this shouldn't happen: > > I

[Numpy-discussion] min bug

2009-11-16 Thread Chris
I'm pretty sure this shouldn't happen: In [1]: from numpy import min In [2]: min(5000, 4) Out[2]: 5000 ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Fitting a curve on a log-normal distributed data

2009-11-16 Thread Ian Mallett
Theory wise: -Do a linear regression on your data. -Apply a logrithmic transform to your data's dependent variable, and do another linear regression. -Apply a logrithmic transform to your data's independent variable, and do another linear regression. -Take the best regression (highest r^2 value) an

[Numpy-discussion] Fitting a curve on a log-normal distributed data

2009-11-16 Thread Gökhan Sever
Hello, I have a data which represents aerosol size distribution in between 0.1 to 3.0 micrometer ranges. I would like extrapolate the lower size down to 10 nm. The data in this context is log-normally distributed. Therefore I am looking a way to fit a log-normal curve onto my data. Could you pleas

Re: [Numpy-discussion] failure building trunk with mingw

2009-11-16 Thread David Cournapeau
On Tue, Nov 17, 2009 at 3:33 AM, wrote: > > Now, the numpy build runs for a while then breaks while building umath. > > Any ideas? The behavior of distutils with config files is mysterious, I gave up trying to understand it long ago :) I use scripts instead to control everything from command li

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Robert Kern
On Mon, Nov 16, 2009 at 18:39, Christopher Barker wrote: > Robert Kern wrote: >>> Is there a way to avoid importing everything when importing a module >>> deep in a big package? >> >> The package authors need to keep the __init__.py files clear. There is >> nothing you can do as a user. > > I figu

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Christopher Barker
Anne Archibald wrote: > The reason numpy and scipy don't do this is largely historical - > Numeric had a nearly flat namespace, I know. Despite namespaces being "one honking great idea", it seems to have taken a while to catch on. > Since spatial is new, though, it should be pretty good about n

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Christopher Barker
Robert Kern wrote: >> Is there a way to avoid importing everything when importing a module >> deep in a big package? > > The package authors need to keep the __init__.py files clear. There is > nothing you can do as a user. I figured. so, to bring this back on-topic: I recommend that no package

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Anne Archibald
2009/11/16 Robert Kern : > On Mon, Nov 16, 2009 at 18:05, Christopher Barker > wrote: >> Charles R Harris wrote: >>> That's what I ended up doing. You still need to do "import >>> numpy.polynomial" to get to them, they aren't automatically imported >>> into the numpy namespace. >> >> good start.

Re: [Numpy-discussion] finding close together points.

2009-11-16 Thread Anne Archibald
2009/11/16 Christopher Barker : > Anne Archibald wrote: >> 2009/11/13 Christopher Barker : >>> Wow! great -- you sounded interested, but I had no idea you'd run out >>> and do it! thanks! we'll check it out. > > well, it turns out the Python version is unacceptably slow. However, we > found we coul

Re: [Numpy-discussion] finding close together points.

2009-11-16 Thread Christopher Barker
Anne Archibald wrote: > 2009/11/13 Christopher Barker : >> Wow! great -- you sounded interested, but I had no idea you'd run out >> and do it! thanks! we'll check it out. well, it turns out the Python version is unacceptably slow. However, we found we could use ckdtree, and use: tree.query(point

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Robert Kern
On Mon, Nov 16, 2009 at 18:05, Christopher Barker wrote: > Charles R Harris wrote: >> That's what I ended up doing. You still need to do "import >> numpy.polynomial" to get to them, they aren't automatically imported >> into the numpy namespace. > > good start. This brings up a semi-off-topic ques

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Christopher Barker
Charles R Harris wrote: > That's what I ended up doing. You still need to do "import > numpy.polynomial" to get to them, they aren't automatically imported > into the numpy namespace. good start. This brings up a semi-off-topic question: Is there a way to avoid importing everything when importi

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Charles R Harris
On Mon, Nov 16, 2009 at 3:06 PM, Anne Archibald wrote: > 2009/11/16 Christopher Barker : > > Charles R Harris wrote: > >> I would like some advise on the best way to add the new functions. I've > >> added a new package polynomial, and that package contains four new > >> modules: chebyshev, polynom

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Anne Archibald
2009/11/16 Christopher Barker : > Charles R Harris wrote: >> I would like some advise on the best way to add the new functions. I've >> added a new package polynomial, and that package contains four new >> modules: chebyshev, polynomial, polytemplate, polyutils. > > This seems to belong more in sci

Re: [Numpy-discussion] failure building trunk with mingw

2009-11-16 Thread josef . pktd
On Mon, Nov 16, 2009 at 12:48 AM, David Cournapeau wrote: > josef.p...@gmail.com wrote: >> Are there new changes to the configuration needed?   mingw 3.4.5, >> WindowsXP, Python 2.5.2 >> >> Python.h is not picked up anymore: >> >> _configtest.c:1:20: Python.h: No such file or directory >> >> Josef

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Charles R Harris
On Mon, Nov 16, 2009 at 10:43 AM, Christopher Barker wrote: > Charles R Harris wrote: > > I would like some advise on the best way to add the new functions. I've > > added a new package polynomial, and that package contains four new > > modules: chebyshev, polynomial, polytemplate, polyutils. > >

Re: [Numpy-discussion] Adding the new polynomial/chebyshev modules.

2009-11-16 Thread Christopher Barker
Charles R Harris wrote: > I would like some advise on the best way to add the new functions. I've > added a new package polynomial, and that package contains four new > modules: chebyshev, polynomial, polytemplate, polyutils. This seems to belong more in scipy than numpy, but I'll leave that to

Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 38, Issue 52

2009-11-16 Thread Christopher Barker
oops, I meant to include my code with that last note. Here it is. accumulator.py: is my implementation. easy_scale.py: is Jake's suggested implementation. profile_accumulator.py: contains some test functions that can be run with ipython's "timeit" test_accumulator.py: is test code that can

Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 38, Issue 52

2009-11-16 Thread Christopher Barker
Jake VanderPlas wrote: > It sounds like all of this could be done very simply without going to > C, using a class based on numpy.ndarray. The following works for 1D > arrays, behaves like a regular 1D numpy array, and could be easily > improved with a little care. Is this what you had in mind? >

Re: [Numpy-discussion] Initial implementation of histogram_discrete()

2009-11-16 Thread Bruce Southey
On 11/15/2009 01:16 AM, David Warde-Farley wrote: > On 14-Nov-09, at 10:57 AM, Bruce Southey wrote: > > >> Is it just that bincount does not count negative numbers? >> If so, then I would strongly argue that is insufficient for creating >> new function. Rather you need to provide a suitable pat

[Numpy-discussion] REMINDER: trunk is about to be frozen for 1.4.0

2009-11-16 Thread David Cournapeau
Hi, A quick remainder: the trunk will be closed for 1.4.0 changes within a few hours. After that time, the trunk should only contain things which will be in 1.5.0, and the 1.4.0 changes will be in the 1.4.0 branch, which should contain only bug fixes. cheers, David __