Re: [Numpy-discussion] Latest Array-Interface PEP

2007-02-08 Thread Michael McLay
On Thursday 04 January 2007 19:36, Travis Oliphant wrote: > Christopher Barker wrote: > > eople like: > > > > wxPython -- Robin Dunn > > PIL -- Fredrik Lundh > > PyOpenGL -- Who? > > PyObjC -- would it be useful there? (Ronald Oussoren) > > MatplotLib (but maybe it's already married to numpy..

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Torgil Svensson
On 1/12/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > > On 1/12/07, Torgil Svensson <[EMAIL PROTECTED]> wrote: > > On 1/12/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > [CHOP] > > > > > the core. I'm sure it's less efficient, but you shouldn't need to parse > the > > > data structure in

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Travis Oliphant
> > I'm concerned about the direction that this PEP seems to be going. The > original proposal was borderline too complicated IMO, and now it seems > headed in the direction of more complexity. Well at least people are talking about what they would like to see. But, I think we should reign i

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Travis Oliphant
Christopher Barker wrote: >Gael Varoquaux wrote: > > >>Yes, indeed. I was just wondering if the PEP could be used for a >>performant implementation of trees. >> >> > >That would be a whole new PEP, and one we're not the least bit ready for. > > > >>Basicaly that is mapping a tree to an >>a

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Christopher Barker
Gael Varoquaux wrote: > Yes, indeed. I was just wondering if the PEP could be used for a > performant implementation of trees. That would be a whole new PEP, and one we're not the least bit ready for. > Basicaly that is mapping a tree to an > array, which is possible. Possible, but probably not

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Timothy Hochberg
On 1/12/07, Torgil Svensson <[EMAIL PROTECTED]> wrote: On 1/12/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: [CHOP] > the core. I'm sure it's less efficient, but you shouldn't need to parse the > data structure information very often. I believe that'll be more common than you think; for exam

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Torgil Svensson
On 1/12/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > Things that act like arrays, but have different storage methods. This > details of this still seem pretty vague, but to the extent that I can figure > them out, it doesn't seem useful or necessary to tie this into the rest of > the array in

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Torgil Svensson
On 1/12/07, Neal Becker <[EMAIL PROTECTED]> wrote: > How about: > > 1. A memory concept, of which buffer is an example. > 2. A view concept. > 3. A variety of common concrete types composing 1+2. Is there any difference between a view and an array that shares memory with another array? For acces

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Torgil Svensson
On 1/12/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > This is true. So at what level do we propose the API. Single-item > access for sure, but what about > > array_interface->get_block_from_slice() ? > > Such a thing would be very useful for all kinds of large data-sets, from > images, and v

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Timothy Hochberg
On 1/12/07, Travis Oliphant <[EMAIL PROTECTED] > wrote: Neal Becker wrote: > I believe we are converging, and this is pretty much the same design as I > advocated. It is similar to boost::ublas. > I'm grateful to hear that. It is nice when ideas come from several different corners. > Storage

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Charles R Harris
On 1/12/07, Neal Becker <[EMAIL PROTECTED]> wrote: I believe we are converging, and this is pretty much the same design as I advocated. It is similar to boost::ublas. Ah, *that* Neal Becker. Chuck ___ Numpy-discussion mailing list Numpy-discussion

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Neal Becker
Travis Oliphant wrote: > Neal Becker wrote: >> I believe we are converging, and this is pretty much the same design as I >> advocated. It is similar to boost::ublas. >> > I'm grateful to hear that. It is nice when ideas come from several > different corners. >> Storage is one concept. >> >>

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Travis Oliphant
Neal Becker wrote: > I believe we are converging, and this is pretty much the same design as I > advocated. It is similar to boost::ublas. > I'm grateful to hear that. It is nice when ideas come from several different corners. > Storage is one concept. > > Interpretation of the storage is an

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-12 Thread Neal Becker
I believe we are converging, and this is pretty much the same design as I advocated. It is similar to boost::ublas. Storage is one concept. Interpretation of the storage is another concept. Numpy is a combination of a storage and interpretation. Storage could be dense or sparse. Allocated in

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Gael Varoquaux
On Fri, Jan 12, 2007 at 12:44:15AM -0700, Charles R Harris wrote: >Trees are nice, but they are not efficient for array type data. Traversing >a tree usually requires some sort of stack (recursion), and a tree is not >well structured for addressing data using indices. They just aren't >

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Charles R Harris
On 1/12/07, Gael Varoquaux <[EMAIL PROTECTED]> wrote: Talking about the difference between the memory access model and the array API, maybe I am talking bullshit (I know next to nothing in these problems) but couldn' an efficient tree data structure be implemented on the memory buffer object ? I

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Gael Varoquaux
Talking about the difference between the memory access model and the array API, maybe I am talking bullshit (I know next to nothing in these problems) but couldn' an efficient tree data structure be implemented on the memory buffer object ? I am pretty sure a simple tree read-only could, as for a t

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Travis Oliphant
Torgil Svensson wrote: > On 1/11/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > >> On 1/11/07, Torgil Svensson <[EMAIL PROTECTED]> wrote: >> >>> Sure. I'm not objecting the memory model, what I mean is that data >>> access between modules has a wider scope than just a memory model. >>> M

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Torgil Svensson
On 1/11/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > On 1/11/07, Torgil Svensson <[EMAIL PROTECTED]> wrote: > > Sure. I'm not objecting the memory model, what I mean is that data > > access between modules has a wider scope than just a memory model. > > Maybe i'm completely out-of-scope here,

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Charles R Harris
On 1/11/07, Torgil Svensson <[EMAIL PROTECTED]> wrote: On 1/11/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Torgil Svensson wrote: >> Example1: We have a very large amount of data with a compressed >> internal representation >> >> Example2: We might want to generate data "on the fly" as it's

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Torgil Svensson
On 1/11/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Torgil Svensson wrote: >> Example1: We have a very large amount of data with a compressed >> internal representation >> >> Example2: We might want to generate data "on the fly" as it's needed >> >> Example3: If module creators to deal with di

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-11 Thread Travis Oliphant
Torgil Svensson wrote: > On 1/4/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > >> still be used to describe a complicated block of memory to another user. >> > > Thinking of the scope "seamless data exchange between modules" my > concern with this PEP is that is might be too much focused

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-10 Thread Torgil Svensson
On 1/4/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > still be used to describe a complicated block of memory to another user. Thinking of the scope "seamless data exchange between modules" my concern with this PEP is that is might be too much focused on "block of memory" rather than "access t

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-09 Thread Perry Greenfield
A few comments regarding what I think justifies some sort of standard to be part of Python (understanding that there are various ways that it could be done, so I'm not commenting on the specifics here directly). I don't there is any harm in making the standard numpy-centric. In fact, I think

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-09 Thread Timothy Hochberg
On 1/9/07, Christopher Barker <[EMAIL PROTECTED]> wrote: Timothy Hochberg wrote: > The reason that I ask is that the two projects that I use regularly are > wxPython and PIL generally operate on relatively large data chunks and > it's not clear that they would see much benefit over this mechanis

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-08 Thread Christopher Barker
Timothy Hochberg wrote: > The reason that I ask is that the two projects that I use regularly are > wxPython and PIL generally operate on relatively large data chunks and > it's not clear that they would see much benefit over this mechanism > versus the array protocol. But is this mechanism any

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-08 Thread Travis Oliphant
Timothy Hochberg wrote: > > > On 1/6/07, *Travis Oliphant* <[EMAIL PROTECTED] > > wrote: > > Tim Hochberg wrote: > > Christopher Barker wrote: > > > > [SNIP] > > > >> I think the PEP has far more chances of success if it's seen as a > >> reques

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-08 Thread Timothy Hochberg
On 1/6/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: Tim Hochberg wrote: > Christopher Barker wrote: > > [SNIP] > >> I think the PEP has far more chances of success if it's seen as a >> request from a variety of package developers, not just the numpy crowd >> (which, after all, already has nump

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-06 Thread Travis Oliphant
Tim Hochberg wrote: > Christopher Barker wrote: > > [SNIP] > >> I think the PEP has far more chances of success if it's seen as a >> request from a variety of package developers, not just the numpy crowd >> (which, after all, already has numpy >> > This seems eminently sensible. Getting a

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Tim Hochberg
Christopher Barker wrote: [SNIP] > I think the PEP has far more chances of success if it's seen as a > request from a variety of package developers, not just the numpy crowd > (which, after all, already has numpy This seems eminently sensible. Getting a few developers from other projects on boa

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Christopher Barker
Travis Oliphant wrote: > Christopher Barker wrote: >> wxPython -- Robin Dunn >> PIL -- Fredrik Lundh >> PyOpenGL -- Who? >> PyObjC -- would it be useful there? (Ronald Oussoren) >> MatplotLib (but maybe it's already married to numpy...) >> PyGtk ? > It's a good start, but their is also > > P

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Robert Kern
Neal Becker wrote: > I'm thinking that a buffer is just an interface to memory, and that the > interpretation as an array of n-dimensions, for example, is best left to > the application. I might want to at one time view the data as > n-dimensional, but at another time as 1-dimensional, for exampl

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Charles R Harris
On 1/5/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: Charles R Harris wrote: > > > On 1/5/07, *Stefan van der Walt* <[EMAIL PROTECTED] > > wrote: > > On Fri, Jan 05, 2007 at 09:38:49AM -0500, Neal Becker wrote: > > Several extensions to Python utilize the

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Travis Oliphant
Charles R Harris wrote: > > > On 1/5/07, *Stefan van der Walt* <[EMAIL PROTECTED] > > wrote: > > On Fri, Jan 05, 2007 at 09:38:49AM -0500, Neal Becker wrote: > > Several extensions to Python utilize the buffer protocol to > share > > the location

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Travis Oliphant
Neal Becker wrote: >Several extensions to Python utilize the buffer protocol to share >the location of a data-buffer that is really an N-dimensional >array. However, there is no standard way to exchange the >additional N-dimensional array information so that the data-buffer >i

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Charles R Harris
On 1/5/07, Stefan van der Walt <[EMAIL PROTECTED]> wrote: On Fri, Jan 05, 2007 at 09:38:49AM -0500, Neal Becker wrote: > Several extensions to Python utilize the buffer protocol to share > the location of a data-buffer that is really an N-dimensional > array. However, there is no st

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Stefan van der Walt
On Fri, Jan 05, 2007 at 09:38:49AM -0500, Neal Becker wrote: > Several extensions to Python utilize the buffer protocol to share > the location of a data-buffer that is really an N-dimensional > array. However, there is no standard way to exchange the > additional N-dimensional arr

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Neal Becker
Travis Oliphant wrote: > Neal Becker wrote: >> Travis Oliphant wrote: >> >> >>> I'm attaching my latest extended buffer-protocol PEP that is trying to >>> get the array interface into Python. Basically, it is a translation of >>> the numpy header files into something as simple as possible that

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Matthew Brett
Hi, > > wxPython -- Robin Dunn > > PIL -- Fredrik Lundh > > PyOpenGL -- Who? > > PyObjC -- would it be useful there? (Ronald Oussoren) > > MatplotLib (but maybe it's already married to numpy...) > > PyGtk ? > > > > It's a good start, but their is also > > PyMedia, PyVoxel, any video-library i

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Travis Oliphant
Neal Becker wrote: > Travis Oliphant wrote: > > >> I'm attaching my latest extended buffer-protocol PEP that is trying to >> get the array interface into Python. Basically, it is a translation of >> the numpy header files into something as simple as possible that can >> still be used to describ

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Neal Becker
Travis Oliphant wrote: > > I'm attaching my latest extended buffer-protocol PEP that is trying to > get the array interface into Python. Basically, it is a translation of > the numpy header files into something as simple as possible that can > still be used to describe a complicated block of mem

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-05 Thread Francesc Altet
A Divendres 05 Gener 2007 01:36, Travis Oliphant escrigué: > Christopher Barker wrote: > > eople like: > > > > wxPython -- Robin Dunn > > PIL -- Fredrik Lundh > > PyOpenGL -- Who? > > PyObjC -- would it be useful there? (Ronald Oussoren) > > MatplotLib (but maybe it's already married to numpy.

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Travis Oliphant
Christopher Barker wrote: > eople like: > > wxPython -- Robin Dunn > PIL -- Fredrik Lundh > PyOpenGL -- Who? > PyObjC -- would it be useful there? (Ronald Oussoren) > MatplotLib (but maybe it's already married to numpy...) > PyGtk ? > It's a good start, but their is also PyMedia, PyVoxel,

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Christopher Barker
Travis Oliphant wrote: > Guido is the one who > encouraged me at SciPy 2006 to push this and so I think he is generally > favorable to the idea. good sign. > The Python devs will definitely push back. The > strongest opposition seems to be from people that don't 'get' it and so > don't want

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Travis Oliphant
>> PyArrayView_FromObject(obj) >> > > yes, that's what I'm looking for -- please do add that to the C-API > > >>> By the way,, how compatible is this with the existing buffer protocol? >>> >>> >> It's basically orthogonal. In other-words, if you defined the array >> view protoc

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Travis Oliphant
Colin J. Williams wrote: > Travis Oliphant wrote: > >> I'm attaching my latest extended buffer-protocol PEP that is trying to >> get the array interface into Python. Basically, it is a translation of >> the numpy header files into something as simple as possible that can >> still be used to

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Christopher Barker
Travis Oliphant wrote: >> bf_getarrayview (obj) >> > Yes you could call this (but you would call it from the type object like > this > > obj->ob_type->tp_as_buffer->bf_getarrayview(obj) > > Or more likely (and I should add this to the C-API) you would call. > > PyArrayView_FromObject(obj) y

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Colin J. Williams
Travis Oliphant wrote: > > I'm attaching my latest extended buffer-protocol PEP that is trying to > get the array interface into Python. Basically, it is a translation of > the numpy header files into something as simple as possible that can > still be used to describe a complicated block of m

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Travis Oliphant
Christopher Barker wrote: > Travis, > > First, thanks for doing this -- Python really needs it! > > While this approach > >> works, it requires attribute lookups which can be expensive when >> sharing many small arrays. >> > > Ah, I do like reducing that overhead -- I know I use

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Christopher Barker
Travis, First, thanks for doing this -- Python really needs it! > While this approach > works, it requires attribute lookups which can be expensive when > sharing many small arrays. Ah, I do like reducing that overhead -- I know I use arrays a lot for small data sets too, so that ove

[Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Travis Oliphant
I'm attaching my latest extended buffer-protocol PEP that is trying to get the array interface into Python. Basically, it is a translation of the numpy header files into something as simple as possible that can still be used to describe a complicated block of memory to another user. My purpos

[Numpy-discussion] Latest Array-Interface PEP

2007-01-04 Thread Travis Oliphant
I'm attaching my latest extended buffer-protocol PEP that is trying to get the array interface into Python. Basically, it is a translation of the numpy header files into something as simple as possible that can still be used to describe a complicated block of memory to another user. My purp