Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Timothy Hochberg
On Fri, Apr 4, 2008 at 3:31 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > On 04/04/2008, Alan G Isaac <[EMAIL PROTECTED]> wrote: > > On Fri, 4 Apr 2008, Gael Varoquaux apparently wrote: > > > I really thing numpy should be as thin as possible, so > > > that you can really say that it is only a

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Anne Archibald
On 04/04/2008, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Fri, 4 Apr 2008, Gael Varoquaux apparently wrote: > > I really thing numpy should be as thin as possible, so > > that you can really say that it is only an array > > manipulation package. This will also make it easier to > > sell as a

Re: [Numpy-discussion] Problem with numpy.linalg.eig?

2008-04-04 Thread Michael McNeil Forbes
On 16 Nov 2007, at 1:46 AM, Michael McNeil Forbes wrote: > On 15 Nov 2007, at 8:23 PM, David Cournapeau wrote: > >> Could you try without atlas ? Also, how did you configure atlas when >> building it ? It seems that atlas is definitely part of the problem >> (everybody having the problem does use a

Re: [Numpy-discussion] Efficient reading of binary data

2008-04-04 Thread Christopher Barker
Nicolas Bigaouette wrote: > So the next step would be to only read the needed data from the binary > file... You've gotten some suggestions, but another option is to use file.seek(0 to get where your data is, and numpy.fromfile() from there. -CHB -- Christopher Barker, Ph.D. Oceanographer E

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Alexander Michael
On Fri, Apr 4, 2008 at 9:49 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > However, if clearly better interfaces can be discovered, then we could > change it. For now, the functions are not imported into the numpy > namespace but live in > > numpy.lib.financial > > I could see a future

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Timothy Hochberg
On Fri, Apr 4, 2008 at 12:47 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Fri, Apr 4, 2008 at 9:56 AM, Will Lee <[EMAIL PROTECTED]> wrote: > > I understand the implication for the floating point comparison and the > need > > for allclose. However, I think in a doctest context, this behavior >

Re: [Numpy-discussion] packaging scipy (was Re: Simple financial functions for NumPy)

2008-04-04 Thread Gael Varoquaux
On Fri, Apr 04, 2008 at 04:29:03PM -0400, Alan Isaac wrote: > > import numpy as N > > import numpy.math as N.M > > import numpy.trig as N.T > > import numpy.stat as N.S > > ... > > c = (N.T.sin(b) + N.M.exp(d)) / N.S.mean(g) > I try to think of my students in such an environment. > Frig

Re: [Numpy-discussion] packaging scipy (was Re: Simple financial functions for NumPy)

2008-04-04 Thread Alan Isaac
On Fri, 04 Apr 2008, Joe Harrington wrote: > Wouldn't you rather do: > import numpy as N > ... > c = (N.sin(b) + N.exp(d)) / N.mean(g) > rather than: > import numpy as N > import numpy.math as N.M > import numpy.trig as N.T > import numpy.stat as N.S > ... > c = (N.T.sin(b) + N.M.exp(

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Travis E. Oliphant
Robert Kern wrote: > On Fri, Apr 4, 2008 at 9:56 AM, Will Lee <[EMAIL PROTECTED]> wrote: > >> I understand the implication for the floating point comparison and the need >> for allclose. However, I think in a doctest context, this behavior makes >> the doc much harder to read. >> > > Tabli

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Robert Kern
On Fri, Apr 4, 2008 at 9:56 AM, Will Lee <[EMAIL PROTECTED]> wrote: > I understand the implication for the floating point comparison and the need > for allclose. However, I think in a doctest context, this behavior makes > the doc much harder to read. Tabling the issue of the fact that we changed

[Numpy-discussion] packaging scipy (was Re: Simple financial functions for NumPy)

2008-04-04 Thread Joe Harrington
Every once in a while the issue of how to split things into packages comes up. In '04, I think, we had such a discussion regarding scipy (with Numeric as its base at the time). One idea was a core-plus-many-modules approach. We could then have metapackages that just consisted of dependencies and

Re: [Numpy-discussion] sorting ndarray

2008-04-04 Thread Nils Wagner
On Thu, 3 Apr 2008 23:02:24 -0700 (PDT) harryos <[EMAIL PROTECTED]> wrote: > i have a 1 dim numpy array > D=array( [[ 3. , 2. , 1. , 4. , 5. , 1.5, 2.2]] ) > i need to get this sorted in descending order and then >access the > elements . > D.sort() will make D as [[ 1. 1.5 2. 2.2 3.

[Numpy-discussion] numpy unittest failure on Mac PPC and Solaris 10

2008-04-04 Thread Christopher Hanley
Hi, We are seeing the following error on both Solaris and Mac PPC when running the numpy unittests:

Re: [Numpy-discussion] Final push for NumPy 1.0.5 (I need your help!)

2008-04-04 Thread Anne Archibald
On 04/04/2008, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Hey Anne, > > Do you currently have SVN access? Would you like it? > > I think the SciPy/NumPy sprint would be a good time to clean-up the > committers list and add new people interested in helping. I don't have SVN access. I'd b

Re: [Numpy-discussion] loading data with gaps

2008-04-04 Thread David Huard
Hi Tim, Look at the thread posted a couple of weeks ago named: loadtxt and missing values I'm guessing you'll find answers to your questions, if not, don't hesitate to ask. David 2008/4/3, Tim Michelsen <[EMAIL PROTECTED]>: > > Hello! > > How can I load a data file (e.g. CSV, DAT) in ASCII whi

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Charles R Harris
On Fri, Apr 4, 2008 at 10:17 AM, Joris De Ridder < [EMAIL PROTECTED]> wrote: > > On 04 Apr 2008, at 16:11, Travis E. Oliphant wrote: > > > > > There are only two reasons that I can think of right now to keep > > them in > > NumPy instead of moving them to SciPy. > > > > 1) These are "basic" funct

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Joris De Ridder
On 04 Apr 2008, at 16:11, Travis E. Oliphant wrote: > > There are only two reasons that I can think of right now to keep > them in > NumPy instead of moving them to SciPy. > > 1) These are "basic" functions and a scipy toolkit would contain > much more. Isn't this something you want to avoi

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Angus McMorland
-1 for any functions added to numpy. As only an end-user, I realize I have little right to a say in these sorts of issues, but for whatever it may be worth, I strongly agree with Gael's viewpoint. We should be aiming towards modular systems for function distribution, and now that it seems that the

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Alan G Isaac
On Fri, 4 Apr 2008, Gael Varoquaux apparently wrote: > I really thing numpy should be as thin as possible, so > that you can really say that it is only an array > manipulation package. This will also make it easier to > sell as a core package for developpers who do not care > about "calculator"

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Joe Harrington
+1 for simple financial functions in numpy, and congrats that it's on OLPC! If we have an FFT in numpy, we should have an internal rate of return. Anyone with investments needs that, and that's more people than those needing an FFT. I agree that Excel will bring in the most familiarity, but thei

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Gael Varoquaux
On Fri, Apr 04, 2008 at 09:11:37AM -0500, Travis E. Oliphant wrote: > There are only two reasons that I can think of right now to keep them in > NumPy instead of moving them to SciPy. > 1) These are "basic" functions and a scipy toolkit would contain much more. > 2) These are widely used and wou

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Francesc Altet
A Friday 04 April 2008, Travis E. Oliphant escrigué: > Sebastian Haase wrote: > > Hi Travis, > > This sounds of course very interesting, but could you elaborate on > > the reasoning why this should not rather be "only" in SciPy !? I > > thought many people think that numpy was already too crowded a

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Will Lee
I understand the implication for the floating point comparison and the need for allclose. However, I think in a doctest context, this behavior makes the doc much harder to read. For example, if you have this in your doctest: def doSomething(a): ''' >>> print doSomething(0.0011)[0] >>

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Bruce Southey
Hi, Note that at least under Python 2.5.1: >>> a=0.0012 >>> a 0.0011999 >>> str(a) '0.0012' >>> repr(a) '0.0011999' From Python docs, repr(): 'Return a string containing a printable representation of an object' and str(): 'Return a nice string representation of the o

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Travis E. Oliphant
Sebastian Haase wrote: > Hi Travis, > This sounds of course very interesting, but could you elaborate on the > reasoning why this should not rather be "only" in SciPy !? > I thought many people think that numpy was already too crowded and > should concentrate mostly on being a basic array handling

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Travis E. Oliphant
Sebastian Haase wrote: > Hi Travis, > This sounds of course very interesting, but could you elaborate on the > reasoning why this should not rather be "only" in SciPy !? > I thought many people think that numpy was already too crowded and > should concentrate mostly on being a basic array handling

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Gael Varoquaux
On Fri, Apr 04, 2008 at 03:58:39PM +0200, Sebastian Haase wrote: > This sounds of course very interesting, but could you elaborate on the > reasoning why this should not rather be "only" in SciPy !? > I thought many people think that numpy was already too crowded and > should concentrate mostly on

Re: [Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Sebastian Haase
Hi Travis, This sounds of course very interesting, but could you elaborate on the reasoning why this should not rather be "only" in SciPy !? I thought many people think that numpy was already too crowded and should concentrate mostly on being a basic array handling facility. I'm sure you have a go

Re: [Numpy-discussion] Final push for NumPy 1.0.5 (I need your help!)

2008-04-04 Thread Travis E. Oliphant
Anne Archibald wrote: > On 04/04/2008, Jarrod Millman <[EMAIL PROTECTED]> wrote: > > >> Since I sent my email last night another 5+ tickets have been closed. >> If we keep going at this rate, we should be able to release 1.0.5 next >> Friday (4/11) with every ticket closed. Specifically, than

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Dag Sverre Seljebotn
Bruce Southey wrote: > Hi, > This topic has come up many times and the only problem is the lack of > understanding how computers store numbers and computer numerical precision. > > The NumPy output is consistent with Python on my x86_64 linux system > with Python 2.5.1: > >>> a=0.0012 > >>> a >

[Numpy-discussion] Simple financial functions for NumPy

2008-04-04 Thread Travis E. Oliphant
Hi all, Last night I put together some simple financial functions based on the basic ones available in Excel (and on a financial calculator). It seems to me that NumPy ought to have these basic functions. There may be some disagreement about what to call them and what the interface should be

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Bruce Southey
Hi, This topic has come up many times and the only problem is the lack of understanding how computers store numbers and computer numerical precision. The NumPy output is consistent with Python on my x86_64 linux system with Python 2.5.1: >>> a=0.0012 >>> a 0.0011999 Simply put, in

Re: [Numpy-discussion] Final push for NumPy 1.0.5 (I need your help!)

2008-04-04 Thread Anne Archibald
On 04/04/2008, Jarrod Millman <[EMAIL PROTECTED]> wrote: > Since I sent my email last night another 5+ tickets have been closed. > If we keep going at this rate, we should be able to release 1.0.5 next > Friday (4/11) with every ticket closed. Specifically, thanks to > Travis Oliphant, David H

Re: [Numpy-discussion] problem with float64's str()

2008-04-04 Thread Stéfan van der Walt
Hi Will On 03/04/2008, Will Lee <[EMAIL PROTECTED]> wrote: > I seem to have problem with floating point printing with the latest numpy, > python 2.5.2, gcc 4.1.4, and 64-bit linux: > > In [24]: print str(0.0012) > 0.0012 > > In [25]: a = numpy.array([0.0012]) > > In [26]: print str(a[0]) > 0.0011

Re: [Numpy-discussion] Efficient reading of binary data

2008-04-04 Thread Sebastian Haase
On Fri, Apr 4, 2008 at 11:33 AM, Jarrod Millman <[EMAIL PROTECTED]> wrote: > On Fri, Apr 4, 2008 at 1:50 AM, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > Hi, > > Accidentally I'm exactly trying to do the same thing right now . > > > > What is the best way of memmapping into a file that

Re: [Numpy-discussion] multiply array

2008-04-04 Thread Nadav Horesh
result = (egimgs.T * eval.flat).T or, in place E = egimgs.T E *= eval.flat (egimgs would updated) Nadav. -הודעה מקורית- מאת: [EMAIL PROTECTED] בשם wilson נשלח: ו 04-אפריל-08 08:58 אל: numpy-discussion@scipy.org נושא: [Numpy-discussion] multiply array hello i have two arrays #of sh

Re: [Numpy-discussion] Efficient reading of binary data

2008-04-04 Thread Jarrod Millman
On Fri, Apr 4, 2008 at 1:50 AM, Sebastian Haase <[EMAIL PROTECTED]> wrote: > Hi, > Accidentally I'm exactly trying to do the same thing right now . > > What is the best way of memmapping into a file that is already open !? > > I have to read some text (header info) off the beginning of the

Re: [Numpy-discussion] Efficient reading of binary data

2008-04-04 Thread Sebastian Haase
On Fri, Apr 4, 2008 at 2:14 AM, Nicolas Bigaouette <[EMAIL PROTECTED]> wrote: > 2008/4/3, Robert Kern <[EMAIL PROTECTED]>: > > > On Thu, Apr 3, 2008 at 6:53 PM, Nicolas Bigaouette > > <[EMAIL PROTECTED]> wrote: > > > Thanx for the fast response Robert ;) > > > > > > I changed my code to use the sli

[Numpy-discussion] NumPy/SciPy sprint in Berkeley next week

2008-04-04 Thread Jarrod Millman
Hello, I have just organized a little NumPy/SciPy mini-sprint for next week. David Cournapeau is visiting me for a week and several other developers (Eric Jones, Robert Kern, Peter Wang, Jonathan Taylor, and Karl Young) will be stopping by during the week to work with the Berkeley team (Fernando P

Re: [Numpy-discussion] multiply array

2008-04-04 Thread wilson
> #of shape (1,6) > eval=array([[3.,3.2,1.,1.1,5.,0.5]]) > eval.shape=(-1,) please not the correction..i need to multiply first row of egimgs with 3.0 ,second row with 3.2,last(sixth) row with 0.5 ..For that purpose i made the above into a 1 dimensional array. A for loop seems inefficient in

Re: [Numpy-discussion] Final push for NumPy 1.0.5 (I need your help!)

2008-04-04 Thread Jarrod Millman
On Wed, Apr 2, 2008 at 9:36 PM, Jarrod Millman <[EMAIL PROTECTED]> wrote: > Again, if you have any time to help close tickets or improve > documentation, please take the time over the next few days to do so. > And thank you to everyone who has been working to get this release > ready! Since I