Re: [Numpy-discussion] problems with numdifftools

2010-10-28 Thread Sebastian Walter
On Wed, Oct 27, 2010 at 10:50 PM, Nicolai Heitz nicolaihe...@gmx.de wrote: m 27.10.2010 02:02, schrieb Sebastian Walter:  On Wed, Oct 27, 2010 at 12:59 AM, Pauli Virtanenp...@iki.fi   wrote:  Tue, 26 Oct 2010 14:24:39 -0700, Nicolai Heitz wrote:    

[Numpy-discussion] quadratic function

2010-10-28 Thread Brennan Williams
I have used both linear least squares and radial basis functions as a proxy equation, calculated from the results of computer simulations which are calculating some objective function value based on a number of varied input parameters. As an alternative option I want to add a quadratic

Re: [Numpy-discussion] Stacking a 2d array onto a 3d array

2010-10-28 Thread Anne Archibald
On 26 October 2010 21:02, Dewald Pieterse dewald.piete...@gmail.com wrote: I see my slicing was the problem, np.vstack((test[:1], test)) works perfectly. Yes and no. np.newaxis (or None for short) is a very useful tool; you just stick it in an index expression and it adds an axis of length one

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Robert Kern
On Thu, Oct 28, 2010 at 06:38, Brennan Williams brennan.willi...@visualreservoir.com wrote:  I have used both linear least squares and radial basis functions as a proxy equation, calculated from the results of computer simulations which are calculating some objective function value based on a

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread Darren Dale
Hi Chuck, On Wed, Oct 27, 2010 at 1:30 PM, Charles R Harris charlesr.har...@gmail.com wrote: I'd like to do something here, but I'm waiting for a consensus and for someone to test things out, maybe with a test repo, to make sure things operate correctly. The documentation isn't that clear...

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread Charles R Harris
On Thu, Oct 28, 2010 at 9:23 AM, Darren Dale dsdal...@gmail.com wrote: Hi Chuck, On Wed, Oct 27, 2010 at 1:30 PM, Charles R Harris charlesr.har...@gmail.com wrote: I'd like to do something here, but I'm waiting for a consensus and for someone to test things out, maybe with a test repo,

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread josef . pktd
On Thu, Oct 28, 2010 at 12:11 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Oct 28, 2010 at 9:23 AM, Darren Dale dsdal...@gmail.com wrote: Hi Chuck, On Wed, Oct 27, 2010 at 1:30 PM, Charles R Harris charlesr.har...@gmail.com wrote: I'd like to do something here, but I'm

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Brennan Williams
On 29/10/2010 2:34 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 06:38, Brennan Williams brennan.willi...@visualreservoir.com wrote: I have used both linear least squares and radial basis functions as a proxy equation, calculated from the results of computer simulations which are

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Robert Kern
On Thu, Oct 28, 2010 at 12:33, Brennan Williams brennan.willi...@visualreservoir.com wrote:  On 29/10/2010 2:34 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 06:38, Brennan Williams brennan.willi...@visualreservoir.com  wrote:   I have used both linear least squares and radial basis

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Brennan Williams
On 29/10/2010 6:35 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 12:33, Brennan Williams brennan.willi...@visualreservoir.com wrote: On 29/10/2010 2:34 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 06:38, Brennan Williams brennan.willi...@visualreservoir.comwrote: I have

Re: [Numpy-discussion] quadratic function

2010-10-28 Thread Robert Kern
On Thu, Oct 28, 2010 at 12:47, Brennan Williams brennan.willi...@visualreservoir.com wrote:  On 29/10/2010 6:35 a.m., Robert Kern wrote: On Thu, Oct 28, 2010 at 12:33, Brennan Williams brennan.willi...@visualreservoir.com  wrote:   On 29/10/2010 2:34 a.m., Robert Kern wrote: On Thu, Oct 28,

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread Darren Dale
On Thu, Oct 28, 2010 at 12:23 PM, josef.p...@gmail.com wrote: On Thu, Oct 28, 2010 at 12:11 PM, Charles R Harris On Thu, Oct 28, 2010 at 9:23 AM, Darren Dale dsdal...@gmail.com wrote: And now the bad news: I have not been able to verify that Git respects the autocrlf setting or the eol

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread josef . pktd
On Thu, Oct 28, 2010 at 2:40 PM, Darren Dale dsdal...@gmail.com wrote: On Thu, Oct 28, 2010 at 12:23 PM,  josef.p...@gmail.com wrote: On Thu, Oct 28, 2010 at 12:11 PM, Charles R Harris On Thu, Oct 28, 2010 at 9:23 AM, Darren Dale dsdal...@gmail.com wrote: And now the bad news: I have not been

