Skip to content

N + Subs + Zeta + Derivative = maximum recursion depth exceeded #11802

@latot

Description

@latot

Hi, here the problem:

>>> x=symbols('x')
>>> p=zeta(x)
>>> p=p.diff(x, 3)
>>> p=p.subs(x, 4)
>>> N(p)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.4/site-packages/sympy/core/evalf.py", line 1481, in N
    return sympify(x).evalf(n, **options)
#The next 2 lines x490 times
  File "/usr/lib64/python3.4/site-packages/sympy/core/function.py", line 561, in _eval_derivative
    l.append(df * da)
  File "/usr/lib64/python3.4/site-packages/sympy/core/decorators.py", line 77, in __sympifyit_wrapper
    return func(a, b)
  File "/usr/lib64/python3.4/site-packages/sympy/core/decorators.py", line 118, in binary_op_wrapper
    return func(self, other)
  File "/usr/lib64/python3.4/site-packages/sympy/core/expr.py", line 141, in __mul__
    return Mul(self, other)
  File "/usr/lib64/python3.4/site-packages/sympy/core/cache.py", line 93, in wrapper
    retval = cfunc(*args, **kwargs)
  File "/usr/lib64/python3.4/functools.py", line 458, in wrapper
    key = make_key(args, kwds, typed)
  File "/usr/lib64/python3.4/functools.py", line 382, in _make_key
    return _HashedSeq(key)
  File "/usr/lib64/python3.4/functools.py", line 351, in __init__
    self.hashvalue = hash(tup)
  File "/usr/lib64/python3.4/site-packages/sympy/core/basic.py", line 110, in __hash__
    h = hash((type(self).__name__,) + self._hashable_content())
RuntimeError: maximum recursion depth exceeded

Thx. Cya.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions