Author: bugman Date: Tue Mar 5 16:41:00 2013 New Revision: 18647 URL: http://svn.gna.org/viewcvs/relax?rev=18647&view=rev Log: Merged revisions 18646 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18646 | bugman | 2013-03-05 16:40:28 +0100 (Tue, 05 Mar 2013) | 5 lines Updated the float module to handle numpy floats. This makes the floatToBinaryString() function compatible with the numpy.float16 type. ........ Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/float.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Mar 5 16:41:00 2013 @@ -1,1 +1,1 @@ -/trunk:1-18612 +/trunk:1-18646 Modified: branches/frame_order_testing/float.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/float.py?rev=18647&r1=18646&r2=18647&view=diff ============================================================================== --- branches/frame_order_testing/float.py (original) +++ branches/frame_order_testing/float.py Tue Mar 5 16:41:00 2013 @@ -3,7 +3,7 @@ # Copyright (C) 2006 Gary S Thompson (see https://gna.org/users for contact # # details) # # # -# Copyright (C) 2008-2012 Edward d'Auvergne # +# Copyright (C) 2008-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -88,8 +88,13 @@ - Add example IEEE double. - Check byte/nibble attributions. """ + +# Python module imports. from struct import pack, unpack import sys + +# relax module imports. +from check_types import is_float SIGNBIT = 0x80 @@ -239,7 +244,7 @@ @raise TypeError: If the input object isn't a python float. """ - if not isinstance(obj, float): + if not is_float(obj): raise TypeError('the object recieved wasn\'t a float, type was: %s' % type(obj)) # pack float into binary string