Re: [Numpy-discussion] problems with numdifftools

2010-10-28 Thread Sebastian Walter
hmm, I have just realized that I forgot to upload the new version to pypi: it is now available on http://pypi.python.org/pypi/algopy On Thu, Oct 28, 2010 at 10:47 AM, Sebastian Walter sebastian.wal...@gmail.com wrote: On Wed, Oct 27, 2010 at 10:50 PM, Nicolai Heitz nicolaihe...@gmx.de wrote: m

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread Darren Dale
On Thu, Oct 28, 2010 at 3:23 PM, josef.p...@gmail.com wrote: On Thu, Oct 28, 2010 at 2:40 PM, Darren Dale dsdal...@gmail.com wrote: On Thu, Oct 28, 2010 at 12:23 PM,  josef.p...@gmail.com wrote: On Thu, Oct 28, 2010 at 12:11 PM, Charles R Harris On Thu, Oct 28, 2010 at 9:23 AM, Darren Dale

[Numpy-discussion] ndarray __getattr__ to perform __getitem__

2010-10-28 Thread Ian Stokes-Rees
I have an ndarray with named dimensions. I find myself writing some fairly laborious code with lots of square brackets and quotes. It seems like it wouldn't be such a big deal to overload __getattribute__ so instead of doing: r = genfromtxt('results.dat',dtype=[('a','int'), ('b', 'f8'),

Re: [Numpy-discussion] whitespace in git repo

2010-10-28 Thread Christopher Barker
On 10/28/10 1:25 PM, Darren Dale wrote: No, I did not. You are right, this shows \r\n. Why is it necessary to open them as binary? IIUC (OIDUC), one should use 'rU' to unify line endings. Although, on a mac: In [1]:

Re: [Numpy-discussion] ndarray __getattr__ to perform __getitem__

2010-10-28 Thread Robert Kern
On Thu, Oct 28, 2010 at 15:17, Ian Stokes-Rees ijsto...@hkl.hms.harvard.edu wrote: I have an ndarray with named dimensions.  I find myself writing some fairly laborious code with lots of square brackets and quotes.  It seems like it wouldn't be such a big deal to overload __getattribute__ so

Re: [Numpy-discussion] ndarray __getattr__ to perform __getitem__

2010-10-28 Thread Ian Stokes-Rees
On 10/28/10 5:29 PM, Robert Kern wrote: On Thu, Oct 28, 2010 at 15:17, Ian Stokes-Rees ijsto...@hkl.hms.harvard.edu wrote: I have an ndarray with named dimensions. I find myself writing some fairly laborious code with lots of square brackets and quotes. It seems like it wouldn't be such a

Re: [Numpy-discussion] ndarray __getattr__ to perform __getitem__

2010-10-28 Thread Robert Kern
On Thu, Oct 28, 2010 at 16:37, Ian Stokes-Rees ijsto...@hkl.hms.harvard.edu wrote: On 10/28/10 5:29 PM, Robert Kern wrote: On Thu, Oct 28, 2010 at 15:17, Ian Stokes-Rees ijsto...@hkl.hms.harvard.edu wrote: I have an ndarray with named dimensions.  I find myself writing some fairly laborious

Re: [Numpy-discussion] Inconsistency with __index__() for rank-1 arrays?

2010-10-28 Thread Travis Oliphant
The __index__ method returns an integer from an array. The current behavior follows the idea of return an integer if there is 1-element in the array Your suggestion is to only return an integer if it is a rank-0 array, otherwise raise an error. This could potentially be changed in