Opened 2 years ago

Closed 2 years ago

#30287 closed enhancement (fixed)

sage.tensor.modules.free_module_basis: Add testsuite

Reported by: Matthias Köppe Owned by:
Priority: minor Milestone: sage-9.2
Component: linear algebra Keywords:
Cc: Michael Jung, Eric Gourgoulhon, Travis Scrimshaw Merged in:
Authors: Matthias Koeppe Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: f1f67d3 (Commits, GitHub, GitLab) Commit: f1f67d3ddf2639d20ea4d8cd7bac4bd59e90a155
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

We add a _test... method to Basis_abstract and run the test suite for some instances of FreeModuleBasis, FreeModuleCoBasis.

Change History (9)

comment:1 Changed 2 years ago by Matthias Köppe

Branch: u/mkoeppe/sage_tensor_modules_free_module_basis__add_testsuite

comment:2 Changed 2 years ago by Matthias Köppe

Commit: 1e69c0eba014ac4d5a1e5ecd664f1bf953242507

The tests currently fail:

File "src/sage/tensor/modules/", line 388, in sage.tensor.modules.free_module_basis.FreeModuleCoBasis
Failed example:
    IndexError: index out of range: 0 not in [1, 3]
    The following tests failed: _test_iter_len

File "src/sage/tensor/modules/", line 400, in sage.tensor.modules.free_module_basis.FreeModuleCoBasis.?
Failed example:
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/lib/python3.7/site-packages/sage/tensor/modules/", line 98, in _test_iter_len
        tester.assertTrue(x in self.free_module())
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/", line 705, in assertTrue
        raise self.failureException(msg)
    AssertionError: False is not true
    The following tests failed: _test_iter_len

New commits:

1e69c0esage.tensor.modules.free_module_basis.Basis_abstract: Add _test_iter_len

comment:3 Changed 2 years ago by Matthias Köppe

Should the method FreeModuleCoBasis.free_module really return the (primal) base module, as it currently does? Or rather the dual of it?

comment:4 Changed 2 years ago by Matthias Köppe

Status: newneeds_info

comment:5 Changed 2 years ago by git

Commit: 1e69c0eba014ac4d5a1e5ecd664f1bf953242507f1f67d3ddf2639d20ea4d8cd7bac4bd59e90a155

Branch pushed to git repo; I updated commit sha1. New commits:

f1f67d3FreeModuleCoBasis: Add _test_iter_len

comment:6 Changed 2 years ago by Matthias Köppe

Description: modified (diff)
Priority: majorminor
Status: needs_infoneeds_review
Type: defectenhancement

comment:7 Changed 2 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

While there is a bit of ambiguity, considering the output:

sage: f
Dual basis (e^0,e^1,e^2) on the Rank-3 free module M over the Integer Ring

which is saying that it is a dual basis of M, I think it is fair that free_module returns the base module rather than its dual. As such, I am setting this to a positive review.

comment:8 Changed 2 years ago by Matthias Köppe


comment:9 Changed 2 years ago by Volker Braun

Branch: u/mkoeppe/sage_tensor_modules_free_module_basis__add_testsuitef1f67d3ddf2639d20ea4d8cd7bac4bd59e90a155
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.