Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau david at ar.media.kyoto-u.ac.jp writes: Matthew Brett wrote: Hi, We are using numpy.distutils, and have run into this odd behavior in windows: Short answer: I am afraid it cannot work as you want. Basically, when you pass an option to build_ext, it does not

Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback

2009-08-04 Thread David Cournapeau
Hi Chuck, Charles R Harris wrote: To make purely computational code available to third parties, two things are needed: 1. the code itself needs to make the split explicit. 2. there needs to be support so that reusing those functionalities is as painless as

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
Dave wrote: David Cournapeau david at ar.media.kyoto-u.ac.jp writes: Matthew Brett wrote: Hi, We are using numpy.distutils, and have run into this odd behavior in windows: Short answer: I am afraid it cannot work as you want. Basically, when you pass an option to

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau david at ar.media.kyoto-u.ac.jp writes: You need to do as follows, if you want to control from the command line: python setup.py build -c mingw32 bdist_wininst That's how I build the official binaries . cheers, David Running the command: C:\dev\src\numpypython

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
Dave wrote: David Cournapeau david at ar.media.kyoto-u.ac.jp writes: You need to do as follows, if you want to control from the command line: python setup.py build -c mingw32 bdist_wininst That's how I build the official binaries . cheers, David Running the command:

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
On Tue, Aug 4, 2009 at 5:28 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: No, I think you and Matthew actually found a bug in recent changes I have done in distutils. I will fix it right away, Ok, not right away, but could you check that r7280 fixed it for you ? cheers, David

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau cournape at gmail.com writes: On Tue, Aug 4, 2009 at 5:28 PM, David Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote: No, I think you and Matthew actually found a bug in recent changes I have done in distutils. I will fix it right away, Ok, not right away, but could

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error: C:\dev\src\scipysvn up Fetching external item into 'doc\sphinxext' External at revision 7280. At revision 5890. C:\dev\src\scipypython setup.py

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
Dave wrote: Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error: Was numpy installed from a bdist_wininst installer, or did you use the install method directly ? David

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau david at ar.media.kyoto-u.ac.jp writes: Dave wrote: Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error: Was numpy installed from a bdist_wininst

[Numpy-discussion] speed of atleast_1d and friends

2009-08-04 Thread Mark Bakker
Hello all, I am making a lot of use of atleast_1d and atleast_2d in my routines. Does anybody know whether this will slow down my code significantly? Thanks, Mark ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
Dave wrote: David Cournapeau david at ar.media.kyoto-u.ac.jp writes: Dave wrote: Dave dave.hirschfeld at gmail.com writes: Work's for me. -Dave Except now when trying to compile the latest scipy I get the following error:

Re: [Numpy-discussion] speed of atleast_1d and friends

2009-08-04 Thread Emmanuelle Gouillart
Hello, I am making a lot of use of atleast_1d and atleast_2d in my routines. Does anybody know whether this will slow down my code significantly? if there is no need to make copies (i.e. if you take arrays as parameters (?)), calls to atleast_1d and atleast_2d should be

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Andrew Friedley
Bruce Southey wrote: Hi, Can you try these from the command line: python -m timeit -n 100 -s import numpy as np; a = np.arange(0.0, 1000, (2*3.14159) / 1000, dtype=np.float32) python -m timeit -n 100 -s import numpy as np; a = np.arange(0.0, 1000, (2*3.14159) / 1000, dtype=np.float32);

Re: [Numpy-discussion] speed of atleast_1d and friends

2009-08-04 Thread Gael Varoquaux
On Tue, Aug 04, 2009 at 07:37:03AM -0700, Keith Goodman wrote: I'm always amazed at the solutions people come up with on this list. So if you send an example, someone might be able to get rid of the need for atleast_1d. On the other hand, it costs almost no time, and makes your API more

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Andrew Friedley
Charles R Harris wrote: On Mon, Aug 3, 2009 at 11:51 AM, Andrew Friedley afrie...@indiana.eduwrote: Charles R Harris wrote: What compiler versions are folks using? In the slow cases, what is the timing for converting to double, computing the sin, then casting back to single? I did this, is

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread David Cournapeau
On Wed, Aug 5, 2009 at 12:14 AM, Andrew Friedleyafrie...@indiana.edu wrote: Do you know where this conversion is, in the code?  The impression I got from my quick look at the code was that a wrapper sinf was defined that just calls sin.  I guess the typecast to float in there will do the

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread David Cournapeau
On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to solve... I hate distutils. Ok - should be fixed in r7281. David ___ NumPy-Discussion mailing

[Numpy-discussion] Why NaN?

