%matplotlib inline
from matplotlib import pyplot as plt
from sympy.stats import GammaInverse, density
import numpy as np
f1 = 0.7; f2 = 1-f1
G1 = GammaInverse("G1", 5, 120/(5.5*2.5E-7))
G2 = GammaInverse("G2", 4, 120/(5.5*1.5E-7))
G3 = f1*G1 + f2*G2
D1 = density(G1);
D2 = density(G2);
D3 = density(G3);
v1 = [D1(i).evalf() for i in u]
v2 = [D2(i).evalf() for i in u]
v3 = [D3(i).evalf() for i in u]...which errors at D3 = density(G3). The error includes
PolynomialDivisionFailed: couldn't reduce degree in a polynomial
division algorithm when dividing [231761.370742578/(0.0011381138741823*G2**2 -
0.007587425827882*G2*_z + 0.0126457097131367*_z**2), 0.0]
by [263.770831541635/263.770831541635, 0.0].
This can happen when it's not possible to detect zero in the coefficient domain.
The domain of computation is RR(G2,_t0,_z). Zero detection is guaranteed in this
coefficient domain. This may indicate a bug in SymPy or the domain is user defined
and doesn't implement zero detection properly.(also get this when I take mixture of inverse Gamma with Normal and Uniform distributions)
--
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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/4cb36d1b-6827-4123-8efe-b1462d822e6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAJ8oX-HEDx4fraBRj4HARPaCEJKXKaTP3zjS_dbeqd3WoeAAWA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JUTWn5vz7oih7%2BY18j6jNbvxZD4uEy0L9zTtp4-f3www%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAJ8oX-EUvvPMJhPMb6FqoyuxY9MS2OLGavnHavgH0dQLBaBjpQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6Kb83%2B9nBkPJpCHFEBMxzNHgtPjo%3DKFpsTW6yh3P-hc6w%40mail.gmail.com.