-
-
Notifications
You must be signed in to change notification settings - Fork 680
Closed
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.
Component: combinatorics
Reviewer: Frédéric Chapoton, Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/14224