fixe to list
This commit is contained in:
parent
2bc6d27999
commit
cbce5c134f
1 changed files with 2 additions and 6 deletions
|
|
@ -43,12 +43,8 @@ class Matrix:
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.__m)
|
return str(self.__m)
|
||||||
|
|
||||||
@staticmethod
|
def to_list(self) -> list[list[complex]]:
|
||||||
def to_list(matrix: "Matrix") -> list[list[complex]]:
|
return self._Matrix__m.copy()
|
||||||
if type(matrix) is not Matrix:
|
|
||||||
raise ValueError(f"cannot multiply Matrix with {type(matrix)}")
|
|
||||||
|
|
||||||
return matrix._Matrix__m.copy()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def I() -> "Matrix":
|
def I() -> "Matrix":
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue