[Python-Dev] Buffer interface in abstract.c?

David Ascher da@ski.org
Tue, 3 Aug 1999 09:23:31 -0700 (Pacific Daylight Time)


On Tue, 3 Aug 1999, Jack Jansen wrote:

> > > Why not pass the index to the As*Buffer routines as well and make getsegcount
> > > available too? 
> > 
> > Simply because multiple segments hasn't been seen. All objects
> > supporting the buffer interface have a single segment.
> 
> Hmm. And I went out of my way to include this stupid multi-buffer stuff 
> because the NumPy folks said they couldn't live without it (and one of the 
> reasons for the buffer stuff was to allow NumPy arrays, which may be 
> discontiguous, to be written efficiently).
> 
> Can someone confirm that the Numeric stuff indeed doesn't use this?

/usr/LLNLDistribution/Numerical/Include$ grep buffer *.h
/usr/LLNLDistribution/Numerical/Include$

Yes. =) 

See the other thread on low-overhead pickling.

But again, *if* multiarrays supported the buffer interface, they'd have to
use the multi-segment feature (repeating myself).

--david