need help inverting DerivVar array (Numpy/Scientific Python Q uestion)
PoulsenL at capecon.com
PoulsenL at capecon.com
Wed Jun 6 10:55:38 EDT 2001
Scientific provides a derivable object which can be operated upon. The
problem is that it does not implement an invert method and I was wondering
if there was a workaround.
-----Original Message-----
From: Robin Becker [mailto:robin at jessikat.fsnet.co.uk]
Sent: Wednesday, June 06, 2001 5:21 AM
To: python-list at python.org
Subject: Re: need help inverting DerivVar array (Numpy/Scientific Python
Quest ion)
In article <mailman.991779129.1056.python-list at python.org>,
PoulsenL at capecon.com writes
>
Are you trying to differentiate the inverse of a matrix? What are
DerivVars?
> I am having trouble inverting an array of DerivVar objects. Here is
> the code and error:
>
>
>
> >>> a =
>
Numeric.array([[DerivVar(-2.5,0,1),DerivVar(.45,1,1)],[DerivVar(5.5,2,1),Der
ivVar(-4.5,3,1)]])
>
> >>> Numeric.sum(a)
>
> array([(3.0, [1, 0, 1]) , (-4.0499999999999998, [0, 1, 0, 1])
> ],'O')
>
> >>> Numeric.invert(a)
>
> Traceback (most recent call last):
>
> File "<interactive input>", line 1, in ?
>
> AttributeError: DerivVar instance has no attribute '__invert__'
>
>
>
> Any help would be greatly appreciated.
>
>
>
> Thanks,
>
>
>
> Loren Poulsen
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list