[Pyrex] Subclassing Numeric arrays

George Sakkis gsakkis at eden.rutgers.edu
Mon May 9 11:46:52 CEST 2005


On Mon, 9 May 2005, Joachim Saul wrote:
> You may want to consider implementing MyVector as *containing* a
> Numeric array rather that deriving it from the latter.

This was my starting point; I extended UserArray, which contains a Numeric
array and delegates all calls to it. Unfortunately this was a bottleneck
for my real-time requirements, so I coded MyVector in Pyrex from scratch
(I need only a small fraction of the whole Numeric functionality).
Although it's almost four time faster now, I have to convert explicitly to
Numeric arrays whenever a real array is expected. This is inelegant apart
from inefficient, so I was hoping to be able to extend Numeric directly.

Thank you both for the replies,
George




More information about the Pyrex mailing list