Dear All,
I'm trying to integrate a multidimensional Gaussian with sympy. However, 
when I perform the integration, it crashes with an error related to 
polar_lift:

import sympy as sy
from sympy.abc import *

sy.init_printing()
C= sy.MatrixSymbol("C", 3, 3)
r = sy.IndexedBase("r", real = True)
a,b,c = sy.symbols("a,b,c", integer = True)

integ = sy.Integral( sy.exp(-r[a] * C[a,a] * r[a] - 2*r[a] * C[a,b] * r[b] 
- r[b]*C[b,b] * r[b]),
            (r[a], -sy.oo, sy.oo), (r[b], -sy.oo, sy.oo))

integ.doit()

In the last line, the code crashes with the following error


~/anaconda2/lib/python3.7/site-packages/sympy-1.6.dev0-py3.7.egg/sympy/matrices/expressions/matexpr.py
 in name(self)    797     @property    798     def name(self):--> 799         
return self.args[0].name    800     801     def _eval_subs(self, old, new):
AttributeError: 'polar_lift' object has no attribute 'name'


If I replace the indexed variables with normal variables, the integration 
is performed (even if it is superslow, and if I ask for conds="none" it 
assumes it to diverge)

There is a way to perform integrals of multidimensional Gaussians? In 
principle, these kinds of integrals should be tabulated
Thanks for your attention,
Bests,
Lorenzo

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/1ea82042-cd83-4dc0-86fe-c64d8cc1006d%40googlegroups.com.

Reply via email to