Skip to content

TensorFreeModule._an_element_: Create a default basis in the base module if necessary #30254

@mkoeppe

Description

@mkoeppe

Likewise for ExtPowerFreeModule etc.

The current code creates an element without components if the base module has no default basis. Such elements are not useful for running the test suite because adding them gives a "no common basis" error.

That currently all tests work depends in a subtle way on the order in which modules are created.

In this ticket, we propose to change the _an_element_ method to create a default basis in the base module if none already exists -- this matches what FiniteRankFreeModule._an_element_ already does.

This will simplify further refactoring of the code, such as the identification of modules discussed in #30241.

CC: @egourgoulhon @tscrim @mjungmath

Component: linear algebra

Author: Matthias Koeppe

Branch/Commit: eec19fd

Reviewer: Eric Gourgoulhon

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions