Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage.tensor.modules.free_module_basis: Add testsuite #30287

Closed
mkoeppe opened this issue Aug 4, 2020 · 11 comments
Closed

sage.tensor.modules.free_module_basis: Add testsuite #30287

mkoeppe opened this issue Aug 4, 2020 · 11 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Aug 4, 2020

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

CC: @mjungmath @egourgoulhon @tscrim

Component: linear algebra

Author: Matthias Koeppe

Branch/Commit: f1f67d3

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/30287

@mkoeppe mkoeppe added this to the sage-9.2 milestone Aug 4, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 4, 2020

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 4, 2020

comment:2

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:
    TestSuite(f).run()
...
    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:
    TestSuite(f).run()
...
      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

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 4, 2020

Commit: 1e69c0e

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 4, 2020

comment:3

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 6, 2020

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

f1f67d3FreeModuleCoBasis: Add _test_iter_len

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 6, 2020

Changed commit from 1e69c0e to f1f67d3

@mkoeppe

This comment has been minimized.

@tscrim
Copy link
Collaborator

tscrim commented Aug 7, 2020

comment:7

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.

@tscrim
Copy link
Collaborator

tscrim commented Aug 7, 2020

Reviewer: Travis Scrimshaw

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 7, 2020

comment:8

Thanks!

@vbraun
Copy link
Member

vbraun commented Aug 10, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants