Cleaned size checks.
Added functions: zeros, ones, trace, elementWiseProduct and elementWiseProduct_inplace renamed functions to be with _inplace when they replace "this".
This commit is contained in:
@@ -44,6 +44,9 @@ int RunTests()
|
||||
|
||||
int main()
|
||||
{
|
||||
int len = 3;
|
||||
Poly::Matrix<double> mat_d = Poly::RandomMatrix<double>(len,len,0,10,std::random_device{}());
|
||||
Poly::Matrix<double> mat_e = Poly::RandomMatrix<double>(len,len,0,10,std::random_device{}());
|
||||
RunTests();
|
||||
std::cout<<"Tests program exited with no errors."<<std::endl;
|
||||
return 0;
|
||||
|
@@ -48,7 +48,7 @@ bool TestInverse(int len, bool print)
|
||||
if(print) std::cout<<mat_d<<std::endl;
|
||||
if(print) std::cout<<mat_d.asString(32,'[',']',',')<<std::endl;
|
||||
int prec = precision_per_type<T>();
|
||||
auto mat_d_i = mat_d.getInverse();
|
||||
auto mat_d_i = mat_d.inverse();
|
||||
PyObject *main = PyImport_AddModule("__main__");
|
||||
PyRun_SimpleString(std::string("data={}").c_str());
|
||||
PyRun_SimpleString(std::string("data['a']=np.matrix(" + mat_d.asString(32,'[',']',',') + ",dtype="+python_type_per_type<T>()+")").c_str());
|
||||
|
Reference in New Issue
Block a user