Opened 8 years ago
Closed 5 years ago
#14224 closed defect (fixed)
`cartesian_product` AssertionError
Reported by: | eviatarbach | Owned by: | sage-combinat |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | combinatorics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | Frédéric Chapoton, Vincent Delecroix | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
As of now, passing a list, tuple, or set to cartesian_product
returns an AssertionError?.
sage: cartesian_product([[0,1]]) AssertionError: sage: cartesian_product([FiniteEnumeratedSet([0,1])]) The cartesian product of ({0, 1},)
I understand that this function can construct Cartesian products on different categories, so I see why it requires specific types. However, the error message should be more descriptive, especially considering that cartesian_product_iterator([[0,1]])
, CartesianProduct([0,1])
, and permutations([[0,1]])
all work.
Change History (7)
comment:1 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:2 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:3 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:4 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:5 Changed 5 years ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
comment:6 Changed 5 years ago by
- Reviewers set to Frédéric Chapoton, Vincent Delecroix
- Status changed from needs_review to positive_review
ok, I agree
comment:7 Changed 5 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Hello,
I propose to close this one as duplicate since with #18411 tuple/list input are automatically converted into
FiniteEnumeratedSet
and set/frozenset converted toSet
Vincent