#31942 closed enhancement (fixed)

_sympy_ methods for matrices and vectors

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.4
Component: symbolics Keywords:
Cc: Karl-Dieter Crisman, Vincent Delecroix, Travis Scrimshaw Merged in:
Authors: Matthias Koeppe Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: c365f18 (Commits, GitHub, GitLab) Commit: c365f1877c0369000930d4bd6f750db7a3c09e3d
Dependencies: Stopgaps:

Status badges

Description

We add _sympy_ methods to matrix and vector classes, converting to sympy.matrices.Matrix.

https://docs.sympy.org/latest/modules/matrices/matrices.html

Change History (11)

comment:1 Changed 16 months ago by Matthias Köppe

Branch: u/mkoeppe/_sympy__methods_for_matrices_and_vectors

comment:2 Changed 16 months ago by Matthias Köppe

Cc: Karl-Dieter Crisman Vincent Delecroix added
Commit: 2debc4957d4ef15c635abeaa217736aa80152a2b

New commits:

2debc49Matrix._sympy_: New

comment:3 Changed 16 months ago by git

Commit: 2debc4957d4ef15c635abeaa217736aa80152a2b9e0f73634dfff54ee42b2c30670cfa62d12de98f

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

bd4b669sage.interfaces.sympy._sympysage_matrix: Complete implementation
26ce752FreeModuleElement._sympy_: New
9e0f736Matrix._sympy_: Fix up doctest

comment:4 Changed 16 months ago by Matthias Köppe

Authors: Matthias Koeppe
Cc: Travis Scrimshaw added
Status: newneeds_review

comment:5 Changed 16 months ago by Travis Scrimshaw

Do you also want to handle the case when there is no common parent? In particular, I get

sage: coercion_model.common_parent(ZZ, QQ, ZZ^5)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[snip]
TypeError: no common canonical parent for objects with parents: ...

Although I am not sure this can happen...

comment:6 Changed 16 months ago by Matthias Köppe

Good idea.

comment:7 Changed 16 months ago by git

Commit: 9e0f73634dfff54ee42b2c30670cfa62d12de98fc365f1877c0369000930d4bd6f750db7a3c09e3d

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

7af9095sage.interfaces.sympy._sympysage_matrix: Handle TypeError from common_parent
c365f18sage.interfaces.sympy._sympysage_matrix: Cache the result if self is immutable

comment:8 Changed 16 months ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw

Green bot => positive review.

comment:9 Changed 16 months ago by Travis Scrimshaw

Status: needs_reviewpositive_review

comment:10 Changed 16 months ago by Matthias Köppe

Thank you!

comment:11 Changed 15 months ago by Volker Braun

Branch: u/mkoeppe/_sympy__methods_for_matrices_and_vectorsc365f1877c0369000930d4bd6f750db7a3c09e3d
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.