Here is the error
>>> inverse_laplace_transform(0.5/(.5*s+1)*1/s, s, t)
Traceback (most recent call last):
File "./sympy/polys/polyutils.py", line 211, in
_parallel_dict_from_expr_if_gens
monom[indices[base]] = exp
KeyError: RisingFactorial(_t + 1, 2.0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./sympy/polys/partfrac.py", line 82, in apart
(P, Q), opt = parallel_poly_from_expr((P, Q), x, **options)
File "./sympy/polys/polytools.py", line 4301, in parallel_poly_from_expr
return _parallel_poly_from_expr(exprs, opt)
File "./sympy/polys/polytools.py", line 4354, in _parallel_poly_from_expr
reps, opt = _parallel_dict_from_expr(exprs, opt)
File "./sympy/polys/polyutils.py", line 332, in _parallel_dict_from_expr
reps, gens = _parallel_dict_from_expr_if_gens(exprs, opt)
File "./sympy/polys/polyutils.py", line 217, in
_parallel_dict_from_expr_if_gens
"the set of generators." % factor)
sympy.polys.polyerrors.PolynomialError: RisingFactorial(_t + 1, 2.0)
contains an element of the set of generators.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./sympy/integrals/transforms.py", line 1293, in
inverse_laplace_transform
return InverseLaplaceTransform(F, s, t, plane).doit(**hints)
File "./sympy/integrals/transforms.py", line 121, in doit
self.function_variable, self.transform_variable, **hints)
File "./sympy/integrals/transforms.py", line 1245, in _compute_transform
return _inverse_laplace_transform(F, s, t, self.fundamental_plane, **hints)
File "./sympy/integrals/transforms.py", line 206, in wrapper
res = func(*args, **kwargs)
File "./sympy/integrals/transforms.py", line 1172, in
_inverse_laplace_transform
needeval=True, noconds=False)
File "./sympy/integrals/transforms.py", line 875, in inverse_mellin_transform
return InverseMellinTransform(F, s, x, strip[0], strip[1]).doit(**hints)
File "./sympy/integrals/transforms.py", line 121, in doit
self.function_variable, self.transform_variable, **hints)
File "./sympy/integrals/transforms.py", line 819, in _compute_transform
return _inverse_mellin_transform(F, s, x, strip, **hints)
File "./sympy/integrals/transforms.py", line 206, in wrapper
res = func(*args, **kwargs)
File "./sympy/integrals/transforms.py", line 746, in _inverse_mellin_transform
h = hyperexpand(G)
File "./sympy/simplify/hyperexpand.py", line 2491, in hyperexpand
return f.replace(hyper, do_replace).replace(meijerg, do_meijer)
File "./sympy/core/basic.py", line 1508, in replace
rv = bottom_up(self, rec_replace, atoms=True)
File "./sympy/simplify/simplify.py", line 1152, in bottom_up
rv = F(rv)
File "./sympy/core/basic.py", line 1489, in rec_replace
new = _value(expr, result)
File "./sympy/core/basic.py", line 1437, in <lambda>
_value = lambda expr, result: value(*expr.args)
File "./sympy/simplify/hyperexpand.py", line 2488, in do_meijer
allow_hyper, rewrite=rewrite, place=place)
File "./sympy/simplify/hyperexpand.py", line 2373, in _meijergexpand
t, 1/z0)
File "./sympy/simplify/hyperexpand.py", line 2346, in do_slater
t, premult, au, rewrite=None)
File "./sympy/simplify/hyperexpand.py", line 2042, in _hyperexpand
formula = try_lerchphi(func)
File "./sympy/simplify/hyperexpand.py", line 1783, in try_lerchphi
part = apart(numer/denom, t)
File "./sympy/utilities/decorator.py", line 36, in threaded_func
return func(expr, *args, **kwargs)
File "./sympy/polys/partfrac.py", line 85, in apart
raise PolynomialError(msg)
sympy.polys.polyerrors.PolynomialError: RisingFactorial(_t + 1, 2.0)
contains an element of the set of generators.
It looks like somewhere in the integration algorithm it creates
RisingFactorial(t + 1, 2.0) expecting it to be converted to a
polynomial. But this only works if the second argument is an integer,
not a float
>>> RisingFactorial(t + 1, 2)
(t + 1)*(t + 2)
>>> RisingFactorial(t + 1, 2.0)
RisingFactorial(t + 1, 2.0)
I would suggest opening an issue for this.
Aaron Meurer
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAHVvXxQkmTvjGMWwe40mw3EFrk2eF2%2BY3hjiPpT9Xde8OYJb0A%40mail.gmail.com.