diff options
author | syn <isaqtm@gmail.com> | 2020-03-15 19:51:42 +0300 |
---|---|---|
committer | syn <isaqtm@gmail.com> | 2020-03-15 19:51:42 +0300 |
commit | ba1eba3ea8bc725f2bc0021c6edde7d4aea4e040 (patch) | |
tree | cc2a597630cc7cdd1bd98ee0f5d3a0ac30da8db1 /4/libsolve2.py | |
parent | 5cd1f142d2002717c18f7595f9492afeb4ddf061 (diff) | |
download | alg3-ba1eba3ea8bc725f2bc0021c6edde7d4aea4e040.tar.gz |
Diffstat (limited to '4/libsolve2.py')
-rw-r--r-- | 4/libsolve2.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/4/libsolve2.py b/4/libsolve2.py index d723ba3..c4c9106 100644 --- a/4/libsolve2.py +++ b/4/libsolve2.py @@ -3,6 +3,7 @@ from typing import Iterable, Union from fractions import Fraction from itertools import zip_longest +POLY_COLOR = '95' def is_scalar(obj): return isinstance(obj, (Fraction, int)) @@ -295,5 +296,12 @@ class Matrix: break return copy + @property + def T(self): + return Matrix([ + [row[i] for row in self.rows] + for i in range(self.shape[1]) + ]) + x = Poly([0, 1]) |