Re: [Numpy-discussion] any interest in including a second-order gradient?

2008-10-28 Thread Stéfan van der Walt
Hi Andrew We should discuss different options for the implementation. The namespace is fairly cluttered, and it may be that we want to implement gradient3 some time in the future as well. Maybe something like gradient(f, 1, 2, 3, order=2) would work -- then we can combine gradient and

[Numpy-discussion] numpy ticket #852 (temporary files in savez)

2008-10-28 Thread Zbyszek Szmek
Hi, I looked at this ticket and whipped up two alternative patches, like mentioned in the description: in-memory or temporary dir on disk. On my computer the second one is slightly faster. I think it is important to merge some version of this fix. In it's current form, someone using

Re: [Numpy-discussion] any interest in including a second-ordergradient?

2008-10-28 Thread Andrew Hawryluk
I agree that the gradient functions should be combined, especially considering how much redundant code would be added by keeping them separate. Here is one possible implementation, but I don't like the signature yet as it departs from the current behaviour. At the risk of demonstrating my

Re: [Numpy-discussion] any interest in including a second-ordergradient?

2008-10-28 Thread Robert Kern
On Tue, Oct 28, 2008 at 16:28, Andrew Hawryluk [EMAIL PROTECTED] wrote: I agree that the gradient functions should be combined, especially considering how much redundant code would be added by keeping them separate. Here is one possible implementation, but I don't like the signature yet as it

Re: [Numpy-discussion] any interest in including a second-ordergradient?

2008-10-28 Thread Fabrice Silva
Le mardi 28 octobre 2008 à 15:28 -0600, Andrew Hawryluk a écrit : I agree that the gradient functions should be combined, especially considering how much redundant code would be added by keeping them separate. Here is one possible implementation, but I don't like the signature yet as it

Re: [Numpy-discussion] any interest in including a second-ordergradient?

2008-10-28 Thread David Warde-Farley
On 28-Oct-08, at 5:57 PM, Fabrice Silva wrote: Are there some parts of the code that may be used only once to calculate both the gradient and the second derivative (isn't it called the hessian, at least in the N-d case) ? Probably. I'd imagine depends on your differencing scheme; central

[Numpy-discussion] Advanced indexing question - subset of data cube as a 2D array.

2008-10-28 Thread Adam
Hi numpy group, I have a problem I know there is an elegant solution to, but I can't wrap my head around the right way to do the indexing. The problem: I have a 2D array that has been chopped up into 3 dimensions - it was [ time X detectors ], it is now [ scans X time X detectors ]. During