-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
These error messages are not really informative of what the problem really is:
sage: K = NumberField(x^2-2,'s')
sage: s = K.0
sage: L = NumberField(x^3-2,'t')
sage: t = L.0
sage: P = Polyhedron(vertices = [[0,s],[t,0]])
Traceback (most recent call last):
...
AttributeError: 'Objects_with_category' object has no attribute 'is_exact'
similar problem with floats
:
sage: f = float(1.1)
sage: f
1.1
sage: Polyhedron(vertices=[[f]])
Traceback (most recent call last):
...
AttributeError: type object 'float' has no attribute 'is_exact'
The constructor could try to detect the problem and return an informative message.
Once this is fixed, ticket #22552 is a follow-up ticket that should be fixed easily from the present resolution.
Depends on #23345
CC: @mo271 @mkoeppe @videlec @novoselt @sagetrac-tmonteil @tscrim
Component: geometry
Keywords: polyhedron, base ring
Author: Jean-Philippe Labbé, Vincent Delecroix, Marcelo Forets
Branch/Commit: af03de8
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/22605