Re: [Numpy-discussion] hairy optimization problem

2009-05-06 Thread David Huard
Hi Mathew, You could use Newton's method to optimize for each vi sequentially. If you have an expression for the jacobian, it's even better. What I'd do is write a class with a method f(self, x, y) that records the result of f(x,y) each time it is called. I would then sample very coarsely the x,

Re: [Numpy-discussion] efficient 3d histogram creation

2009-05-06 Thread Chris Colbert
nice! This was really my first attempt at doing anything constructive with Cython. It was actually unbelievably easy to work with. I think i spent less time working on this, than I did trying to find an optimized solution using pure numpy and python. Chris On Wed, May 6, 2009 at 8:21 PM, wrote:

Re: [Numpy-discussion] Numpy Trac site redirecting in a loop?

2009-05-06 Thread Ken Basye
I ran into something like this a couple weeks ago. I use Firefox 3 on MacOS. My work-around was to clear all the cookies from scipy.org, clear all authenticated sessions, then register a completely new account name. I never could get my existing account to stop looping. HTH, Ken Thoma

Re: [Numpy-discussion] efficient 3d histogram creation

2009-05-06 Thread josef . pktd
On Wed, May 6, 2009 at 7:39 PM, Chris Colbert wrote: > i just realized I don't need the line: > > cdef int z = img.shape(2) > > it's left over from tinkering. sorry. And i should probably convert the out > array to type float to handle large data sets. > > Chris > > On Wed, May 6, 2009 at 7:30 PM,

Re: [Numpy-discussion] efficient 3d histogram creation

2009-05-06 Thread Chris Colbert
i just realized I don't need the line: cdef int z = img.shape(2) it's left over from tinkering. sorry. And i should probably convert the out array to type float to handle large data sets. Chris On Wed, May 6, 2009 at 7:30 PM, wrote: > On Wed, May 6, 2009 at 6:06 PM, Chris Colbert wrote: > >

Re: [Numpy-discussion] Numpy Trac site redirecting in a loop?

2009-05-06 Thread Thomas Robitaille
Could it be linked to specific users, since the problem occurs when loading the account page? I had the same problem on two different computers with two different browsers. Thomas -- View this message in context: http://www.nabble.com/Numpy-Trac-site-redirecting-in-a-loop--tp23067410p23417595.h

Re: [Numpy-discussion] efficient 3d histogram creation

2009-05-06 Thread josef . pktd
On Wed, May 6, 2009 at 6:06 PM, Chris Colbert wrote: > I decided to hold myself over until being able to take a hard look at the > numpy histogramdd code: > > Here is a quick thing a put together in cython. It's a 40x speedup over > histogramdd on Vista 32 using the minGW32 compiler. For a (480, 6

Re: [Numpy-discussion] Numpy Trac site redirecting in a loop?

2009-05-06 Thread Robert Kern
On Wed, May 6, 2009 at 19:19, Thomas Robitaille wrote: > > Hi, > > I'm having the exact same problem, trying to log in to the trac website for > numpy, and getting stuck in a redirect loop. I tried different browsers, and > no luck. The browser gets stuck on > > http://projects.scipy.org/numpy/pre

Re: [Numpy-discussion] Numpy Trac site redirecting in a loop?

2009-05-06 Thread Thomas Robitaille
Hi, I'm having the exact same problem, trying to log in to the trac website for numpy, and getting stuck in a redirect loop. I tried different browsers, and no luck. The browser gets stuck on http://projects.scipy.org/numpy/prefs/account and stops loading after a while because of too many red

Re: [Numpy-discussion] OS-X binary name...

2009-05-06 Thread Christopher Barker
David Warde-Farley wrote: > On 6-May-09, at 2:03 AM, Christopher Barker wrote: >> maybe: >> >> numpy-1.3.0-py2.5-macosx-python.org.dmg > > +1 on having python.org in the name. It clarifies and reinforces the > case that this isn't for the "Apple-shipped" Python exactly. > (which I heardcom

Re: [Numpy-discussion] efficient 3d histogram creation

2009-05-06 Thread Chris Colbert
I decided to hold myself over until being able to take a hard look at the numpy histogramdd code: Here is a quick thing a put together in cython. It's a 40x speedup over histogramdd on Vista 32 using the minGW32 compiler. For a (480, 630, 3) array, this executed in 0.005 seconds on my machine. Th

