[PYTHON MATRIX-SIG] Open Issues (packages, umath, ...)

Jim Hugunin hugunin@mit.edu
Fri, 20 Sep 1996 12:04:41 -0400


> > 1) umath
> > 
> > I've decided to be reasonable on this issue (well, I guess I just got
> > intimidated by all the knowledgable people who disagreed with me). 
Here's
> > my current proposal:
> > 
> > Numeric will do "import umath".  Note: it will not do "from umath
import
> > *".
> > 
> > This means that the safe version of the math functions will be used by
> > default.  On the other hand, you won't be able to type:
Numeric.log(1.0)
> > anymore, this will now look like Numeric.umath.log(1.0) [or any other
way
> > you care to import this module into your namespace].
> > 
> > If you want to change the functions used internally by Numeric, you can
> > just do Numeric.umath = fast_umath (I hope this actually works...).
> > 
> > I think this scheme makes sense and should make most everybody happy.
> 
> Ugh.  It seems cumbersome in 95% of cases -- in other words, a given
> user is likely to want either umath or fast_umath most of the time.
> Having to type .umath every time seems user-unfriendly.

The way I envision this being used (and this is partially contingenent on
package choices in the future, is as follows:

import Numeric
import fast_umath
umath = fast_umath

umath.log(1.0)

ie. the math functions are moved to their own name-space and the access
through Numeric is not used in general.

Does this seem less cumbersome?

-Jim

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================