[Numpy-discussion] ANN: NumPy 1.2.1

2008-10-29 Thread Jarrod Millman
I'm pleased to announce the release of NumPy 1.2.1. NumPy is the fundamental package needed for scientific computing with Python. It contains: * a powerful N-dimensional array object * sophisticated (broadcasting) functions * basic linear algebra functions * basic Fourier transforms *

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

2008-10-29 Thread Adam Ginsburg
In [85]: bi = (f.bolo_indices[np.newaxis,:]+ ones([7751,1])).astype('int') In [86]: whc = (whscan[:,np.newaxis] + ones([1,107])).astype('int') In [87]: array2d[whc,bi] = temp2d I thought this had worked, but the values didn't seem to be going to the right places when I re-examined them.

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

2008-10-29 Thread Andrew Hawryluk
-Original Message- From: [EMAIL PROTECTED] [mailto:numpy-discussion- [EMAIL PROTECTED] On Behalf Of David Warde-Farley Sent: 28 Oct 2008 10:15 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] any interest in includinga second- ordergradient? On 28-Oct-08, at

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

2008-10-29 Thread Ravi
On Wednesday 29 October 2008 01:44:06 Adam wrote: In [62]: temp2d = reshape(array3d,[23*337,107]) In [63]: temp2d2 = zeros([23*337,144]) In [64]: temp2d2[:,f.bolo_indices] = temp2d In [65]: array2d[whscan,:] = temp2d2 This works, but it feels wrong to me: I think there should be a way to

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

2008-10-29 Thread Andrew Hawryluk
-Original Message- From: [EMAIL PROTECTED] [mailto:numpy-discussion- [EMAIL PROTECTED] On Behalf Of Robert Kern Sent: 28 Oct 2008 3:36 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] any interest in including asecond- ordergradient? On Tue, Oct 28, 2008 at

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-29 Thread Fernando Perez
Hey David, On Wed, Oct 29, 2008 at 2:00 AM, David Warde-Farley [EMAIL PROTECTED] wrote: Hi Fernando, In Robert's comment, I think the reST processor somehow got rid of a backslash. In my browser I see (I'm looking at you, Matlab's ) although this is an aside that will be lost on

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

2008-10-29 Thread Stéfan van der Walt
2008/10/29 Andrew Hawryluk [EMAIL PROTECTED]: Any chance of using the proposed API with the existing name? What is deemed sufficient justification for modifying the API of an existing NumPy function? It causes trouble for existing users, but the number of future users exceeds the number of

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

2008-10-29 Thread Fernando Perez
Howdy, Minor comment on all this, from the peanut gallery... Without commenting on the original gradient API or changes, I'm a strong -1000 on introducing the notion of 'order' into a gradient function. The gradient, from every definition I can remember, is a first-order operation. Matlab's

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-29 Thread Eric Firing
David Warde-Farley wrote: Hi Fernando, In Robert's comment, I think the reST processor somehow got rid of a backslash. In my browser I see (I'm looking at you, Matlab's ) although this is an aside that will be lost on anyone who hasn't used the Matlab backslash operator

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-29 Thread Robert Kern
On Wed, Oct 29, 2008 at 14:33, Eric Firing [EMAIL PROTECTED] wrote: David Warde-Farley wrote: Hi Fernando, In Robert's comment, I think the reST processor somehow got rid of a backslash. In my browser I see (I'm looking at you, Matlab's ) although this is an aside that will be lost

[Numpy-discussion] Enabling NaN-usage in F77 code on Windows

2008-10-29 Thread Wes McKinney
I'm having some trouble getting NaN's to return from f77 code running under latest f2py in both g77 and gfortran. I would prefer to use gfortran but whenever I set a result value = NAN, it comes back to Python as 0. Has anyone tackled this issue? I am new to using f2py, have been moving along fine

Re: [Numpy-discussion] (Late) summary of PEP-225 discussion at Scipy

2008-10-29 Thread David Warde-Farley
On 29-Oct-08, at 3:43 PM, Robert Kern wrote: Eh, that's not entirely true. x = 1 x += 2 That's not in-place. They are called augmented assignments, not in-place operations for this reason. The defining characteristic is that x op= y should be equivalent to x = x op y except possibly

[Numpy-discussion] Adding the ability to clone a few fields from a data-type

2008-10-29 Thread Travis E. Oliphant
Hi all, I'd like to add to NumPy the ability to clone a data-type object so that only a view fields are copied over but that it retains the same total size. This would allow, for example, the ability to select out a few records from a structured array using subarr = arr.view(cloned_dtype)

Re: [Numpy-discussion] Adding the ability to clone a few fields from a data-type

2008-10-29 Thread Robert Kern
On Wed, Oct 29, 2008 at 19:05, Travis E. Oliphant [EMAIL PROTECTED] wrote: Hi all, I'd like to add to NumPy the ability to clone a data-type object so that only a view fields are copied over but that it retains the same total size. This would allow, for example, the ability to select out a

Re: [Numpy-discussion] augmented assignment and in-place operations

2008-10-29 Thread Alan G Isaac
On 10/29/2008 3:43 PM Robert Kern wrote: The defining characteristic is that x op= y should be equivalent to x = x op y except possibly for *optional* in-place semantics. This gets at a bit of the Language Reference that I've never understood. when possible, the actual operation

Re: [Numpy-discussion] augmented assignment and in-place operations

2008-10-29 Thread Robert Kern
On Wed, Oct 29, 2008 at 22:37, Alan G Isaac [EMAIL PROTECTED] wrote: On 10/29/2008 3:43 PM Robert Kern wrote: The defining characteristic is that x op= y should be equivalent to x = x op y except possibly for *optional* in-place semantics. This gets at a bit of the Language Reference that

[Numpy-discussion] passing a C array to embedded Python from C code

2008-10-29 Thread Chris LeBlanc
Hello, I'm working on seismic processing software called Globe Claritas. The core is written in C and a bit of Fortran. I would like to embed Python in this software, so a user can use Python code to manipulate the seismic data. This would give our users all the power of Python and NumPy and