Author: bugman
Date: Tue Nov 11 10:26:07 2014
New Revision: 26511
URL: http://svn.gna.org/viewcvs/relax?rev=26511&view=rev
Log:
Python 3 fixes via 2to3 - elimination of all map and lambda usage in relax.
The command used was:
2to3 -j 4 -w -f map .
Modified:
trunk/auto_analyses/relax_disp_repeat_cpmg.py
trunk/auto_analyses/relax_fit.py
trunk/test_suite/system_tests/relax_fit.py
Modified: trunk/auto_analyses/relax_disp_repeat_cpmg.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp_repeat_cpmg.py?rev=26511&r1=26510&r2=26511&view=diff
==============================================================================
--- trunk/auto_analyses/relax_disp_repeat_cpmg.py (original)
+++ trunk/auto_analyses/relax_disp_repeat_cpmg.py Tue Nov 11 10:26:07 2014
@@ -1012,7 +1012,7 @@
"""Method which return a list of tubles, where each tuble is a
spectrum id and a list of spectrum ids which are replicated"""
# Get the dublicates.
- dublicates = map(lambda val: (val, [i for i in range(len(cpmg_frqs))
if cpmg_frqs[i] == val]), cpmg_frqs)
+ dublicates = [(val, [i for i in range(len(cpmg_frqs)) if cpmg_frqs[i]
== val]) for val in cpmg_frqs]
# Loop over the list of the mapping of cpmg frequency and duplications.
list_dub_mapping = []
Modified: trunk/auto_analyses/relax_fit.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_fit.py?rev=26511&r1=26510&r2=26511&view=diff
==============================================================================
--- trunk/auto_analyses/relax_fit.py (original)
+++ trunk/auto_analyses/relax_fit.py Tue Nov 11 10:26:07 2014
@@ -213,7 +213,7 @@
all_id.append(spectrum_id)
# Get the dublicates.
- dublicates = map(lambda val: (val, [i for i in
range(len(all_times)) if all_times[i] == val]), all_times)
+ dublicates = [(val, [i for i in range(len(all_times)) if
all_times[i] == val]) for val in all_times]
# Loop over the list of the mapping of times and duplications.
list_dub_mapping = []
Modified: trunk/test_suite/system_tests/relax_fit.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_fit.py?rev=26511&r1=26510&r2=26511&view=diff
==============================================================================
--- trunk/test_suite/system_tests/relax_fit.py (original)
+++ trunk/test_suite/system_tests/relax_fit.py Tue Nov 11 10:26:07 2014
@@ -304,7 +304,7 @@
all_id.append(spectrum_id)
# Get the dublicates.
- dublicates = map(lambda val: (val, [i for i in
range(len(all_times)) if all_times[i] == val]), all_times)
+ dublicates = [(val, [i for i in range(len(all_times)) if
all_times[i] == val]) for val in all_times]
# Loop over the list of the mapping of times and duplications.
list_dub_mapping = []
_______________________________________________
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