mailr15426 - in /1.3: arg_check.py data/relax_xml.py


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

Header


Content

Posted by edward on March 01, 2012 - 15:06:
Author: bugman
Date: Thu Mar  1 15:06:41 2012
New Revision: 15426

URL: http://svn.gna.org/viewcvs/relax?rev=15426&view=rev
Log:
Bug fix for old numpy versions missing the float16 object.


Modified:
    1.3/arg_check.py
    1.3/data/relax_xml.py

Modified: 1.3/arg_check.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/arg_check.py?rev=15426&r1=15425&r2=15426&view=diff
==============================================================================
--- 1.3/arg_check.py (original)
+++ 1.3/arg_check.py Thu Mar  1 15:06:41 2012
@@ -24,7 +24,11 @@
 """Argument checking functions for the relax user functions."""
 
 # Python module imports.
-from numpy import float16, float32, float64, float128, ndarray
+from numpy import float32, float64, float128, ndarray
+try:
+    from numpy import float16
+except:
+    float16 = float32
 
 # relax module imports.
 from relax_errors import RelaxBoolError, RelaxFloatError, 
RelaxFunctionError, RelaxIntError, RelaxIntListIntError, RelaxListFloatError, 
RelaxListIntError, RelaxMatrixFloatError, RelaxNoneFloatError, 
RelaxNoneFunctionError, RelaxListNumError, RelaxListStrError, RelaxNoneError, 
RelaxNoneIntError, RelaxNoneIntListIntError, RelaxNoneListFloatError, 
RelaxNoneListIntError, RelaxNoneMatrixFloatError, RelaxNoneListNumError, 
RelaxNoneListStrError, RelaxNoneNumError, RelaxNoneNumStrListNumStrError, 
RelaxNoneNumTupleNumError, RelaxNoneStrError, RelaxNoneStrFileError, 
RelaxNoneStrListNumError, RelaxNoneStrListStrError, RelaxNumError, 
RelaxNumStrListNumStrError, RelaxNumTupleNumError, RelaxStrError, 
RelaxStrFileError, RelaxStrListNumError, RelaxStrListStrError, 
RelaxTupleError, RelaxTupleNumError

Modified: 1.3/data/relax_xml.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/relax_xml.py?rev=15426&r1=15425&r2=15426&view=diff
==============================================================================
--- 1.3/data/relax_xml.py (original)
+++ 1.3/data/relax_xml.py Thu Mar  1 15:06:41 2012
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2008, 2010 Edward d'Auvergne                                 
 #
+# Copyright (C) 2008-2012 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -24,7 +24,11 @@
 """Module containing generic fns for creation and parsing of XML 
representations of python objects."""
 
 # Python module imports.
-from numpy import set_printoptions, array, float16, float32, float64, 
float128, inf, nan
+from numpy import set_printoptions, array, float32, float64, float128, inf, 
nan
+try:
+    from numpy import float16
+except:
+    float16 = float32
 from re import search
 from string import strip
 




Related Messages


Powered by MHonArc, Updated Thu Mar 01 16:20:01 2012