Skip to content

Lt.matrix returns the transpose of the list of lists passed to its constructor #158

@eric-wieser

Description

@eric-wieser

Split from gh-108:

>>> import sympy
>>> from galgebra.ga import Ga
>>> base=Ga('b*1|2|3',g=[1]*3,coords=sympy.symbols('x1:4',real=True))
>>> base.lt([
...     [1, -2,  3],
...     [4,  0,  3],
...     [7,  8, -9]
... ]).matrix()
Matrix([
[ 1, 4,  7],
[-2, 0,  8],
[ 3, 3, -9]])

Seems counter-intuitive that the constructor transposes the matrix. Cc @chaowenguo, since this is very related to gh-104.

Note that this doesn't happen if a matrix is passed directly:

>>> base.lt(sympy.Matrix([
...     [1, -2,  3],
...     [4,  0,  3],
...     [7,  8, -9]
... ])).matrix()
Matrix([
[1, -2,  3],
[4,  0,  3],
[7,  8, -9]])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions