Commits (4)
tarball=pynac-VERSION.tar.bz2
sha1=0316751a693fa747f3dc77ea1f3d903d59f0029d
md5=2b15f41f9bdefb6fa6f0eb9c592df1e1
cksum=34120362
sha1=b4e00798f8067a67a15ca538d7437ea4340b7d12
md5=b471271991721a590a9e6b36a0986d5d
cksum=1756995661
diff --git a/ginac/basic.cpp b/ginac/basic.cpp
index 0bb610e..473699f 100644
--- a/ginac/basic.cpp
+++ b/ginac/basic.cpp
@@ -604,10 +605,6 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const
* will already be evaluated. */
ex basic::subs(const exmap & m, unsigned options) const
{
- if (std::all_of(m.cbegin(), m.cend(),
- [](std::pair<ex,ex> p)
- { return not haswild(p.first); } ))
- options |= subs_options::no_pattern;
size_t num = nops();
if (num != 0u) {
diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp
index b8b1569..ff85ced 100644
--- a/ginac/expairseq.cpp
+++ b/ginac/expairseq.cpp
@@ -474,10 +474,6 @@ found: ;
ex expairseq::subs(const exmap & m, unsigned options) const
{
- if (std::all_of(m.cbegin(), m.cend(),
- [](std::pair<ex,ex> p)
- { return not haswild(p.first); } ))
- options |= subs_options::no_pattern;
std::unique_ptr<epvector> vp = subschildren(m, options);
if (vp.get() != nullptr)
return ex_to<basic>(thisexpairseq(std::move(vp), overall_coeff, (options & subs_options::no_index_renaming) == 0));
......@@ -5147,6 +5147,15 @@ cdef class Expression(CommutativeRingElement):
(x, y, t) |--> x^2 + 2*t + cos(x) + sin(y)
sage: f.subs_expr(x^2 + y^2 == t)
(x, y, t) |--> x^2 + y^2 + t + cos(x) + sin(y)
Check that inverses in sums are recognized::
sage: (1 + 1/x).subs({x: 1/x})
x + 1
sage: (x + 1/x^2).subs({x: 1/x})
x^2 + 1/x
sage: (sqrt(x) + 1/sqrt(x)).subs({x: 1/x})
1/sqrt(x) + 1/1/sqrt(x)
"""
cdef dict sdict = {}
cdef GEx res
......