Author: bugman
Date: Thu Sep 4 16:24:20 2014
New Revision: 25627
URL: http://svn.gna.org/viewcvs/relax?rev=25627&view=rev
Log:
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:
tags/3.3.0/dep_check.py
tags/3.3.0/gui/components/spectrum.py
tags/3.3.0/specific_analyses/relax_disp/estimate_r2eff.py
tags/3.3.0/specific_analyses/relax_fit/optimisation.py
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
tags/3.3.0/test_suite/system_tests/relax_disp.py
Modified: tags/3.3.0/dep_check.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/dep_check.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
--- tags/3.3.0/dep_check.py (original)
+++ tags/3.3.0/dep_check.py Thu Sep 4 16:24:20 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: tags/3.3.0/gui/components/spectrum.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/gui/components/spectrum.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
--- tags/3.3.0/gui/components/spectrum.py (original)
+++ tags/3.3.0/gui/components/spectrum.py Thu Sep 4 16:24:20 2014
@@ -340,7 +340,7 @@
# Loop over the additional selections.
ids = []
- while 1:
+ while True:
# No selection.
if item == -1:
break
Modified: tags/3.3.0/specific_analyses/relax_disp/estimate_r2eff.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/specific_analyses/relax_disp/estimate_r2eff.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
--- tags/3.3.0/specific_analyses/relax_disp/estimate_r2eff.py (original)
+++ tags/3.3.0/specific_analyses/relax_disp/estimate_r2eff.py Thu Sep 4
16:24:20 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: tags/3.3.0/specific_analyses/relax_fit/optimisation.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/specific_analyses/relax_fit/optimisation.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
--- tags/3.3.0/specific_analyses/relax_fit/optimisation.py (original)
+++ tags/3.3.0/specific_analyses/relax_fit/optimisation.py Thu Sep 4
16:24:20 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:
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
---
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
(original)
+++
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors.py
Thu Sep 4 16:24:20 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:
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
---
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
(original)
+++
tags/3.3.0/test_suite/shared_data/curve_fitting/numeric_topology/estimate_errors_analyse_relax.py
Thu Sep 4 16:24:20 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: tags/3.3.0/test_suite/system_tests/relax_disp.py
URL:
http://svn.gna.org/viewcvs/relax/tags/3.3.0/test_suite/system_tests/relax_disp.py?rev=25627&r1=25626&r2=25627&view=diff
==============================================================================
--- tags/3.3.0/test_suite/system_tests/relax_disp.py (original)
+++ tags/3.3.0/test_suite/system_tests/relax_disp.py Thu Sep 4 16:24:20 2014
@@ -3374,7 +3374,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])
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits