@@ -311,17 +311,17 @@ def __mul__(self, other: Matrix | float) -> Matrix:
311311 if isinstance (other , Matrix ):
312312 return Matrix (matrix = np .matmul (self .matrix , other .matrix ))
313313 else :
314- matrix = Matrix (matrix = self .matrix * float (other ))
314+ matrix = Matrix (matrix = self .matrix * float (other )) # type: ignore
315315 return matrix
316316
317317 __imul__ = __mul__
318318
319319 def __add__ (self , other : Matrix | float ) -> Matrix :
320320 """Matrix addition by another matrix or a float, returns a new matrix."""
321321 if isinstance (other , Matrix ):
322- return Matrix (matrix = self .matrix + other .matrix )
322+ return Matrix (matrix = self .matrix + other .matrix ) # type: ignore
323323 else :
324- return Matrix (matrix = self .matrix + float (other ))
324+ return Matrix (matrix = self .matrix + float (other )) # type: ignore
325325
326326 __iadd__ = __add__
327327
@@ -331,9 +331,9 @@ def __sub__(self, other: Matrix | float) -> Matrix:
331331
332332 """
333333 if isinstance (other , Matrix ):
334- return Matrix (matrix = self .matrix - other .matrix )
334+ return Matrix (matrix = self .matrix - other .matrix ) # type: ignore
335335 else :
336- return Matrix (matrix = self .matrix - float (other ))
336+ return Matrix (matrix = self .matrix - float (other )) # type: ignore
337337
338338 __isub__ = __sub__
339339
@@ -346,7 +346,7 @@ def inverse(self) -> Matrix:
346346 if self .nrows != self .ncols :
347347 raise TypeError ("Inverse of non-square matrix not supported." )
348348 try :
349- return Matrix (matrix = np .linalg .inv (self .matrix ))
349+ return Matrix (matrix = np .linalg .inv (self .matrix )) # type: ignore
350350 except np .linalg .LinAlgError :
351351 raise ZeroDivisionError
352352
@@ -445,7 +445,7 @@ def numpy_matrix_solver(A: MatrixData | NDArray, B: MatrixData | NDArray) -> Mat
445445 """
446446 mat_A = np .array (A , dtype = np .float64 )
447447 mat_B = np .array (B , dtype = np .float64 )
448- return Matrix (matrix = np .linalg .solve (mat_A , mat_B ))
448+ return Matrix (matrix = np .linalg .solve (mat_A , mat_B )) # type: ignore
449449
450450
451451def numpy_vector_solver (A : MatrixData | NDArray , B : Iterable [float ]) -> list [float ]:
@@ -486,7 +486,7 @@ def solve_matrix(self, B: MatrixData | NDArray) -> Matrix:
486486
487487 """
488488 mat_B = np .array (B , dtype = np .float64 )
489- return Matrix (matrix = np .linalg .solve (self .mat_A , mat_B ))
489+ return Matrix (matrix = np .linalg .solve (self .mat_A , mat_B )) # type: ignore
490490
491491 def solve_vector (self , B : Iterable [float ]) -> list [float ]:
492492 """Solves the linear equation system given by the nxn Matrix
0 commit comments