#13783: Set Partitions, either a bug or something is unclear.
-----------------------------+----------------------------------------------
Reporter: startakovsky | Owner: tbd
Type: PLEASE CHANGE | Status: new
Priority: major | Milestone: sage-5.6
Component: PLEASE CHANGE | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-----------------------------+----------------------------------------------
Consider the following code. The first is an example of not being able to
verify the type Set Partition, the second is an analogous example with
Permutations. Please advise on this discrepancy and how to get around it.
> sage: sp = SetPartitions(5).random_element()
> sage: sp
{{5}, {2, 3}, {1, 4}}
> sage: type(sp)
<class 'sage.sets.set.Set_object_enumerated_with_category'>
> sage: type(sp) == Set_object_enumerated_with_category
----------------------------------------------- NameError
Traceback (most recent call last)
/home/sage-admin/<ipython console> in <module>()
NameError: name 'Set_object_enumerated_with_category' is not
defined
> sage:
> sage:
> sage: p = Permutations(5).random_element()
> sage: p
(1,4,3,5,2)
> sage: type(p)
<class 'sage.combinat.permutation.Permutation_class'>
> sage: type(p) == Permutation_class
True
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13783>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.