Opened 6 years ago
Closed 6 years ago
#17576 closed enhancement (fixed)
FreeModule.__contains__ is too lax in its test
Reported by: | nbruin | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | sage-6.5 |
Component: | linear algebra | Keywords: | |
Cc: | kcrisman | Merged in: | |
Authors: | Peter Bruin | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | 176e773 (Commits) | Commit: | 176e773ba68d3e56b91fb51c5ff20add97db5eaf |
Dependencies: | #10513 | Stopgaps: |
Description (last modified by )
See https://groups.google.com/forum/#!topic/sage-support/ObKhoCN3KCs:
sage: V = VectorSpace(RDF,3) sage: v2 = vector(RDF, [1, 2, 3, 4]) sage: v2 in V True
The containment test for free modules sage.modules.free_module.FreeModule_ambient.__contains__
doesn't bother testing that the *number* of entries matches the rank.
This is fixed by #10513; we just add a doctest.
Change History (5)
comment:1 Changed 6 years ago by
- Cc kcrisman added
comment:2 Changed 6 years ago by
- Work issues set to add doctest
comment:3 Changed 6 years ago by
- Branch set to u/pbruin/17576-FreeModule_contains
- Commit set to 176e773ba68d3e56b91fb51c5ff20add97db5eaf
- Dependencies set to #10513
- Description modified (diff)
- Priority changed from major to trivial
- Status changed from new to needs_review
- Type changed from defect to task
- Work issues add doctest deleted
comment:4 Changed 6 years ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
- Type changed from task to enhancement
LGTM.
comment:5 Changed 6 years ago by
- Branch changed from u/pbruin/17576-FreeModule_contains to 176e773ba68d3e56b91fb51c5ff20add97db5eaf
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
This should be solved by #10513 (which eliminates the custom
__contains__()
method).