mailr25628 - in /trunk: ./ gui/components/ specific_analyses/relax_disp/ specific_analyses/relax_fit/ test_suite/shared_data/cur...


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 04, 2014 - 16:25:
Author: bugman
Date: Thu Sep  4 16:25:48 2014
New Revision: 25628

URL: http://svn.gna.org/viewcvs/relax?rev=25628&view=rev
Log:
Ported r25627 from the 3.3.0 tag.

The command used was:
svn merge -r25626:25627 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/tags/3.3.0 .

.....
  Python 3 fixes via the 2to3 compatibility script.
  
  The command used was:
  2to3 -w -f buffer -f idioms -f set_literal -f ws_comma -x except -x import 
-x imports -x long -x numliterals -x xrange .
.....


Modified:
    trunk/dep_check.py
    trunk/gui/components/spectrum.py
    trunk/specific_analyses/relax_disp/estimate_r2eff.py
    trunk/specific_analyses/relax_fit/optimisation.py
    
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
    
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
    trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/dep_check.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/dep_check.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- trunk/dep_check.py  (original)
+++ trunk/dep_check.py  Thu Sep  4 16:25:48 2014
@@ -51,8 +51,8 @@
     """
 
     # Strip out trailing zeros.
-    version1 = sub(r'(\.0+)*$','', version1)
-    version2 = sub(r'(\.0+)*$','', version2)
+    version1 = sub(r'(\.0+)*$', '', version1)
+    version2 = sub(r'(\.0+)*$', '', version2)
 
     # Convert to a list of numbers.
     version1 = [int(val) for val in version1.split('.')]

Modified: trunk/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/components/spectrum.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- trunk/gui/components/spectrum.py    (original)
+++ trunk/gui/components/spectrum.py    Thu Sep  4 16:25:48 2014
@@ -340,7 +340,7 @@
 
         # Loop over the additional selections.
         ids = []
-        while 1:
+        while True:
             # No selection.
             if item == -1:
                 break

Modified: trunk/specific_analyses/relax_disp/estimate_r2eff.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/estimate_r2eff.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/estimate_r2eff.py        (original)
+++ trunk/specific_analyses/relax_disp/estimate_r2eff.py        Thu Sep  4 
16:25:48 2014
@@ -398,7 +398,7 @@
         d_exp_d_i0 = exp(-r2eff * times)
 
         # Define Jacobian as m rows with function derivatives and n columns 
of parameters.
-        jacobian_matrix_exp = transpose(array( [d_exp_d_r2eff , d_exp_d_i0] 
) )
+        jacobian_matrix_exp = transpose(array( [d_exp_d_r2eff, d_exp_d_i0] ) 
)
 
         # Return Jacobian matrix.
         return jacobian_matrix_exp
@@ -492,7 +492,7 @@
         d_chi2_d_i0 = - 2.0 * ( -i0 * exp( -r2eff * times) + values) * exp( 
-r2eff * times) / errors**2
 
         # Define Jacobian as m rows with function derivatives and n columns 
of parameters.
-        jacobian_matrix_exp_chi2 = transpose(array( [d_chi2_d_r2eff , 
d_chi2_d_i0] ) )
+        jacobian_matrix_exp_chi2 = transpose(array( [d_chi2_d_r2eff, 
d_chi2_d_i0] ) )
 
         return jacobian_matrix_exp_chi2
 

Modified: trunk/specific_analyses/relax_fit/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_fit/optimisation.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- trunk/specific_analyses/relax_fit/optimisation.py   (original)
+++ trunk/specific_analyses/relax_fit/optimisation.py   Thu Sep  4 16:25:48 
2014
@@ -88,7 +88,7 @@
     """
 
     # Convert if necessary.
-    if type(params) == ndarray:
+    if isinstance(params, ndarray):
         params = params.tolist()
 
     # Call the C code.
@@ -108,7 +108,7 @@
     """
 
     # Convert if necessary.
-    if type(params) == ndarray:
+    if isinstance(params, ndarray):
         params = params.tolist()
 
     # Call the C code.
@@ -128,7 +128,7 @@
     """
 
     # Convert if necessary.
-    if type(params) == ndarray:
+    if isinstance(params, ndarray):
         params = params.tolist()
 
     # Call the C code.

Modified: 
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- 
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
      (original)
+++ 
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
      Thu Sep  4 16:25:48 2014
@@ -215,7 +215,7 @@
     # Make partial derivative, with respect to i0.
     d_exp_d_i0 = exp(-r2eff * times)
     # Define Jacobian as m rows with function derivatives and n columns of 
parameters.
-    jacobian_matrix_exp = transpose(array( [d_exp_d_r2eff , d_exp_d_i0] ) )
+    jacobian_matrix_exp = transpose(array( [d_exp_d_r2eff, d_exp_d_i0] ) )
     # Return Jacobian matrix.
     return jacobian_matrix_exp
 

Modified: 
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- 
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
        (original)
+++ 
trunk/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
        Thu Sep  4 16:25:48 2014
@@ -287,7 +287,7 @@
             #ax1.hist(r2eff_array_boot, bins=100, histtype='stepfilled', 
normed=False, color='b', alpha=0.9, label='%i boot'%sim_boot)
             ax1.hist(r2eff_array_boot, bins=100, histtype='stepfilled', 
normed=True, color='b', alpha=0.9, label='%i boot'%sim_boot)
             ax1.hist(gauss_ref_boot, bins=100, histtype='step', normed=True, 
color='r', alpha=0.5, label='boot gauss')
-            ax1.set_xlim([0.9,1.1])
+            ax1.set_xlim([0.9, 1.1])
             ax1.set_xlabel('R')
             ax1.legend(loc='upper left', shadow=True, prop = fontP)
 
@@ -296,7 +296,7 @@
             #ax1.hist(r2eff_array_sim, bins=100, histtype='stepfilled', 
normed=False, color='b', alpha=0.9, label='%i MC'%sim_boot)
             ax1.hist(r2eff_array_sim, bins=100, histtype='stepfilled', 
normed=True, color='b', alpha=0.9, label='%i MC'%sim_boot)
             ax1.hist(gauss_ref_sim, bins=100, histtype='step', normed=True, 
color='r', alpha=0.5, label='MC gauss')
-            ax1.set_xlim([0.9,1.1])
+            ax1.set_xlim([0.9, 1.1])
             ax1.set_xlabel('R')
             ax1.legend(loc='upper left', shadow=True, prop = fontP)
 

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=25628&r1=25627&r2=25628&view=diff
==============================================================================
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Thu Sep  4 16:25:48 2014
@@ -3389,7 +3389,7 @@
     def test_finite_value(self):
         """Test return from C code, when parameters are wrong.  This can 
happen, if minfx takes a wrong step."""
 
-        times = array([ 0.7,  1. ,  0.8,  0.4,  0.9])
+        times = array([ 0.7,  1.,  0.8,  0.4,  0.9])
         I = array([ 476.76174875,  372.43328777,  454.20339981,  
656.87936253,  419.16726341])
         errors = array([  9.48032653,  11.34093541,   9.35149017,  
10.84867928,  12.17590736])
 




Related Messages


Powered by MHonArc, Updated Thu Sep 04 16:40:02 2014