> One more time, could you do the following sequence of commands so that I > can report them to the numpy mailing list. I've left the output from my > run; it's interesting that the numpy.linalg.inv on my computer gives the > same ridiculous answers that your scipy.linalg.inv command gives. It > looks like it is scaling by dividing by the determinant or something. > > sage: import numpy > sage: a=numpy.array([[1,2,3],[4,5,6],[7,8,9]],dtype="float64") > sage: import scipy > sage: import scipy.linalg > sage: import numpy.linalg > sage: scipy.linalg.det(a) > 0.0 > sage: scipy.linalg.inv(a) > --------------------------------------------------------------------------- > LinAlgError Traceback (most recent call > [snip] > LinAlgError: singular matrix > sage: numpy.linalg.det(a) > -1.3325928902019335e-15 > sage: numpy.linalg.inv(a) > > array([[ 2.25125019e+15, -4.50250038e+15, 2.25125019e+15], > [ -4.50250038e+15, 9.00500077e+15, -4.50250038e+15], > [ 2.25125019e+15, -4.50250038e+15, 2.25125019e+15]])
I get this: sage: scipy.linalg.det(a) 0.0 sage: scipy.linalg.inv(a) array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15], [ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15], [ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]]) sage: numpy.linalg.det(a) 6.6613381477509392e-16 sage: numpy.linalg.inv(a) array([[ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15], [ 9.00719925e+15, -1.80143985e+16, 9.00719925e+15], [ -4.50359963e+15, 9.00719925e+15, -4.50359963e+15]]) John --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---