Vector class in C anythere?

Marco Bubke bubke at monet.cs.uni-magdeburg.de
Mon May 17 17:59:07 EDT 1999


Hi

Ich need a vector class of the length three (for 3D calculations). The
speed of this class in python is to slow so I have tried to program it
as C extension. But I have two problems. The first one are the types
in C. I can have a scalar or a vector after a multiplication depends
on the input, but I can give in the scruct for the operators only one
funktion. Is there a solution for that. And the second one is that
there are no "right operators" like __radd__ in the C extension? I
haven't found anything to handle that. Is there maybe a good
docmentation with examples to define a new type in C for python?

Thanks

Marco
-- 





More information about the Python-list mailing list