#30287 closed enhancement (fixed)

sage.tensor.modules.free_module_basis: Add testsuite

Reported by: mkoeppe Owned by:
Priority: minor Milestone: sage-9.2
Component: linear algebra Keywords:
Cc: gh-mjungmath, egourgoulhon, tscrim 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 mkoeppe)

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 22 months ago by mkoeppe

  • Branch set to u/mkoeppe/sage_tensor_modules_free_module_basis__add_testsuite

comment:2 Changed 22 months ago by mkoeppe

  • Commit set to 1e69c0eba014ac4d5a1e5ecd664f1bf953242507

The tests currently fail:

File "src/sage/tensor/modules/free_module_basis.py", 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/free_module_basis.py", 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/free_module_basis.py", 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/case.py", 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 22 months ago by mkoeppe

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 22 months ago by mkoeppe

  • Status changed from new to needs_info

comment:5 Changed 22 months ago by git

  • Commit changed from 1e69c0eba014ac4d5a1e5ecd664f1bf953242507 to f1f67d3ddf2639d20ea4d8cd7bac4bd59e90a155

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

f1f67d3FreeModuleCoBasis: Add _test_iter_len

comment:6 Changed 22 months ago by mkoeppe

  • Description modified (diff)
  • Priority changed from major to minor
  • Status changed from needs_info to needs_review
  • Type changed from defect to enhancement

comment:7 Changed 22 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_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 22 months ago by mkoeppe


comment:9 Changed 22 months ago by vbraun

  • Branch changed from u/mkoeppe/sage_tensor_modules_free_module_basis__add_testsuite to f1f67d3ddf2639d20ea4d8cd7bac4bd59e90a155
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.