Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Check basis against a FreeModuleBasis in FreeModuleTensor._preparse_d…
Browse files Browse the repository at this point in the history
…isplay
  • Loading branch information
egourgoulhon committed Apr 16, 2019
1 parent 5536b94 commit 093bd08
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sage/tensor/modules/free_module_tensor.py
Expand Up @@ -197,9 +197,9 @@ class being:
from sage.tensor.modules.comp import (Components, CompWithSym, CompFullySym,
CompFullyAntiSym)
from sage.tensor.modules.tensor_with_indices import TensorWithIndices
from sage.tensor.modules.free_module_basis import FreeModuleBasis
from sage.parallel.decorate import parallel
from sage.parallel.parallelism import Parallelism
from sage.manifolds.chart import Chart


class FreeModuleTensor(ModuleElement):
Expand Down Expand Up @@ -576,10 +576,11 @@ def _preparse_display(self, basis=None, format_spec=None):
"""
if basis is None:
basis = self._fmodule._def_basis
elif isinstance(basis, Chart):
# a coordinate chart has been passed instead of a basis;
# the basis is then assumed to be the coordinate frame
# associated to the chart:
elif not isinstance(basis, FreeModuleBasis):
# basis is assumed to be a "format specification" that carries a
# genuine basis via the attribute frame() (this holds for
# coordinate charts on manifolds, the basis returned by frame()
# being the coordinate vector frame)
if format_spec is None:
format_spec = basis
basis = basis.frame()
Expand Down

0 comments on commit 093bd08

Please sign in to comment.