[Scipy-svn] r2297 - in trunk/Lib: linalg optimize stats

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Oct 25 03:15:30 CDT 2006


Author: oliphant
Date: 2006-10-25 03:15:21 -0500 (Wed, 25 Oct 2006)
New Revision: 2297

Modified:
   trunk/Lib/linalg/basic.py
   trunk/Lib/linalg/decomp.py
   trunk/Lib/linalg/matfuncs.py
   trunk/Lib/optimize/optimize.py
   trunk/Lib/stats/distributions.py
Log:
Fix ticket #294

Modified: trunk/Lib/linalg/basic.py
===================================================================
--- trunk/Lib/linalg/basic.py	2006-10-24 09:37:27 UTC (rev 2296)
+++ trunk/Lib/linalg/basic.py	2006-10-25 08:15:21 UTC (rev 2297)
@@ -380,8 +380,8 @@
     return lstsq(a, b, cond=cond)[0]
 
 
-eps = numpy.finfo(float).eps.item()
-feps = numpy.finfo(single).eps.item()
+eps = numpy.finfo(float).eps
+feps = numpy.finfo(single).eps
 
 _array_precision = {'f': 0, 'd': 1, 'F': 0, 'D': 1}
 def pinv2(a, cond=None):

Modified: trunk/Lib/linalg/decomp.py
===================================================================
--- trunk/Lib/linalg/decomp.py	2006-10-24 09:37:27 UTC (rev 2296)
+++ trunk/Lib/linalg/decomp.py	2006-10-25 08:15:21 UTC (rev 2297)
@@ -750,8 +750,8 @@
     elif info>0: raise LinAlgError, "Schur form not found.  Possibly ill-conditioned."
     return result[0], result[-3]
 
-eps = numpy.finfo(float).eps.item()
-feps = numpy.finfo(single).eps.item()
+eps = numpy.finfo(float).eps
+feps = numpy.finfo(single).eps
 
 _array_kind = {'b':0, 'h':0, 'B': 0, 'i':0, 'l': 0, 'f': 0, 'd': 0, 'F': 1, 'D': 1}
 _array_precision = {'i': 1, 'l': 1, 'f': 0, 'd': 1, 'F': 0, 'D': 1}

Modified: trunk/Lib/linalg/matfuncs.py
===================================================================
--- trunk/Lib/linalg/matfuncs.py	2006-10-24 09:37:27 UTC (rev 2296)
+++ trunk/Lib/linalg/matfuncs.py	2006-10-25 08:15:21 UTC (rev 2297)
@@ -16,8 +16,8 @@
 from basic import solve, inv, norm, triu, all_mat
 from decomp import eig, schur, rsf2csf, orth, svd
 
-eps = sb.finfo(float).eps.item()
-feps = sb.finfo(single).eps.item()
+eps = sb.finfo(float).eps
+feps = sb.finfo(single).eps
 
 def expm(A,q=7):
     """Compute the matrix exponential using Pade approximation of order q.

Modified: trunk/Lib/optimize/optimize.py
===================================================================
--- trunk/Lib/optimize/optimize.py	2006-10-24 09:37:27 UTC (rev 2296)
+++ trunk/Lib/optimize/optimize.py	2006-10-25 08:15:21 UTC (rev 2297)
@@ -1,3 +1,4 @@
+
 # ******NOTICE***************
 # optimize.py module by Travis E. Oliphant
 #
@@ -1026,6 +1027,7 @@
             else:
                 Ap = numpy.dot(A,psupi)
             # check curvature
+            Ap = asarray(Ap).squeeze() # get rid of matrices...
             curv = numpy.dot(psupi,Ap)
             if curv == 0.0:
                 break

Modified: trunk/Lib/stats/distributions.py
===================================================================
--- trunk/Lib/stats/distributions.py	2006-10-24 09:37:27 UTC (rev 2296)
+++ trunk/Lib/stats/distributions.py	2006-10-25 08:15:21 UTC (rev 2297)
@@ -3040,7 +3040,7 @@
 # if x is not in range or loc is not in range it assumes they are angles
 #   and converts them to [-pi, pi] equivalents.
 
-eps = numpy.finfo(float).eps.item()
+eps = numpy.finfo(float).eps
 
 class vonmises_gen(rv_continuous):
     def _rvs(self, b):



More information about the Scipy-svn mailing list