2009-08-04 Thread Gökhan Sever
Hello, I know this has to have a very simple answer, but stuck at this very moment and can't get a meaningful result out of np.mean() In [121]: a = array([NaN, 4, NaN, 12]) In [122]: b = array([NaN, 2, NaN, 3]) In [123]: c = a/b In [124]: mean(c) Out[124]: nan In [125]: mean a

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Dave
David Cournapeau cournape at gmail.com writes: On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to solve... I hate distutils. Ok - should be fixed in r7281. David Well,

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 11:46, Gökhan Severgokhanse...@gmail.com wrote: Hello, I know this has to have a very simple answer, but stuck at this very moment and can't get a meaningful result out of np.mean() In [121]: a = array([NaN, 4, NaN, 12]) In [122]: b = array([NaN, 2, NaN, 3]) In

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Keith Goodman
On Tue, Aug 4, 2009 at 9:46 AM, Gökhan Severgokhanse...@gmail.com wrote: Hello, I know this has to have a very simple answer, but stuck at this very moment and can't get a meaningful result out of np.mean() In [121]: a = array([NaN, 4, NaN, 12]) In [122]: b = array([NaN, 2, NaN, 3]) In

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Perry Greenfield
Note that NaN generally contaminates sums and other net results (as it should). You should filter them out (there is more than one way to do that). But also note that the IEEE standard for floating point numbers requires NaN != Nan. Thus any attempts to find where NaNs that way is destined

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Keith Goodman
On Tue, Aug 4, 2009 at 9:54 AM, Keith Goodmankwgood...@gmail.com wrote: On Tue, Aug 4, 2009 at 9:46 AM, Gökhan Severgokhanse...@gmail.com wrote: Hello, I know this has to have a very simple answer, but stuck at this very moment and can't get a meaningful result out of np.mean() In [121]: a

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread josef . pktd
On Tue, Aug 4, 2009 at 12:59 PM, Keith Goodmankwgood...@gmail.com wrote: On Tue, Aug 4, 2009 at 9:54 AM, Keith Goodmankwgood...@gmail.com wrote: On Tue, Aug 4, 2009 at 9:46 AM, Gökhan Severgokhanse...@gmail.com wrote: Hello, I know this has to have a very simple answer, but stuck at this very

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 12:05, josef.p...@gmail.com wrote: What's going on with the response time here? I cannot even finish reading the question and start python. Practice. :-) -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Keith Goodman
On Tue, Aug 4, 2009 at 10:05 AM, josef.p...@gmail.com wrote: What's going on with the response time here? I cannot even finish reading the question and start python. The trick is to not read the entire question. I usually reply after reading the subj line. Or just auto-reply with x.sort()

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Charles R Harris
On Tue, Aug 4, 2009 at 10:51 AM, Dave dave.hirschf...@gmail.com wrote: David Cournapeau cournape at gmail.com writes: On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeaudavid at ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Andrew Friedley
David Cournapeau wrote: On Wed, Aug 5, 2009 at 12:14 AM, Andrew Friedleyafrie...@indiana.edu wrote: Do you know where this conversion is, in the code? The impression I got from my quick look at the code was that a wrapper sinf was defined that just calls sin. I guess the typecast to float

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 12:19, Andrew Friedleyafrie...@indiana.edu wrote: OK, have some interesting results.  First is my array creation was not doing what I thought it was.  This (what I've been doing) creates an array of 159161 elements: numpy.arange(0.0, 1000, (2 * 3.14159) / 1000,

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread David Goldsmith
Actually, Robert's really a robot (indeed, the Kernel of all robot minds) - no way a biologic is going to beat him. ;-) DG --- On Tue, 8/4/09, Robert Kern robert.k...@gmail.com wrote: From: Robert Kern robert.k...@gmail.com Subject: Re: [Numpy-discussion] Why NaN? To: Discussion of

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Charles R Harris
On Tue, Aug 4, 2009 at 11:19 AM, Andrew Friedley afrie...@indiana.eduwrote: David Cournapeau wrote: On Wed, Aug 5, 2009 at 12:14 AM, Andrew Friedleyafrie...@indiana.edu wrote: Do you know where this conversion is, in the code? The impression I got from my quick look at the code was

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Andrew Friedley
Charles R Harris wrote: Depends on the CPU, FPU and the compiler flags. The computations could very well be done using double precision internally with conversions on load/store. Sure, but if this is the case, why is the performance blowing up on larger input values for float32 but not

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread David Goldsmith
Uh-oh, if my joke is going to promote wide-spread complacency, I take it back, I take it back! DG --- On Tue, 8/4/09, josef.p...@gmail.com josef.p...@gmail.com wrote: From: josef.p...@gmail.com josef.p...@gmail.com Subject: Re: [Numpy-discussion] Why NaN? To: Discussion of Numerical Python

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gael Varoquaux
On Tue, Aug 04, 2009 at 02:11:57PM -0400, josef.p...@gmail.com wrote: On Tue, Aug 4, 2009 at 1:45 PM, David Goldsmithd_l_goldsm...@yahoo.com wrote: Actually, Robert's really a robot (indeed, the Kernel of all robot minds) - no way a biologic is going to beat him. ;-) So, what is the

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gökhan Sever
This is the loveliest of all solutions: c[isfinite(c)].mean() You are all very helpful and funny. I am sure most of you spend more than 16 hours a day in front of or by your screens :) On Tue, Aug 4, 2009 at 11:46 AM, Gökhan Sever gokhanse...@gmail.com wrote: Hello, I know this has to have

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 13:40, Gökhan Severgokhanse...@gmail.com wrote: This is the loveliest of all solutions: c[isfinite(c)].mean() I kind of like c[c == c].mean(), but only because it's a bit mind-blowing. :-) You are all very helpful and funny. I am sure most of you spend more than 16

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Hans Meine
On Tuesday 04 August 2009 19:19:22 Andrew Friedley wrote: OK, have some interesting results. First is my array creation was not doing what I thought it was. This (what I've been doing) creates an array of 159161 elements: numpy.arange(0.0, 1000, (2 * 3.14159) / 1000, dtype=numpy.float32)

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gael Varoquaux
On Tue, Aug 04, 2009 at 01:43:54PM -0500, Robert Kern wrote: I kind of like c[c == c].mean(), but only because it's a bit mind-blowing. :-) You are all very helpful and funny. I am sure most of you spend more than 16 hours a day in front of or by your screens :) Hey! I resemble that

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gökhan Sever
On Tue, Aug 4, 2009 at 1:48 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, Aug 04, 2009 at 01:43:54PM -0500, Robert Kern wrote: I kind of like c[c == c].mean(), but only because it's a bit mind-blowing. :-) You are all very helpful and funny. I am sure most of you spend

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 14:29, Pierre GMpgmdevl...@gmail.com wrote: On Aug 4, 2009, at 2:43 PM, Robert Kern wrote: On Tue, Aug 4, 2009 at 13:40, Gökhan Severgokhanse...@gmail.com wrote: This is the loveliest of all solutions: c[isfinite(c)].mean() I kind of like c[c == c].mean(), but only

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gael Varoquaux
On Tue, Aug 04, 2009 at 01:54:49PM -0500, Gökhan Sever wrote: I see that you should have a browser embedding plugin for Ipyhon which you don't want to share with us :) No, I answer e-mail using vim. And do you only fix Mayavi issues in that not-included 2 hours? No, during the other

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Keith Goodman
On Tue, Aug 4, 2009 at 12:59 PM, Gael Varoquauxgael.varoqu...@normalesup.org wrote: On Tue, Aug 04, 2009 at 01:54:49PM -0500, Gökhan Sever wrote:    I see that you should have a browser embedding plugin for Ipyhon which you    don't want to share with us :) No, I answer e-mail using vim.

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Matthew Brett
Hi, On Tue, Aug 4, 2009 at 9:31 AM, David Cournapeaucourn...@gmail.com wrote: On Tue, Aug 4, 2009 at 8:13 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: I think I understand the problem. Unfortunately, that's looks tricky to solve... I hate distutils. Ok - should be fixed in

Re: [Numpy-discussion] Is this a bug in numpy.distutils ?

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 15:09, Matthew Brettmatthew.br...@gmail.com wrote:  File /home/mb312/usr/local/lib/python2.5/site-packages/numpy/distutils/command/build_ext.py, line 74, in run    self.library_dirs.append(build_clib.build_clib) UnboundLocalError: local variable 'build_clib'

[Numpy-discussion] Features in SciPy That are Absent in NumPy

2009-08-04 Thread Nanime Puloski
What features does SciPy have that are absent in NumPy? ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Bruce Southey
On Tue, Aug 4, 2009 at 1:40 PM, Gökhan Severgokhanse...@gmail.com wrote: This is the loveliest of all solutions: c[isfinite(c)].mean() This handling of nonfinite elements has come up before. Please remember that this only for 1d or flatten array so it not work in general especially along an

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Keith Goodman
On Tue, Aug 4, 2009 at 1:53 PM, Bruce Southeybsout...@gmail.com wrote: On Tue, Aug 4, 2009 at 1:40 PM, Gökhan Severgokhanse...@gmail.com wrote: This is the loveliest of all solutions: c[isfinite(c)].mean() This handling of nonfinite elements has come up before. Please remember that this

Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback

2009-08-04 Thread Bruce Southey
On Mon, Aug 3, 2009 at 9:42 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: Hi All,    I (David Cournapeau) and the people at Berkeley (Jarrod Millman, Fernando Perez, Matthew Brett) have been in discussion so that I could do some funded work on NumPy/SciPy. Although they are

Re: [Numpy-discussion] Features in SciPy That are Absent in NumPy

2009-08-04 Thread David Goldsmith
--- On Tue, 8/4/09, Neil Martinsen-Burrell n...@wartburg.edu wrote: What features does SciPy have that are absent in NumPy? Many.  And that's an understatement! DG SciPy includes algorithms for optimization, solving differential equations, numerical integration among many others. 

Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback

2009-08-04 Thread Charles R Harris
On Tue, Aug 4, 2009 at 3:24 PM, Bruce Southey bsout...@gmail.com wrote: On Mon, Aug 3, 2009 at 9:42 PM, David Cournapeauda...@ar.media.kyoto-u.ac.jp wrote: Hi All, I (David Cournapeau) and the people at Berkeley (Jarrod Millman, Fernando Perez, Matthew Brett) have been in discussion

Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback

2009-08-04 Thread David Goldsmith
--- On Tue, 8/4/09, Bruce Southey bsout...@gmail.com wrote: [snip] Almost a year ago Travis send an email : 'Report from SciPy'? http://mail.scipy.org/pipermail/numpy-discussion/2008-August/036909.html Of importance was that * NumPy 2.0 will be a library and will not automagically

Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback

2009-08-04 Thread Robert Kern
On Tue, Aug 4, 2009 at 16:49, David Goldsmithd_l_goldsm...@yahoo.com wrote: --- On Tue, 8/4/09, Bruce Southey bsout...@gmail.com wrote: [snip] Almost a year ago Travis send an email : 'Report from SciPy'? http://mail.scipy.org/pipermail/numpy-discussion/2008-August/036909.html Of

Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback

2009-08-04 Thread David Goldsmith
Gotchya, thanks! DG --- On Tue, 8/4/09, Robert Kern robert.k...@gmail.com wrote: From: Robert Kern robert.k...@gmail.com Subject: Re: [Numpy-discussion] Funded work on Numpy: proposed improvements and request for feedback To: Discussion of Numerical Python numpy-discussion@scipy.org

Re: [Numpy-discussion] scipy.stats.poisson.ppf raises OverflowError: cannot convert float infinity to long

2009-08-04 Thread Maria Liukis
Josef, Thanks a bunch! Masha liu...@usc.edu On Aug 4, 2009, at 4:01 PM, josef.p...@gmail.com wrote: On Tue, Aug 4, 2009 at 6:36 PM, Maria Liukisliu...@usc.edu wrote: Hello everybody, I'm using the following versions of scipy and numpy: scipy.__version__ '0.6.0'

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread David Warde-Farley
On 4-Aug-09, at 2:54 PM, Gökhan Sever wrote: I see that you should have a browser embedding plugin for Ipyhon which you don't want to share with us :) Ondrej's well on his way to fixing that: http://pythonnb.appspot.com/ David ___

Re: [Numpy-discussion] scipy.stats.poisson.ppf raises OverflowError: cannot convert float infinity to long

2009-08-04 Thread josef . pktd
On Tue, Aug 4, 2009 at 7:03 PM, Maria Liukisliu...@usc.edu wrote: Josef, Thanks a bunch! Masha You're welcome. Josef liu...@usc.edu On Aug 4, 2009, at 4:01 PM, josef.p...@gmail.com wrote: On Tue, Aug 4, 2009 at 6:36 PM, Maria Liukisliu...@usc.edu wrote: Hello

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gökhan Sever
On Tue, Aug 4, 2009 at 6:49 PM, David Warde-Farley d...@cs.toronto.eduwrote: On 4-Aug-09, at 2:54 PM, Gökhan Sever wrote: I see that you should have a browser embedding plugin for Ipyhon which you don't want to share with us :) Ondrej's well on his way to fixing that:

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Jochen
Hi all, I see something similar on my system. OK I've just done a test. System is Ubuntu 9.04 AMD64 there seems to be a regression for float32 with high values: In [47]: a=np.random.rand(1).astype(np.float32) In [48]: b=np.random.rand(1).astype(np.float64) In [49]:

Re: [Numpy-discussion] strange sin/cos performance

2009-08-04 Thread Charles R Harris
On Tue, Aug 4, 2009 at 7:18 PM, Jochen cycoma...@gmail.com wrote: Hi all, I see something similar on my system. OK I've just done a test. System is Ubuntu 9.04 AMD64 there seems to be a regression for float32 with high values: In [47]: a=np.random.rand(1).astype(np.float32) In [48]:

Re: [Numpy-discussion] Why NaN?

2009-08-04 Thread Gael Varoquaux
On Tue, Aug 04, 2009 at 07:03:43PM -0500, Gökhan Sever wrote: I would not be surprised if someone brings a real python snake into the conference then :) http://picasaweb.google.com/ziade.tarek/PyconFR#slideshow/5342502528927090354 ___