Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Robert Kern
On Mon, Mar 17, 2008 at 6:03 PM, Gnata Xavier <[EMAIL PROTECTED]> wrote: > Ok fine. Fine but in a few months quadcores will be "cheap". Using > numpy, I now I never get the best performances on a multicores machine > and I do not care. I just get the best > performance/time_needed_to_code_that

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Gnata Xavier
Charles R Harris wrote: > > > On Mon, Mar 17, 2008 at 1:59 PM, Gnata Xavier <[EMAIL PROTECTED] > > wrote: > > Francesc Altet wrote: > > A Monday 17 March 2008, Christopher Barker escrigué: > > > >>> > Plus a certain amount of numpy code depends on order o

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Anne Archibald
On 17/03/2008, Alan G Isaac <[EMAIL PROTECTED]> wrote: > > Alan suggested: > > >> 1. http://www.scipy.org/Numpy_Example_List_With_Doc > > On Mon, 17 Mar 2008, Chris Withers apparently wrote: > > > Yeah, read that, wood, trees, can't tell the... > > Oh, then you might want > http://www.scipy.org

[Numpy-discussion] SciPy to MyHDL! (was Re: Numpy-discussion Digest, Vol 18, Issue 35)

2008-03-17 Thread Robert Kern
Please do not reply to digest messages. Consider them read-only. If you want to participate in the mailing list, please subscribe and reply to the particular messages you are interested in. I will respond to this message, but I will not respond to any future replies to digest messages. On Mon, Mar

Re: [Numpy-discussion] Numpy-discussion Digest, Vol 18, Issue 35

2008-03-17 Thread Blubaugh, David A.
Robert, I should also further state that MyHDL is a module that converts pure python to verilog. MyHDL is just a means to handle the necessary conversion as well as the necessary simulation of python code that is being translated to verilog. Thanks, David Blubaugh -Original Messag

Re: [Numpy-discussion] Numpy-discussion Digest, Vol 18, Issue 35

2008-03-17 Thread Blubaugh, David A.
Robert, What I envisioned would be a simple but quick means to develop a FFT. I have worked this issue before with others who say that the way to do it would be to convert enough of the Numpy to MyHDL, which would then allow scipy to be imported within a python program. The question is to how th

Re: [Numpy-discussion] View ND Homogeneous Record Array as (N+1)D Array?

2008-03-17 Thread Robert Kern
On Mon, Mar 17, 2008 at 3:44 PM, Alexander Michael <[EMAIL PROTECTED]> wrote: > Is there a way to view an N-dimensional array with a *homogeneous* > record dtype as an array of N+1 dimensions? An example will make it > clear: > > import numpy > a = numpy.array([(1.0,2.0), (3.0,4.0)], dtype=[('A

[Numpy-discussion] View ND Homogeneous Record Array as (N+1)D Array?

2008-03-17 Thread Alexander Michael
Is there a way to view an N-dimensional array with a *homogeneous* record dtype as an array of N+1 dimensions? An example will make it clear: import numpy a = numpy.array([(1.0,2.0), (3.0,4.0)], dtype=[('A',float),('B',float)]) b = a.view(...) # do something magical print b array([[ 1., 2.],

Re: [Numpy-discussion] Scipy to MyHDL!

2008-03-17 Thread Robert Kern
On Mon, Mar 17, 2008 at 3:17 PM, Blubaugh, David A. <[EMAIL PROTECTED]> wrote: > > To Whom It May Concern, > > Please allow me to introduce myself. My name is David Allen Blubaugh. I am > currently in the developmental stages of a Field-Programmable-Gate-Array > (FPGA) device for a high-performan

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Alan G Isaac
> Alan suggested: >> 1. http://www.scipy.org/Numpy_Example_List_With_Doc On Mon, 17 Mar 2008, Chris Withers apparently wrote: > Yeah, read that, wood, trees, can't tell the... Oh, then you might want http://www.scipy.org/Tentative_NumPy_Tutorial or the other stuff at http://www.scipy.or

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Charles R Harris
On Mon, Mar 17, 2008 at 1:59 PM, Gnata Xavier <[EMAIL PROTECTED]> wrote: > Francesc Altet wrote: > > A Monday 17 March 2008, Christopher Barker escrigué: > > > >>> > Plus a certain amount of numpy code depends on order of > >>> > evaluation: > >>> > > >>> > a[:-1] = 2*a[1:] > >>> > >> I'm conf

Re: [Numpy-discussion] numpy.ma bug: need sanity check in masked_where

2008-03-17 Thread Eric Firing
Charles R Harris wrote: > File a ticket. #703 Eric > > On Mon, Mar 17, 2008 at 12:26 PM, Eric Firing <[EMAIL PROTECTED] > > wrote: > > Pierre, > > I just tripped over what boils down to the sequence given below. It > would be useful if the error in line

[Numpy-discussion] Scipy to MyHDL!

2008-03-17 Thread Blubaugh, David A.
To Whom It May Concern, Please allow me to introduce myself. My name is David Allen Blubaugh. I am currently in the developmental stages of a Field-Programmable-Gate-Array (FPGA) device for a high-performance computing application. I am currently evaluating the MyHDL environment for translating

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Gnata Xavier
Francesc Altet wrote: > A Monday 17 March 2008, Christopher Barker escrigué: > >>> > Plus a certain amount of numpy code depends on order of >>> > evaluation: >>> > >>> > a[:-1] = 2*a[1:] >>> >> I'm confused here. My understanding of how it now works is that the >> above translates to

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Francesc Altet
A Monday 17 March 2008, Christopher Barker escrigué: > > > Plus a certain amount of numpy code depends on order of > > > evaluation: > > > > > > a[:-1] = 2*a[1:] > > I'm confused here. My understanding of how it now works is that the > above translates to: > > 1) create a new array (call it tem

Re: [Numpy-discussion] numpy.ma bug: need sanity check in masked_where

2008-03-17 Thread Charles R Harris
File a ticket. On Mon, Mar 17, 2008 at 12:26 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > Pierre, > > I just tripped over what boils down to the sequence given below. It > would be useful if the error in line 53 were trapped right away; as it > is, it results in a masked array that looks reasona

[Numpy-discussion] numpy.ma bug: need sanity check in masked_where

2008-03-17 Thread Eric Firing
Pierre, I just tripped over what boils down to the sequence given below. It would be useful if the error in line 53 were trapped right away; as it is, it results in a masked array that looks reasonable but fails in a non-obvious way. Eric In [52]:x = [1,2] In [53]:y = ma.masked_where(False,

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Robert Kern
On Mon, Mar 17, 2008 at 12:06 PM, Christopher Barker <[EMAIL PROTECTED]> wrote: > > > Plus a certain amount of numpy code depends on order of > > > evaluation: > > > > > > a[:-1] = 2*a[1:] > > I'm confused here. My understanding of how it now works is that the > above translates to: > > 1

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Travis E. Oliphant
Chris Withers wrote: > Hi All, > > I'm using xlrd to read an excel workbook containing several columns of > data as follows: > Generally, arrays are not efficiently re-sized. It is best to pre-allocate, or simply create a list by appending and then convert to an array after the fact as you h

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Robert Kern
On Mon, Mar 17, 2008 at 12:16 PM, Chris Withers <[EMAIL PROTECTED]> wrote: > Charles Doutriaux wrote: > > 1-)You could use the concatenate function to grow an array as you go. > > Thanks. Would it be more efficient to build the whole set of arrays as > lists first or build them as arrays and use

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Chris Withers
Alan G Isaac wrote: > On Mon, 17 Mar 2008, Chris Withers apparently wrote: >> woefully inadequate state of the currently available free >> documentation > > 1. http://www.scipy.org/Numpy_Example_List_With_Doc Yeah, read that, wood, trees, can't tell the... > 2. write some Small problem with t

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Chris Withers
Charles Doutriaux wrote: > 1-)You could use the concatenate function to grow an array as you go. Thanks. Would it be more efficient to build the whole set of arrays as lists first or build them as arrays and use concatenate? > 2-) assumnig you still have your list > > b=numpy.array(data[name])

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-17 Thread Christopher Barker
> > Plus a certain amount of numpy code depends on order of > > evaluation: > > > > a[:-1] = 2*a[1:] I'm confused here. My understanding of how it now works is that the above translates to: 1) create a new array (call it temp1) from a[1:], which shares a's data block. 2) create a temp2 arra

