Opened 5 years ago

Closed 6 months ago

#19803 closed defect (fixed)

difference of behavior in polyhedra with different backends

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-9.1
Component: geometry Keywords: empty polyhedron, cdd
Cc: vbraun, jipilab, moritz Merged in:
Authors: Jonathan Kliem Reviewers: Laith Rastanawi
Report Upstream: N/A Work issues:
Branch: 96dad18 (Commits) Commit: 96dad18223aad6e4c446978738aaa2444acc5f2f
Dependencies: Stopgaps:

Description (last modified by gh-kliem)

The following error used to occur:

sage: from sage.geometry.polyhedron.parent import Polyhedra
sage: P_ppl = Polyhedra(ZZ, 3, 'ppl')
sage: P_cdd = Polyhedra(ZZ, 3, 'cdd')
sage: P_ppl([[],[],[]], None)
The empty polyhedron in ZZ^3
sage: P_cdd([[],[],[]], None)
Traceback (most recent call last):
...
TypeError: can't multiply sequence by non-int of type 'NoneType'

Apparently it got fixed along the way and we add doctests verifying it.

Change History (6)

comment:1 Changed 3 years ago by jipilab

This might be related to #17339.

comment:2 Changed 2 years ago by jipilab

This is because the cdd backend does not have an _init_empty_polyhedron method. That should be an easy fix.

The problem in the description is that it tries to get the common length of elements in the v-representation while they are all None. This should be grabbed beforehand and initialize an empty polyhedron like we do in the other cases.

comment:3 Changed 2 years ago by jipilab

  • Cc jipilab moritz added

comment:4 Changed 6 months ago by gh-kliem

  • Authors set to Jonathan Kliem
  • Branch set to public/19803
  • Commit set to 96dad18223aad6e4c446978738aaa2444acc5f2f
  • Description modified (diff)
  • Keywords empty polyhedron cdd added
  • Milestone changed from sage-7.0 to sage-9.1
  • Status changed from new to needs_review

Looks like this got fixed along the way.


New commits:

96dad18add doctests that cdd can handle empty polyhedron now

comment:5 Changed 6 months ago by gh-LaisRast

  • Reviewers set to Laith Rastanawi
  • Status changed from needs_review to positive_review

comment:6 Changed 6 months ago by vbraun

  • Branch changed from public/19803 to 96dad18223aad6e4c446978738aaa2444acc5f2f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.