Change type of Matrix data from list to numpy.ndarray;
Restructure tests to use directly == on a Matrix using ==.all() from numpy.ndarray; Further implementation of the Matrix class
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import numpy
|
||||
|
||||
from matrix import Matrix
|
||||
|
||||
|
||||
@@ -5,6 +7,11 @@ class Vector(Matrix):
|
||||
__data__ = []
|
||||
|
||||
def __init__(self, data):
|
||||
"""
|
||||
|
||||
:type data: list | int
|
||||
"""
|
||||
super().__init__(numpy.array([0])) # TODO: remove in future
|
||||
if isinstance(data, list):
|
||||
self.__data__ = data
|
||||
elif isinstance(data, int):
|
||||
|
||||
Reference in New Issue
Block a user