Vector class in C anythere?

Gordon McMillan gmcm at hypernet.com
Mon May 17 22:44:44 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?

You might check out:

http://x39.deja.com/[ST_rn=ps]/getdoc.xp?AN=446493793&CONTEXT=92699090
7.2010447882&hitnum=1



- Gordon




More information about the Python-list mailing list