Author: bugman Date: Tue Mar 6 14:32:08 2012 New Revision: 15440 URL: http://svn.gna.org/viewcvs/relax?rev=15440&view=rev Log: Bug fix for relax not starting on 32-bit machines. This was first reported by Hugh Dannatt <h dott dannatt att sheffield dot ac dot uk> in the post at https://mail.gna.org/public/relax-users/2012-03/msg00011.html. The numpy.float128 object appears to be missing on 32-bit numpy versions (at least on old numpy versions). In such cases, float128 is aliased to float64. This should only affect relax users who place special high precision (float128) objects into the relax data store, when loading a save file with such an object on a 32-bit machine. This should practically never happen! 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=15440&r1=15439&r2=15440&view=diff ============================================================================== --- 1.3/arg_check.py (original) +++ 1.3/arg_check.py Tue Mar 6 14:32:08 2012 @@ -24,11 +24,15 @@ """Argument checking functions for the relax user functions.""" # Python module imports. -from numpy import float32, float64, float128, ndarray +from numpy import float32, float64, ndarray try: from numpy import float16 -except: - float16 = float32 +except ImportError: + float16 = float32 # Support for old numpy versions. +try: + from numpy import float128 +except ImportError: + float128 = float64 # Support for 32-bit numpy versions. # 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=15440&r1=15439&r2=15440&view=diff ============================================================================== --- 1.3/data/relax_xml.py (original) +++ 1.3/data/relax_xml.py Tue Mar 6 14:32:08 2012 @@ -24,11 +24,15 @@ """Module containing generic fns for creation and parsing of XML representations of python objects.""" # Python module imports. -from numpy import set_printoptions, array, float32, float64, float128, inf, nan +from numpy import set_printoptions, array, float32, float64, inf, nan try: from numpy import float16 -except: - float16 = float32 +except ImportError: + float16 = float32 # Support for old numpy versions. +try: + from numpy import float128 +except ImportError: + float128 = float64 # Support for 32-bit numpy versions. from re import search from string import strip