Re: [Numpy-discussion] Read array from file

2008-03-17 Thread Christopher Barker
lorenzo bolla wrote: > what about numpy.loadtxt? or, probably faster, the little-known (it seems) numpy.fromfile() text mode: # Read and write the first information lines for i in range(0,5): Fdif.write( Fpst.readline() ) # Read and write coordinates coords =numpy.fromfile(Fpst,

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Alan G Isaac
On Mon, 17 Mar 2008, Chris Withers apparently wrote: > woefully inadequate state of the currently available free > documentation 1. http://www.scipy.org/Numpy_Example_List_With_Doc 2. write some Cheers, Alan Isaac ___ Numpy-discussion mailing list

Re: [Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Charles Doutriaux
Hi Chris, 1-)You could use the concatenate function to grow an array as you go. 2-) assumnig you still have your list b=numpy.array(data[name]) bmasked=numpy.ma.masked_equal(b,-1) Chris Withers wrote: > Hi All, > > I'm using xlrd to read an excel workbook containing several columns of > data

[Numpy-discussion] how to build a series of arrays as I go?

2008-03-17 Thread Chris Withers
Hi All, I'm using xlrd to read an excel workbook containing several columns of data as follows: for r in range(1,sheet.nrows): date = \ datetime(*xlrd.xldate_as_tuple(sheet.cell_value(r,0),book.datemode)) if date_cut_off and date < date_cut_off: continue for c in range(le

Re: [Numpy-discussion] arccosh for complex numbers, goofy choice of branch

2008-03-17 Thread Charles R Harris
On Mon, Mar 17, 2008 at 4:02 AM, lorenzo bolla <[EMAIL PROTECTED]> wrote: > Matlab is consistent, I'm afraid: > > >> acosh(1.5) > ans = > 0.9624 > >> acosh(1.5 + 0j) > ans = > 0.9624 > OK, that does it. I'm going to change it's behavior. Chuck

Re: [Numpy-discussion] arccosh for complex numbers, goofy choice of branch

2008-03-17 Thread lorenzo bolla
Matlab is consistent, I'm afraid: >> acosh(1.5) ans = 0.9624 >> acosh(1.5 + 0j) ans = 0.9624 L. On Mon, Mar 17, 2008 at 9:40 AM, Charles R Harris <[EMAIL PROTECTED]> wrote: > OK, > > Which branch do we want to use. As it currently is in numpy and > scipy.special > > arccosh(1.5) = 0.9

[Numpy-discussion] arccosh for complex numbers, goofy choice of branch

2008-03-17 Thread Charles R Harris
OK, Which branch do we want to use. As it currently is in numpy and scipy.special arccosh(1.5) = 0.96242365011920694 arccosh(1.5+0j) = -0.96242365011920705 + 0.0j This is consistent with gsl, but inconsistent with Mathematica, NAG, Maple, and probably all sensible implementations which use the