Re: [Numpy-discussion] OS-X binary name...

2009-05-06 Thread David Warde-Farley
On 6-May-09, at 2:03 AM, Christopher Barker wrote: > maybe: > > numpy-1.3.0-py2.5-macosx-python.org.dmg +1 on having python.org in the name. It clarifies and reinforces the case that this isn't for the "Apple-shipped" Python (which I heard comes with NumPy now?). David _

[Numpy-discussion] hairy optimization problem

2009-05-06 Thread Mathew Yeates
I have a function f(x,y) which produces N values [v1,v2,v3 vN] where some of the values are None (only found after evaluation) each evaluation of "f" is expensive and N is large. I want N x,y pairs which produce the optimal value in each column. A brute force approach would be to generate [

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread David Cournapeau
On Wed, May 6, 2009 at 10:44 PM, Talbot, Gerry wrote: > Does anyone know how to efficiently implement a recurrence relationship in > numpy such as: > > > > y[n] = A*x[n] + B*y[n-1] That's the direct implement of a linear filter with an infinite impulse response. That's exactly what s

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Talbot, Gerry
The application is essentially filtering 1D arrays, typically N is >20e6, the required result is y[1:N]. Gerry -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Alan G Isaac Sent: Wednesday, May 06, 2009 10:25 AM To: Discu

Re: [Numpy-discussion] ValueError: dimensions too large.

2009-05-06 Thread Charles R Harris
On Wed, May 6, 2009 at 8:18 AM, natachai wongchavalidkul < natacha...@hotmail.com> wrote: > > Hello alls, > > I currently have a problem with creating a multi-dimensional array in > numpy. The following is what I am trying to do and the error message. > > >>> test = zeros((3,3,3,3,3,3,10,4,6,2,18,

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread josef . pktd
On Wed, May 6, 2009 at 10:21 AM, wrote: > On Wed, May 6, 2009 at 10:00 AM, Talbot, Gerry wrote: >> Sorry, I guess I wasn't clear, I meant: >> >>        for n in xrange(1,N): >>          y[n] = A*x[n] + B*y[n-1] >> >> So y[n-1] is the result from the previous loop iteration. >> > > I was using sc

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Fabrice Silva
Le mercredi 06 mai 2009 à 10:21 -0400, josef.p...@gmail.com a écrit : > On Wed, May 6, 2009 at 10:00 AM, Talbot, Gerry wrote: > > Sorry, I guess I wasn't clear, I meant: > > > >for n in xrange(1,N): > > y[n] = A*x[n] + B*y[n-1] > > > > So y[n-1] is the result from the previous loo

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Alan G Isaac
On 5/6/2009 10:00 AM Talbot, Gerry apparently wrote: > for n in xrange(1,N): > y[n] = A*x[n] + B*y[n-1] So, x is known before you start? How big is N? Also, is y.shape (N,)? Do you need all of y or only y[N]? Alan Isaac ___ Numpy-discu

[Numpy-discussion] ValueError: dimensions too large.

2009-05-06 Thread natachai wongchavalidkul
Hello alls, I currently have a problem with creating a multi-dimensional array in numpy. The following is what I am trying to do and the error message. >>> test = zeros((3,3,3,3,3,3,10,4,6,2,18,10,11,4,2,2), dtype=float); Traceback (most recent call last): File "", line 1, in test = zer

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread josef . pktd
On Wed, May 6, 2009 at 10:00 AM, Talbot, Gerry wrote: > Sorry, I guess I wasn't clear, I meant: > >        for n in xrange(1,N): >          y[n] = A*x[n] + B*y[n-1] > > So y[n-1] is the result from the previous loop iteration. > I was using scipy.signal for this but I have to look up what I did e

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Talbot, Gerry
Sorry, I guess I wasn't clear, I meant: for n in xrange(1,N): y[n] = A*x[n] + B*y[n-1] So y[n-1] is the result from the previous loop iteration. Gerry -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of

Re: [Numpy-discussion] Recurrence relationships

2009-05-06 Thread Keith Goodman
On Wed, May 6, 2009 at 6:44 AM, Talbot, Gerry wrote: > Does anyone know how to efficiently implement a recurrence relationship in > numpy such as: > > > > y[n] = A*x[n] + B*y[n-1] On an intel chip I'd use a Monte Carlo simulation. On an amd chip I'd use: >> x = np.array([1,2,3]) >>

[Numpy-discussion] Recurrence relationships

2009-05-06 Thread Talbot, Gerry
Does anyone know how to efficiently implement a recurrence relationship in numpy such as: y[n] = A*x[n] + B*y[n-1] Thanks, Gerry ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/

Re: [Numpy-discussion] linalg.svd not working?

2009-05-06 Thread Muhammad Alkarouri
--- On Wed, 6/5/09, David Cournapeau wrote: ... > Ok, so that's not a gfortran problem. As Chuck, I think > that's an atlas > problem (you could check by compiling without ATLAS: It is an atlas problem. Not that I knew how to correct it, but I was able to build numpy with a standard package bla

Re: [Numpy-discussion] bitwise view on numpy array

2009-05-06 Thread Stéfan van der Walt
Hi Vincent Take a look at http://pypi.python.org/pypi/bitarray/ I'm not sure if you can initialise bitarrays from NumPy arrays. If not, you'll have to implement a conversion scheme, but that can be done without making a copy. Regards Stéfan 2009/5/6 Vincent Schut : > Hi, > > I'm gonna have lar

[Numpy-discussion] bitwise view on numpy array

2009-05-06 Thread Vincent Schut
Hi, I'm gonna have large (e.g. 2400x2400) arrays of 16 and 32 bit bitfields. I've been searching in vain for an efficient and convenient way to represent these array's individual bit's (or, even better, configureable bitfields of 1-4 bits each). Of course I know I can 'split' the array in its

Re: [Numpy-discussion] [review] py3k_bootstrap branch

2009-05-06 Thread Darren Dale
On Tue, May 5, 2009 at 9:12 PM, David Cournapeau wrote: > On Wed, May 6, 2009 at 3:57 AM, Darren Dale wrote: > > > > > There is a lot of interest in a 3to2 tool, and I have read speculation > > ( > http://sayspy.blogspot.com/2009/04/pycon-2009-recap-best-pycon-ever.html) > > that going from 3 to

Re: [Numpy-discussion] linalg.svd not working?

2009-05-06 Thread David Cournapeau
Muhammad Alkarouri wrote: > --- On Wed, 6/5/09, David Cournapeau wrote: > ... > >> What does ldd lapack_lite.so returns (lapack_lite.so is in >> numpy/linalg, >> in your installed directory) ? It may be that numpy uses >> gfortran, >> whereas ATLAS is built with g77. gfortran and g77 should >>

Re: [Numpy-discussion] linalg.svd not working?

2009-05-06 Thread Muhammad Alkarouri
--- On Wed, 6/5/09, David Cournapeau wrote: ... > What does ldd lapack_lite.so returns (lapack_lite.so is in > numpy/linalg, > in your installed directory) ? It may be that numpy uses > gfortran, > whereas ATLAS is built with g77. gfortran and g77 should > not be mixed, Thanks David. I went ther

Re: [Numpy-discussion] difficult optimization problem

2009-05-06 Thread Sebastian Walter
I tried looking at your question but ... kind of unusable without some documentation. You need to give at least the following information: what kind of optimization problem? LP,NLP, Mixed Integer LP, Stochastic, semiinfinite, semidefinite? Most solvers require the problem in the following form

Re: [Numpy-discussion] linalg.svd not working?

2009-05-06 Thread David Cournapeau
Muhammad Alkarouri wrote: >> Date: Tue, 5 May 2009 09:24:53 -0600 >> From: Charles R Harris >> > ... > >> This is almost always an ATLAS problem. Where did your >> ATLAS come from and >> what distro are you running? >> > > You are probably right. I compiled and installed ATLAS from so

Re: [Numpy-discussion] linalg.svd not working?

2009-05-06 Thread Muhammad Alkarouri
> Date: Tue, 5 May 2009 09:24:53 -0600 > From: Charles R Harris ... > This is almost always an ATLAS problem. Where did your > ATLAS come from and > what distro are you running? You are probably right. I compiled and installed ATLAS from source. The distro is Redhat Enterprise Linux 4. I had to