From: Bill B. <wb...@gm...> - 2006-11-01 18:19:26
|
On 11/2/06, A. M. Archibald <per...@gm...> wrote: > > On 01/11/06, Travis Oliphant <oli...@ie...> wrote: > > > And it may be a good idea to also have a get_ctype method or some-such > > on the ctypes attribute so that one could get a "ctypes description" > > from the NumPy data-type. > > It seems to me that at the python level, there's not much reason to > choose the dtypes proposal over ctypes. There is one at the C level, > it seems (though I, like perhaps most of the people on python-dev, > have never actually tried using either). So perhaps, to persuade the > python-dev folks, what is needed is a comparison of what has to be > done at the C level. What would it take to rewrite numpy to use > ctypes? There seems to be some problem with extending the type objects > used by ctypes, but it's not very clear to me what that problem is > (what the extensions are supposed to do). I posted a message to the thread trying to prod things in that direction. I.e. can we see a simple concrete example of the complications involved in using ctypes interface code, vs the presumably much nicer numpy/data-descriptor code. I too think that would help convince people. Just saying it's more compilcated, trust me, doesn't help when most people reading the list have never had to write any sort of C extension. --bb |