Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mod shouldn't require integer assumptions #14901

asmeurer opened this Issue Jul 12, 2018 · 0 comments


None yet
1 participant
Copy link

asmeurer commented Jul 12, 2018

>>> (binomial(n, k) % y)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./sympy/core/", line 91, in __sympifyit_wrapper
    return func(a, b)
  File "./sympy/core/", line 132, in binary_op_wrapper
    return func(self, other)
  File "./sympy/core/", line 190, in __mod__
    return Mod(self, other)
  File "./sympy/core/", line 441, in __new__
    result = super(Function, cls).__new__(cls, *args, **options)
  File "./sympy/core/", line 250, in __new__
    evaluated = cls.eval(*args)
  File "./sympy/core/", line 91, in eval
    rv = doit(p, q)
  File "./sympy/core/", line 56, in doit
    rv = getattr(p, '_eval_Mod')(q)
  File "./sympy/functions/combinatorial/", line 942, in _eval_Mod
ValueError: Integers expected for binomial Mod

Functions should only fail on assumptions if they are False, not if they are None.

This was added in #14636

CC @sidhantnagpal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.