Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Anubhab Baksi
Thanks all, my client actually wants the output at a minimum time. On Thu, Aug 29, 2013 at 11:30 PM, Ralf Gommers wrote: > > if you have a reasonably large amount of data (say O(100)), > > I need to deal with nearly 2**19 or 2**20 arrays of length about 250 each. On Thu, Aug 29, 2013 at 11:30 P

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Benjamin Root
On Aug 29, 2013 4:11 PM, "Jonathan T. Niehof" wrote: > > On 08/29/2013 01:48 PM, Ralf Gommers wrote: > > > Thanks. I had read that quite differently, and I'm sure I'm not the only > > one. Some context would have helped > > My apologies--that was a rather obtuse reference. > Just for future r

[Numpy-discussion] Matrix peculiarities

2013-08-29 Thread Colin J. Williams
Ralf, Could you please elaborate on the matrix weaknesses? Is there any work planned to eliminate the peculiarities? Regards, Colin W. Subject: Re: [Numpy-discussion] Relative speed To: Discussion of Numerical

[Numpy-discussion] _PyADt

2013-08-29 Thread Charles R Harris
Anyone know what _PyADt is? It turns up in ndarraytypes.h #define PyDataType_ISBOOL(obj) PyTypeNum_ISBOOL(_PyADt(obj)) and only there. It's not in the build directory, google yields nothing. I suspect it is an historical artifact turned bug and should be replaced by ((PyArray_Descr*)(obj))->type_

Re: [Numpy-discussion] Stick (line segments) percolation algorithm - graph theory?

2013-08-29 Thread Josè Luis Mietta
Thanks a lot!!   José Luis De: Brett Olsen Para: Discussion of Numerical Python Enviado: lunes, 26 de agosto de 2013 14:08 Asunto: Re: [Numpy-discussion] Stick (line segments) percolation algorithm - graph theory? I can see a couple opportunities for impr

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Zachary Pincus
> And as you pointed out, > most of the time for non-trivial datasets the numpy operations will be > faster. (I'm daunted by the notion of trying to do linear algebra on > lists of tuples, assuming that's the relevant set of operations given > the comparison to the matrix class.) Note the impo

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Jonathan T. Niehof
On 08/29/2013 01:48 PM, Ralf Gommers wrote: > Thanks. I had read that quite differently, and I'm sure I'm not the only > one. Some context would have helped My apologies--that was a rather obtuse reference. In my oddly-wired brain it struck me as a fairly similar, suboptimally-posed questio

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Alan G Isaac
On 8/29/2013 3:48 PM, Ralf Gommers wrote: > Some context would have helped. http://www.youtube.com/watch?v=y2R3FvS4xr4 fwiw, Alan ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Ralf Gommers
On Thu, Aug 29, 2013 at 6:10 PM, Eric Moore wrote: > > > African or European? > > > > > > Why on earth would you ask that? > > > > > > Its a Monty Python and the Holy Grail reference. Thanks. I had read that quite differently, and I'm sure I'm not the only one. Some context would have helpe

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Eric Moore
> African or European? > > > Why on earth would you ask that? > > Its a Monty Python and the Holy Grail reference. Eric ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Ralf Gommers
On Thu, Aug 29, 2013 at 3:41 PM, Jonathan T. Niehof wrote: > On 08/29/2013 09:33 AM, Anubhab Baksi wrote: > > Hi, > > I need to know about the relative speed (i.e., which one is faster) of > > the followings: > > 1. list and numpy array, tuples and numpy array > > 2. list of tuples and numpy matri

Re: [Numpy-discussion] Use numpy.distutils to build fortran with BLAS

2013-08-29 Thread Kyle Mandli
In the Clawpack projects (specifically the Riemann solvers) we compile against LAPACK and the BLAS using f2py via the `--link-lapack_opt` flag. This does cause some problems in terms of portability though, Aron Ahmadia might be able to shed some light on this as he has looked into it most recently

Re: [Numpy-discussion] Relative speed

2013-08-29 Thread Jonathan T. Niehof
On 08/29/2013 09:33 AM, Anubhab Baksi wrote: > Hi, > I need to know about the relative speed (i.e., which one is faster) of > the followings: > 1. list and numpy array, tuples and numpy array > 2. list of tuples and numpy matrix (first one is rectangular) > 3. random.randint() and numpy.random.rand

Re: [Numpy-discussion] Array addition inconsistency

2013-08-29 Thread josef . pktd
On Thu, Aug 29, 2013 at 9:39 AM, Benjamin Root wrote: > > > On Thu, Aug 29, 2013 at 8:04 AM, Robert Kern wrote: > >> On Thu, Aug 29, 2013 at 12:00 PM, Martin Luethi >> wrote: >> > >> > Dear all, >> > >> > After some surprise, I noticed an inconsistency while adding array >> > slices: >> > >> > >

[Numpy-discussion] Relative speed

2013-08-29 Thread Anubhab Baksi
Hi, I need to know about the relative speed (i.e., which one is faster) of the followings: 1. list and numpy array, tuples and numpy array 2. list of tuples and numpy matrix (first one is rectangular) 3. random.randint() and numpy.random.random_integers() Thank you. ___

Re: [Numpy-discussion] Array addition inconsistency

2013-08-29 Thread Benjamin Root
On Thu, Aug 29, 2013 at 8:04 AM, Robert Kern wrote: > On Thu, Aug 29, 2013 at 12:00 PM, Martin Luethi > wrote: > > > > Dear all, > > > > After some surprise, I noticed an inconsistency while adding array > > slices: > > > > > a = np.arange(5) > > > a[1:] = a[1:] + a[:-1] > > > a > > array([0, 1,

Re: [Numpy-discussion] Array addition inconsistency

2013-08-29 Thread Robert Kern
On Thu, Aug 29, 2013 at 12:00 PM, Martin Luethi wrote: > > Dear all, > > After some surprise, I noticed an inconsistency while adding array > slices: > > > a = np.arange(5) > > a[1:] = a[1:] + a[:-1] > > a > array([0, 1, 3, 5, 7]) > > versus inplace > > > a = np.arange(5) > > a[1:] += a[:-1] > > a

[Numpy-discussion] Array addition inconsistency

2013-08-29 Thread Martin Luethi
Dear all, After some surprise, I noticed an inconsistency while adding array slices: > a = np.arange(5) > a[1:] = a[1:] + a[:-1] > a array([0, 1, 3, 5, 7]) versus inplace > a = np.arange(5) > a[1:] += a[:-1] > a array([ 0, 1, 3, 6, 10]) My suspicition is that the second variant does not cre