mailr24394 - in /branches/frame_order_cleanup: ./ lib/compat.py test_suite/shared_data/dispersion/profiling/profiling_cr72.py


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

Header


Content

Posted by edward on July 02, 2014 - 09:43:
Author: bugman
Date: Wed Jul  2 09:43:34 2014
New Revision: 24394

URL: http://svn.gna.org/viewcvs/relax?rev=24394&view=rev
Log:
Merged revisions 24390-24391 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r24390 | bugman | 2014-07-02 09:37:42 +0200 (Wed, 02 Jul 2014) | 17 lines
  
  General Python 3 fixes via the 2to3 script.
  
  The command used was:
  2to3 -j 4 -w \
  -f buffer \
  -f idioms \
  -f set_literal \
  -f ws_comma \
  -x except \
  -x import \
  -x imports \
  -x long \
  -x numliterals \
  -x xrange \
  .
........
  r24391 | bugman | 2014-07-02 09:42:01 +0200 (Wed, 02 Jul 2014) | 7 lines
  
  Removed the lib.compat.sorted() function which was providing Python2.3 
compatibility.
  
  For a while now, relax has been unable to run on Python versions less than 
2.5.  Therefore there is
  no use for having this replacement function for Python <= 2.3 which was 
being placed into the
  builtins module.
........

Modified:
    branches/frame_order_cleanup/   (props changed)
    branches/frame_order_cleanup/lib/compat.py
    
branches/frame_order_cleanup/test_suite/shared_data/dispersion/profiling/profiling_cr72.py

Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul  2 09:43:34 2014
@@ -1 +1 @@
-/trunk:1-24383,24386-24387
+/trunk:1-24392

Modified: branches/frame_order_cleanup/lib/compat.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/compat.py?rev=24394&r1=24393&r2=24394&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/compat.py  (original)
+++ branches/frame_order_cleanup/lib/compat.py  Wed Jul  2 09:43:34 2014
@@ -113,7 +113,7 @@
 # Numpy.
 import numpy
 try:
-    numpy.linalg.norm(numpy.ones((3,3)), axis=1)
+    numpy.linalg.norm(numpy.ones((3, 3)), axis=1)
     numpy_norm_axis = True
 except:
     numpy_norm_axis = False
@@ -247,19 +247,6 @@
 
     # Support for older version (this is much slower).
     return numpy.apply_along_axis(numpy.linalg.norm, axis, x)
-
-
-def sorted(data):
-    """Python 2.3 and earlier replacement function for the builtin sorted() 
function."""
-
-    # Make a copy of the data.
-    new_data = deepcopy(data)
-
-    # Sort.
-    new_data.sort()
-
-    # Return the new data.
-    return new_data
 
 
 
@@ -374,10 +361,6 @@
     # This should work as all range() usage for Python 3 in relax must match 
the old xrange() usage.
     #builtins.range = builtins.xrange
 
-    # The sorted() builtin function for Python 2.3 and earlier.
-    if sys.version_info[1] <= 3:
-        setattr(builtins, 'sorted', sorted)
-
     # The os.devnull object for Python 2.3 and earlier.
     if sys.version_info[1] <= 3:
         if SYSTEM == 'Linux':

Modified: 
branches/frame_order_cleanup/test_suite/shared_data/dispersion/profiling/profiling_cr72.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/shared_data/dispersion/profiling/profiling_cr72.py?rev=24394&r1=24393&r2=24394&view=diff
==============================================================================
--- 
branches/frame_order_cleanup/test_suite/shared_data/dispersion/profiling/profiling_cr72.py
  (original)
+++ 
branches/frame_order_cleanup/test_suite/shared_data/dispersion/profiling/profiling_cr72.py
  Wed Jul  2 09:43:34 2014
@@ -104,7 +104,7 @@
         self.ncyc_list = range(2, 2*self.num_points + 1, 2)
         self.relax_time = 0.04
         self.points = array(self.ncyc_list) / self.relax_time
-        self.value = array(range(1,len(self.ncyc_list)+1), float64) * 1.00
+        self.value = array(range(1, len(self.ncyc_list)+1), float64) * 1.00
         self.error = ones(len(self.ncyc_list), float64) * 0.01
 
         # Make nested list arrays of data. And return them.




Related Messages


Powered by MHonArc, Updated Wed Jul 02 10:00:02 2014