# [PYTHON MATRIX-SIG] Speed...cg...and more!

**James Hugunin
**
jjh@mama-bear.lcs.mit.edu

*Mon, 13 Nov 95 10:51:04 -0500*

>* 1) The ofunc object is very interesting, but I miss a feature which I always
*>* missed also in the mathmodule.c of the Python distribution. When I want to
*>* use e.g. sin(a) of an not predefined type (the new math functions in
*>* Matrix just extend the standard ones by comples numbers, matrices,..)
*>*
*>* I am working on a "general" math module that provides all the standard
*>* functions for arbitrary objects. It calls functions from math for ints
*>* and floats, functions from cmath for complex numbers, functions from
*>* matrix for matrices, and looks for a method in all other objects.
*>*
*>* Originally I wanted to do that in Python, but that turned out to
*>* detetriorate performance drastically. The C module I am working on now
*>* should have no noticeable overhead.
*
And here I've been working on adding these very same features to my
ofuncobjects. I'm really think that this is the "right" place to do this,
and then to produce a single omathmodule.c that does the right thing
efficiently for all object types. Let's talk off-line about this Konrad so
we don't end up duplicating each others efforts here.
-Jim
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================