[Numpy-discussion] Speed performance on array constant set

Mark Heslep mark at mitre.org
Mon Jan 23 19:21:08 CST 2006

Travis Oliphant wrote:

>> 1. numdata.h  example that works well for simple Cv structures  
>> containing uniform types:  CvPoint2D32F  => struct { float x, float y 
>> }.  Can I use a record array here, or is there some Numpy overhead 
>> interlaced with fields?
> You can use a record array, but for uniform types I don't know what 
> the advantage is (except for perhaps named-field slicing---which may 
> actually be faster I'm not sure) over a x2 float array.

So that I can step through the array record by record and not field by 

>> 2. numarray.h  Attempt to replace the main Cv Image structures CvMat, 
>> IplImage.  Needs work. Some success but there's segfault or two in 
>> there somewhere.
> These can be ported fairly easily, I think (actually, the old Numeric 
> typemaps would still work --- and work with Numarray), so the basic 
> Numeric C-API still presents itself as the simplest way to support all 
> the array packages.

Well good to know.  Ive been proceeding directly from the NumArray Users 
Manual 1.5 by Greenfield/Miller et al that describes the NA High Level 
API as the fastest of the APIs available to NA.  I thought that NA also 
took steps to insure that unnecessary mem copies were not made, unlike 


More information about the Numpy-discussion mailing list