[MATRIX-SIG] umathmodule and exceptions

Shashank Mallick mallick@hks.com
Thu, 19 Feb 1998 12:48:09 -0500


Hi David,


>
> Hi Shashank (remember me?).
>

Sure do !

> I'm not so sure it's a TypeError -- what it looks like to me is that
> there's something wrong with your umath configuration.  The AttributeError
> is saying that there is no 'cos' attribute in the umath module.  Do a
> dir(umath) and see what comes back...
>

I'm pretty sure that cos is an attribute of the umath module:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$python
import umaPython 1.5 (#5, Feb 11 1998, 17:58:28) [C] on irix6
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import umath
WARNING: Python C API version mismatch for module umath:
  This Python has API version 1007, module umath has version 1006.
>>> umath.cos(umath.pi)
-1.0
>>> dir(umath)
['__doc__', '__file__', '__name__', '__version__', 'absolute', 'add', 'arccos',
'arcsin', 'arctan', 'arctan2', 'boolean_and', 'boolean_or', 'boolean_xor',
'ceil', 'conjugate', 'cos', 'cosh', 'divide', 'divide_safe', 'e', 'equal',
'exp', 'fabs', 'floor', 'fmod', 'greater', 'greater_equal', 'hypot', 'invert',
'left_shift', 'less', 'less_equal', 'log', 'log10', 'logical_and',
'logical_not', 'logical_or', 'logical_xor', 'maximum', 'minimum', 'multiply',
'negative', 'not_equal', 'pi', 'power', 'remainder', 'right_shift', 'sin',
'sinh', 'sqrt', 'subtract', 'tan', 'tanh']
>>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


> But regardless of that, I'm very suspicious of the API version mismatch,
> which you shouldn't be getting.  Sounds to me like a recompile is needed.
>

Let me try the recompile and see what happens.

Thanks a lot,
Shashank


-- 
  Shashank
    Hibbitt, Karlsson & Sorensen, Inc.        e-mail : mallick@hks.com
    1080 Main Street                          tel    :  (401) 727 4200
    Pawtucket, RI 02860                       fax    :  (401) 727 4208



_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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