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

Partition can't be ordered #9608

Open
aktech opened this Issue Jul 2, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@aktech
Copy link
Member

aktech commented Jul 2, 2015

In [13]: from sympy.combinatorics.partitions import Partition

In [14]: a = Partition([1, 2, 3], [4])

In [15]: b = Partition([1, 2], [3, 4])

In [16]: args = [a, b]

Below is the Traceback:

In [17]: args = list(ordered(args, Set._infimum_key))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-17-092459052e8d> in <module>()
----> 1 args = list(ordered(args, Set._infimum_key))

/home/amit/Desktop/myrepo/sympy/sympy/core/compatibility.pyc in ordered(seq, keys, default, warn)
    676                     raise ValueError(
    677                         'not enough keys to break ties: %s' % u)
--> 678         for v in d[k]:
    679             yield v
    680         d.pop(k)

/home/amit/Desktop/myrepo/sympy/sympy/core/compatibility.pyc in ordered(seq, keys, default, warn)
    676                     raise ValueError(
    677                         'not enough keys to break ties: %s' % u)
--> 678         for v in d[k]:
    679             yield v
    680         d.pop(k)

/home/amit/Desktop/myrepo/sympy/sympy/core/compatibility.pyc in ordered(seq, keys, default, warn)
    657         f = keys.pop(0)
    658         for a in seq:
--> 659             d[f(a)].append(a)
    660     else:
    661         if not default:

TypeError: unhashable type: 'list'

skirpichev added a commit to diofant/diofant that referenced this issue Aug 2, 2015

skirpichev added a commit to diofant/diofant that referenced this issue Oct 2, 2015

skirpichev added a commit to diofant/diofant that referenced this issue Dec 16, 2015

skirpichev added a commit to diofant/diofant that referenced this issue Dec 17, 2015

skirpichev added a commit to diofant/diofant that referenced this issue Jan 19, 2016

skirpichev added a commit to diofant/diofant that referenced this issue Mar 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment