Opened 9 years ago

Last modified 8 years ago

#15295 needs_info defect

LinearMatroid.has_line_minor should catch NotImplementedError

Reported by: Stefan Owned by:
Priority: minor Milestone: sage-6.4
Component: matroid theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/Rudi/ticket/15295 (Commits, GitHub, GitLab) Commit: dd3ad7d2943d03db3ad8e1001362704ece1ed77b
Dependencies: Stopgaps:

Status badges

Description

The following code should not throw an error:

sage: R.<x,y> = ZZ['x','y']
sage: Q = R.quotient([x^2 - y + 1, y^3 + 3 * x - 7])
sage: M = LinearMatroid(ring=Q, reduced_matrix=Matrix([[1,0,1],[0,1,1]]))
sage: M.has_line_minor(3)
Traceback (most recent call last):
...
NotImplementedError:

Easy solution: add NotImplementedError? to the except clause in the code.

Change History (6)

comment:1 Changed 9 years ago by Karl-Dieter Crisman

Component: PLEASE CHANGEmatroid theory

comment:2 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:3 Changed 9 years ago by Rudi Pendavingh

Branch: u/Rudi/ticket/15295
Created: Oct 16, 2013, 7:28:49 PMOct 16, 2013, 7:28:49 PM
Modified: Jan 30, 2014, 9:20:52 PMJan 30, 2014, 9:20:52 PM

comment:4 Changed 9 years ago by Rudi Pendavingh

Commit: dd3ad7d2943d03db3ad8e1001362704ece1ed77b
Status: newneeds_info

Added that exception clause. Now the same example raises another NotImplementedError?, but one that gives more information. Essentially, computing ratios in that given ring Q is not possible, which is a problem in LinearMatroid?._line_ratios().

So what is the policy here? Should has_line_minor() test if computing inverses is possible before handing the problem down?


New commits:

dd3ad7dAdded an exception clause to catch a NonImplementedError below LinearMatroid.has_minor()

comment:5 Changed 8 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:6 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4
Note: See TracTickets for help on using tickets.