Re: [Numpy-discussion] Distance Formula on an Array

2009-04-26 Thread Eike Welk
Hello Ian! On Saturday 25 April 2009, Ian Mallett wrote: > Can I make "vec" an array of class instances? I tried: > class c: > def __init__(self): > self.position = [0,0,0] > vec = array([c(),c(),c()]) > pos = array([0,4,0]) > sqrt(((vec.position - pos)**2).sum(1)) > > Which doesn't w

Re: [Numpy-discussion] Possible new multiplication operators for Python

2008-08-20 Thread Eike Welk
On Tuesday 19 August 2008, Alan G Isaac wrote: > > Proposal 1: PEP 225, but *just* for multiplication. > Either ~* as in the PEP or @* (which I prefer). > (This looks simplest.) > > Proposal 2: PEP 225 > (but maybe using @ instead of ~). > > Proposal 3: use of a unicode character, > perhaps × since

Re: [Numpy-discussion] ndarray.__mul__ is too gready?

2008-04-24 Thread Eike Welk
Just for the record, because I had a very similar problem: On Wednesday 23 January 2008 12:11, Pearu Peterson wrote: > Users may accidentally hit vector * matrix and this should raise > an exception. But when vector is numpy array, then ndarray.__mul__ > calls element * A for each array element an

Re: [Numpy-discussion] arange and floating point arguments

2007-09-16 Thread Eike Welk
Ok, I hit the send button too fast. Sorry! Eike. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] arange and floating point arguments

2007-09-14 Thread Eike Welk
On Friday 14 September 2007 20:12, Charles R Harris wrote: > Since none of the numbers are exactly represented in IEEE floating > point, this sort of oddity is expected. If you look at the exact > values, (.4 + .2)/.1 > 6 and .6/.1 < 6 . That said, I would expect You hit send too fast! The frac

Re: [Numpy-discussion] Conversion from numarray to numpy

2007-07-11 Thread Eike Welk
Sorry, I made a typo! On Wednesday 11 July 2007 17:32, Eike Welk wrote: > On Wednesday 11 July 2007 12:52, Michał Szpadzik wrote: > > I would like to know how change this True/False to 1/0 > > To convert an array of bool to an array double, you can use the > function numpy

Re: [Numpy-discussion] Conversion from numarray to numpy

2007-07-11 Thread Eike Welk
On Wednesday 11 July 2007 12:52, Michał Szpadzik wrote: > I would like to know how change this True/False to 1/0 To convert an array of bool to an array double, you can use the function numpy.doube( ... ). The function numpy.int32( ... ) converts to integers. Regards, Eike. ___

Re: [Numpy-discussion] [ANN]New numpy, scipy and atlas rpms for FC 5, 6 and 7 and openSUSE (with 64 bits arch support)

2007-06-29 Thread Eike Welk
On Friday 29 June 2007 05:15, David Cournapeau wrote: > Could you give me more information on the AMD failure ? Are you > using 64 bits mode ? No, its an old Athlon XP. I'll send you the log directory and the output of "make test" in private mail. It's 0.5 mb compressed. What else do you want?

Re: [Numpy-discussion] [ANN]New numpy, scipy and atlas rpms for FC 5, 6 and 7 and openSUSE (with 64 bits arch support)

2007-06-28 Thread Eike Welk
On Sunday 24 June 2007 13:05, David Cournapeau wrote: > Hi there, > > After quite some pain, I finally managed to build a LAPACK + > ATLAS rpm useful for numpy and scipy. Read the following if you --- snip -- > and lapack. I would like to h

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Eike Welk
On Wednesday 18 April 2007 20:14, Sturla Molden wrote: > a[i] = 2.0 # The expression 'a * b + c * d' gets evaluated. The >             # object referred to by y now holds an actual array. >             # Finally, 2.0 is written to a[i]. This case will require some extra work. The array needs to re

Re: [Numpy-discussion] Efficient operator overloading

2007-04-18 Thread Eike Welk
In the SciPy sandbox there is a module that goes into this direction. It was mentioned in the other optimization thread. numexpr: http://projects.scipy.org/scipy/scipy/browser/trunk/Lib/sandbox/numexpr This module needs to be combined with a derived array class where the operators return unevalu

Re: [Numpy-discussion] arrayrange

2007-03-14 Thread Eike Welk
I would use something like this: t = linspace(0, durSecs, durSecs*SRate) Do you know the 'Numpy Example List' http://www.scipy.org/Numpy_Example_List Regards Eike. PS: Ah, you did subscribe. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] Possible solution to binary distributionproblems for numpy on linux?

2007-02-12 Thread Eike Welk
Hello David! You may get in contact with Werner Hoch. He currently creates NumPy, SciPy, and Matplotlib packages for Opensuse. werner dot ho (at the server) gmx dot de The packages are here: http://repos.opensuse.org/science/ Regards Eike. ___ Numpy

Re: [Numpy-discussion] newbie: attempt at data frame

2006-12-29 Thread Eike Welk
On Friday 29 December 2006 00:39, Vincent Nijs wrote: > Eike: > I think I can figure out how to add a plot method. However, if you > have some more suggestions on how to implement the getAtTime, > extract, and set methods you mentioned that would be great. Set method: I thought of a method to chang

Re: [Numpy-discussion] newbie: attempt at data frame

2006-12-28 Thread Eike Welk
If your main concern is to store scientific data on disk you might try: http://www.pytables.org/moin However, it uses numarray internally and a C library, which you have to build from source. (You use a Mac right?) Concerning your code: - Your two file solution seems impractical to me. I thin