mailRe: r2768 - /1.2/float.py


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

Header


Content

Posted by Edward d'Auvergne on November 08, 2006 - 08:40:
Thank you Gary for the quick response and fix to bug #7641
(http://gna.org/bugs/?7641).  Alex, now that Gary has ported the fix
from the 1.2 line into 1.3 line (as well as the 'test_suite' branch),
would you be able to confirm that the bug has been resolved?  There
should no longer be a RelaxError about an infinite chi-squared value
on your data when running the 1.3 line repository code.  Once
confirmed, I'll release relax 1.2.9.

Thanks,

Edward



On 11/8/06, garyt@xxxxxxxxxxxxxxx <garyt@xxxxxxxxxxxxxxx> wrote:
Author: varioustoxins
Date: Wed Nov  8 00:17:53 2006
New Revision: 2768

URL: http://svn.gna.org/viewcvs/relax?rev=2768&view=rev
Log:
fixed bug 7641 Infinite Chi2 warning

bug #7641 http://gna.org/bugs/?7641
https://mail.gna.org/public/relax-devel/2006-11/msg00078.html

Modified:
    1.2/float.py

Modified: 1.2/float.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/float.py?rev=2768&r1=2767&r2=2768&view=diff
==============================================================================
--- 1.2/float.py (original)
+++ 1.2/float.py Wed Nov  8 00:17:53 2006
@@ -154,7 +154,7 @@
     if isFinite(float):
          # check and store is positive
          positive = isPositive(float)
-         if isZero():
+         if isZero(float):
             if positive:
                 result = CLASS_POS_ZERO
             else:
@@ -178,7 +178,7 @@
             result  = CLASS_POS_INF
         elif isNegInf(float):
             result  = CLASS_NEG_INF
-
+    return result


def packBytesAsPyFloat(bytes): @@ -612,16 +612,19 @@ # if exponent is not all ones this can't be a Inf if not isExpAllOnes(obj): result = False - - # get the mantissa as a byte array properly masked - manBytes = getMantissaBytes(obj) - - for byte in manBytes: - #check if any of the unmasked mantissa bytes are zero - # to be a NaN the mantissa must be zero - if byte > 0: - return False - return True + else: + # get the mantissa as a byte array properly masked + manBytes = getMantissaBytes(obj) + + for byte in manBytes: + #check if any of the unmasked mantissa bytes are zero + # to be a NaN the mantissa must be zero + if byte > 0: + result = False + break + result = True + + return result

 def isPosInf(obj):
     ''' check to see if a python float is positive infinity


_______________________________________________ relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

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




Related Messages


Powered by MHonArc, Updated Thu Nov 09 05:00:35 2006