Opened 4 years ago

Closed 19 months ago

#19270 closed defect (fixed)

Matrix_integer_sparse object has no attribute 'gap'

Reported by: slabbe Owned by:
Priority: major Milestone: sage-8.3
Component: group theory Keywords:
Cc: Merged in:
Authors: Sébastien Labbé Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 15b13f9 (Commits) Commit: 15b13f97b5a4b7fc38682aac14e64a4514d926c6
Dependencies: Stopgaps:

Description

sage: import itertools
sage: G = [w.matrix() for w in WeylGroup(['B', 3])]
sage: G = MatrixGroup(G)
sage: H = [diagonal_matrix(L) for L in itertools.product((1,-1), repeat=3)]
sage: H = G.subgroup(H)
Traceback (most recent call last):
...
AttributeError: 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse' object has no attribute 'gap'

Change History (4)

comment:1 Changed 4 years ago by tscrim

None of the matrices have a gap method.

The code is assuming that the input are elements of G; so it is bad input. However, to make things more robust and better behaved, I would make this change (the cost of the coercion call should be minimal):

-generators = [ g if isinstance(g, GapElement) else g.gap()
+generators = [ g if isinstance(g, GapElement) else self(g).gap()
                for g in generators ]

comment:2 Changed 20 months ago by slabbe

  • Authors set to Sébastien Labbé
  • Branch set to u/slabbe/19270
  • Commit set to 15b13f97b5a4b7fc38682aac14e64a4514d926c6
  • Status changed from new to needs_review

Sorry for taking so long.


New commits:

15b13f919720: more robust ParentLibGAP.subgroup method

comment:3 Changed 20 months ago by tscrim

  • Milestone changed from sage-6.9 to sage-8.3
  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM. Thanks.

comment:4 Changed 19 months ago by vbraun

  • Branch changed from u/slabbe/19270 to 15b13f97b5a4b7fc38682aac14e64a4514d926c6
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.