#21100: division error in normalize_coordinates
-------------------------------------+-------------------------------------
Reporter: bhutz | Owner:
Type: defect | Status: needs_work
Priority: minor | Milestone: sage-7.3
Component: algebraic | Resolution:
geometry |
Keywords: | Merged in:
Authors: Ben Hutz | Reviewers: Vincent Delecroix
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/bhutz/division_error_in_normalize_coordinates|
4f9a38ce1c4871cee3c34caf012842356c09bf60
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_work
* reviewer: => Vincent Delecroix
Comment:
I would prefer
{{{
def normalize_coordinates(self, method=None):
if method is None:
# document why it is done this way
try:
self.normalize_coordinates(method='singular')
except (TypeError, NotImplementedError):
self.normalize_coordinates(method='maxima')
elif method == 'singular':
# do singular way
elif method == 'maxima':
# do maxima way
else:
raise ValueError("method={} not available".format(method))
}}}
This way you could have doctests for:
- the singular failure reported in this doctest
- comparison between maxima and singular versions
By the way, why do you catch both `TypeError` and `NotImplementedError`?
Does it work on last versions of singular?
--
Ticket URL: <https://trac.sagemath.org/ticket/21100#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.