-
-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Description
Problem Description
sage: PlanePartitions([1,2,3], symmetry="TSSCPP")
currently raises a ValueError: x, y, and z dimensions (1,2,3) must all be equal
.
I think that this is unnecessary, it might be better not to. In this case, the set would simply be empty.
Here is an application: for #36124, I wanted to create the lattice of symmetries of plane partitions. Here is what I ended up doing:
def subsymmetry(A, B):
"""
sage: D = Poset([ls, lambda A, B: A != B and subsymmetry(A, B)])
"""
for n in range(0, 10, 2):
AS = PlanePartitions([n]*3, symmetry=A)
BS = PlanePartitions([n]*3, symmetry=B)
if AS.cardinality() > BS.cardinality():
return False
for n in range(0, 5, 2):
AS = PlanePartitions([n]*3, symmetry=A)
la = AS.list()
BS = PlanePartitions([n]*3, symmetry=B)
lb = BS.list()
if not set(la).issubset(lb):
return False
return True
It would have been nice not to iterate only over even n
, but all triples [a,b,c]
in a Cartesian product, this might also have been a lot faster.
Proposed Solution
Not raise the error.
Alternatives Considered
Keep the current solution. The benefit of raising an error is a clear message to the user. I guess that I could have wrapped the PlanePartitions
calls with try ... except
.
Additional Information
No response
Is there an existing issue for this?
- I have searched the existing issues for a bug report that matches the one I want to file, without success.