-- Bugfix #3072: As discussed on IRC, matrix.invert() should throw a

ValueError exception if matrix is singular.
This commit is contained in:
Ken Hughes
2005-12-05 19:57:23 +00:00
parent e209676d3d
commit 1a2ac4e64d
2 changed files with 8 additions and 6 deletions

View File

@@ -228,7 +228,8 @@ PyObject *Matrix_Invert(MatrixObject * self)
//transpose
//Matrix_Transpose(self);
} else {
printf("Matrix.invert: matrix does not have an inverse\n");
return EXPP_ReturnPyObjError(PyExc_ValueError,
"matrix does not have an inverse");
}
return EXPP_incr_ret((PyObject*)self);
}