Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Mod shouldn't require integer assumptions #14901
>>> (binomial(n, k) % y) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "./sympy/core/decorators.py", line 91, in __sympifyit_wrapper return func(a, b) File "./sympy/core/decorators.py", line 132, in binary_op_wrapper return func(self, other) File "./sympy/core/expr.py", line 190, in __mod__ return Mod(self, other) File "./sympy/core/function.py", line 441, in __new__ result = super(Function, cls).__new__(cls, *args, **options) File "./sympy/core/function.py", line 250, in __new__ evaluated = cls.eval(*args) File "./sympy/core/mod.py", line 91, in eval rv = doit(p, q) File "./sympy/core/mod.py", line 56, in doit rv = getattr(p, '_eval_Mod')(q) File "./sympy/functions/combinatorial/factorials.py", 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