You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python console for SymPy 1.5.1 (Python 2.7.12)
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
>>> from sympy.functions.combinatorial.numbers import nC
>>> from sympy.utilities.iterables import multiset_combinations
>>> nC(3, 2)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/base/data/home/apps/s~sympy-live-hrd/66.426491309333028408/sympy/sympy/functions/combinatorial/numbers.py", line 1715, in nC
return nC(_multiset_histogram(n), k, replacement)
File "/base/data/home/apps/s~sympy-live-hrd/66.426491309333028408/sympy/sympy/functions/combinatorial/numbers.py", line 1435, in _multiset_histogram
n = list(n)
TypeError: 'Integer' object is not iterable
>>> nC('abc', 2)
3
>>> nC('aab', 2)
2
Also the last code block errors too:
>>> sum(nC(4, i) for i in range(5))
Exception in SymPy Live of type
<type 'exceptions.TypeError'>
for reference the last 5 stack trace entries are
Traceback (most recent call last):
File "/base/data/home/apps/s~sympy-live-hrd/66.426491309333028408/app/handlers.py", line 271, in post
live.evaluate(statement, session, printer, stream)
File "/base/data/home/apps/s~sympy-live-hrd/66.426491309333028408/app/shell.py", line 280, in evaluate
exec code in statement_module.__dict__
File "<string>", line 1, in <module>
TypeError: 'NoneType' object is not iterable
The text was updated successfully, but these errors were encountered:
snowch
changed the title
nC example in sympy live shows TypeError: 'Integer' object is not iterable
nC doc example in sympy live shows TypeError: 'Integer' object is not iterable
Nov 15, 2021
The first code block for nC shows an error:
Also the last code block errors too:
The text was updated successfully, but these errors were encountered: