Changes between Version 4 and Version 5 of Ticket #30328


Ignore:
Timestamp:
08/10/20 14:34:03 (14 months ago)
Author:
gh-kliem
Comment:

New commits:

1f00faafix lawrence extension with base extension; add test method for lawrence construction
8e8158cfix missing conversion to RDF
319c172check lawrence construction with new vertex in RDF

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30328

    • Property Status changed from new to needs_review
    • Property Authors changed from to Jonathan Kliem
    • Property Branch changed from to public/30328
    • Property Commit changed from to 319c172084163f0dce96d90a1762878d7c3a741e
  • Ticket #30328 – Description

    v4 v5  
    33sage: P1 = polytopes.regular_polygon(5, exact=False)
    44sage: P*P1
    5 ---------------------------------------------------------------------------
    6 KeyError                                  Traceback (most recent call last)
    7 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:9946)()
    8    1195         try:
    9 -> 1196             action = self._action_maps.get(xp, yp, op)
    10    1197         except KeyError:
    11 
    12 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/coerce_dict.pyx in sage.structure.coerce_dict.TripleDict.get (build/cythonized/sage/structure/coerce_dict.c:7917)()
    13    1327         if not valid(cursor.key_id1):
    14 -> 1328             raise KeyError((k1, k2, k3))
    15    1329         value = <object>cursor.value
    16 
    17 KeyError: (Polyhedra in AA^2, Polyhedra in RDF^2, <built-in function mul>)
    18 
    19 During handling of the above exception, another exception occurred:
    20 
    21 ValueError                                Traceback (most recent call last)
    22 <ipython-input-4-69ee963b1fc0> in <module>()
    23 ----> 1 P*P1
    24 
    25 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__mul__ (build/cythonized/sage/structure/element.c:12029)()
    26    1515             return (<Element>left)._mul_(right)
    27    1516         if BOTH_ARE_ELEMENT(cl):
    28 -> 1517             return coercion_model.bin_op(left, right, mul)
    29    1518
    30    1519         cdef long value
    31 
    32 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:9996)()
    33    1196             action = self._action_maps.get(xp, yp, op)
    34    1197         except KeyError:
    35 -> 1198             action = self.get_action(xp, yp, op, x, y)
    36    1199         if action is not None:
    37    1200             if (<Action>action)._is_left:
    38 
    39 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.get_action (build/cythonized/sage/structure/coerce.c:16783)()
    40    1724         except KeyError:
    41    1725             pass
    42 -> 1726         action = self.discover_action(R, S, op, r, s)
    43    1727         action = self.verify_action(action, R, S, op)
    44    1728         self._action_maps.set(R, S, op, action)
    45 
    46 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.discover_action (build/cythonized/sage/structure/coerce.c:18201)()
    47    1855         """
    48    1856         if isinstance(R, Parent):
    49 -> 1857             action = (<Parent>R).get_action(S, op, True, r, s)
    50    1858             if action is not None:
    51    1859                 return action
    52 
    53 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.get_action (build/cythonized/sage/structure/parent.c:19745)()
    54    2457         action = self._get_action_(S, op, self_on_left)
    55    2458         if action is None:
    56 -> 2459             action = self.discover_action(S, op, self_on_left, self_el, S_el)
    57    2460
    58    2461         if action is not None:
    59 
    60 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/parent.pyx in sage.structure.parent.Parent.discover_action (build/cythonized/sage/structure/parent.c:20722)()
    61    2536                 # detect actions defined by _rmul_, _lmul_, _act_on_, and _acted_upon_ methods
    62    2537                 from .coerce_actions import detect_element_action
    63 -> 2538                 action = detect_element_action(self, S, self_on_left, self_el, S_el)
    64    2539                 if action is not None:
    65    2540                     return action
    66 
    67 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/coerce_actions.pyx in sage.structure.coerce_actions.detect_element_action (build/cythonized/sage/structure/coerce_actions.c:5360)()
    68     229     if isinstance(Y, Parent):
    69     230         try:
    70 --> 231             if x._acted_upon_(y, X_on_left) is not None:
    71     232                 return ActedUponAction(Y, X, not X_on_left, False)
    72     233         except CoercionException:
    73 
    74 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element._acted_upon_ (build/cythonized/sage/structure/element.c:8604)()
    75     925         return None
    76     926
    77 --> 927     cpdef _acted_upon_(self, x, bint self_on_left):
    78     928         """
    79     929         Use this method to implement ``self`` acted on by x.
    80 
    81 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/geometry/polyhedron/base.py in _acted_upon_(self, actor, self_on_left)
    82    4299         """
    83    4300         if is_Polyhedron(actor):
    84 -> 4301             return self.product(actor)
    85    4302         if is_Vector(actor):
    86    4303             return self.translation(actor)
    87 
    88 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/geometry/polyhedron/base.py in product(self, other)
    89    3993
    90    3994         parent = self.parent().change_ring(new_ring, ambient_dim=self.ambient_dim() + other.ambient_dim())
    91 -> 3995         return parent.element_class(parent, [new_vertices, new_rays, new_lines], None)
    92    3996
    93    3997     _mul_ = product
    94 
    95 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/geometry/polyhedron/backend_cdd.py in __init__(self, parent, Vrep, Hrep, **kwds)
    96     459             sage: TestSuite(p).run()
    97     460         """
    98 --> 461         Polyhedron_cdd.__init__(self, parent, Vrep, Hrep, **kwds)
    99 
    100 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/geometry/polyhedron/base.py in __init__(self, parent, Vrep, Hrep, **kwds)
    101     120             vertices, rays, lines = Vrep
    102     121             if vertices or rays or lines:
    103 --> 122                 self._init_from_Vrepresentation(vertices, rays, lines, **kwds)
    104     123             else:
    105     124                 self._init_empty_polyhedron()
    106 
    107 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/geometry/polyhedron/backend_cdd.py in _init_from_Vrepresentation(self, vertices, rays, lines, verbose)
    108      61         from .cdd_file_format import cdd_Vrepresentation
    109      62         s = cdd_Vrepresentation(self._cdd_type, vertices, rays, lines)
    110 ---> 63         s = self._run_cdd(s, '--redcheck', verbose=verbose)
    111      64         s = self._run_cdd(s, '--repall', verbose=verbose)
    112      65         self._init_from_cdd_output(s)
    113 
    114 /srv/public/shared/sage-9.0/local/lib/python3.7/site-packages/sage/geometry/polyhedron/backend_cdd.py in _run_cdd(self, cdd_input_string, cmdline_arg, verbose)
    115     163         if 'Error:' in ans + err:
    116     164             # cdd reports errors on stdout and misc information on stderr
    117 --> 165             raise ValueError(ans.strip())
    118     166         return ans
    119     167
    120 
     5...
    1216ValueError: *Input Error: Input format is not correct.
    1227*Format:
     
    12611 end
    12712}}}
     13
     14We fix this, by converting the values to reals, before passing them to `cdd`.
     15
     16We enable a doctest prepared by #30293, which implicitly checks that this is fixed.
     17
     18The above failure will be implicitly added by #29934.