[MATRIX-SIG] umathmodule and exceptions

Perry Stoll pas@xis.xerox.com
Thu, 19 Feb 1998 10:14:38 PST


>> This is clearly a TypeError and I see no reason why an AttributeError is
>> raised when I perform this operation.
>
>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...

Dave, me thinks you answered before trying it yourself...

I agree with Shashank that it should not be an AttributeError:

>>> import umath
>>> c = umath.cos  # note: no error, so it's there
>>> class test:
...     pass
...
>>> c(test)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: cos

BTW, it generalizes to umath.sin. I'm considering testing other functions,
but I think it would be easier to write a large automated test procedure for
an exhaustive study of the subject ;)

>But regardless of that, I'm very suspicious of the API version mismatch,
>which you shouldn't be getting

Definitely. Get this resolved before doing anything else.

-Perry




_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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