Opened 8 years ago
Closed 8 years ago
#13783 closed defect (duplicate)
Set Partitions, either a bug or something is unclear.
Reported by: | startakovsky | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | combinatorics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | Ben Salisbury | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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: 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
Change History (4)
comment:1 Changed 8 years ago by
- Component changed from PLEASE CHANGE to combinatorics
- Description modified (diff)
- Milestone changed from sage-5.9 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 8 years ago by
(cc me)
comment:3 Changed 8 years ago by
- Reviewers set to Ben Salisbury
- Status changed from needs_review to positive_review
comment:4 Changed 8 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
This is taken care of by #14140:
There were two problems:
Set_object_enumerated
class (which is a subclass ofParent
) is changed by the category framework into thewith_category
class which doesn't exist as code. There's also the fact that permutations are not yet in the category framework.Hope that clarifies some things.