need help inverting DerivVar array (Numpy/Scientific Python Quest ion)

Robin Becker robin at jessikat.fsnet.co.uk
Wed Jun 6 11:20:51 CEST 2001


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),DerivVar(-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



More information about the Python-list mailing list