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

SetPartition breaks with unsortable input #26948

Closed
jdemeyer opened this issue Dec 23, 2018 · 1 comment
Closed

SetPartition breaks with unsortable input #26948

jdemeyer opened this issue Dec 23, 2018 · 1 comment

Comments

@jdemeyer
Copy link

With #22029:

**********************************************************************
File "src/sage/combinat/set_partition.py", line 701, in sage.combinat.set_partition.SetPartition._latex_
Failed example:
    p = SetPartition([['a','c'],['b',1],[20]])
Exception raised:
    Traceback (most recent call last):
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1086, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.combinat.set_partition.SetPartition._latex_[4]>", line 1, in <module>
        p = SetPartition([['a','c'],['b',Integer(1)],[Integer(20)]])
      File "sage/misc/classcall_metaclass.pyx", line 330, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1701)
        return cls.classcall(cls, *args, **kwds)
      File "/opt/sage/local/lib/python2.7/site-packages/sage/combinat/set_partition.py", line 537, in __classcall_private__
        return P.element_class(P, parts, check=check)
      File "sage/misc/classcall_metaclass.pyx", line 333, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1726)
        return (<PyTypeObject*>type).tp_call(cls, args, kwds)
      File "/opt/sage/local/lib/python2.7/site-packages/sage/combinat/set_partition.py", line 556, in __init__
        ClonableArray.__init__(self, parent, sorted(map(frozenset, s), key=min), check=check)
      File "sage/rings/integer.pyx", line 952, in sage.rings.integer.Integer.__richcmp__ (build/cythonized/sage/rings/integer.c:7787)
        return coercion_model.richcmp(left, right, op)
      File "sage/structure/coerce.pyx", line 1992, in sage.structure.coerce.CoercionModel_cache_maps.richcmp (build/cythonized/sage/structure/coerce.c:20111)
        raise bin_op_exception('>', x, y)
    TypeError: unsupported operand parent(s) for >: 'Integer Ring' and '<type 'str'>'
**********************************************************************

Component: combinatorics

Issue created by migration from https://trac.sagemath.org/ticket/26948

@jdemeyer jdemeyer added this to the sage-8.6 milestone Dec 23, 2018
@mantepse
Copy link
Collaborator

comment:1

this is essentially a duplicate of #26917

@jdemeyer jdemeyer removed this from the sage-8.6 milestone Dec 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants