mailr21614 - in /branches/relax_disp: ./ relax.py


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

Header


Content

Posted by edward on November 22, 2013 - 19:39:
Author: bugman
Date: Fri Nov 22 19:39:48 2013
New Revision: 21614

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

........
  r21613 | bugman | 2013-11-22 19:33:54 +0100 (Fri, 22 Nov 2013) | 7 lines
  
  Created the --numpy-raise command line option.
  
  When this is set, all numpy warnings will be converted to errors.  This is 
to aid in debugging to
  locate where the warning messages are coming from.  These appear as 
RelaxWarnings, but there is no
  indication as to where the problem is.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/relax.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Nov 22 19:39:48 2013
@@ -1,1 +1,1 @@
-/trunk:1-21582
+/trunk:1-21613

Modified: branches/relax_disp/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/relax.py?rev=21614&r1=21613&r2=21614&view=diff
==============================================================================
--- branches/relax_disp/relax.py (original)
+++ branches/relax_disp/relax.py Fri Nov 22 19:39:48 2013
@@ -40,6 +40,7 @@
 import dep_check
 
 # Python modules.
+import numpy
 from optparse import Option, OptionParser
 from os import F_OK, access, getpid, putenv
 if dep_check.cprofile_module:
@@ -289,13 +290,16 @@
         parser.add_option('-v', '--version', action='store_true', 
dest='version', default=0, help='show the version number and exit')
         parser.add_option('-m', '--multi', action='store', type='string', 
dest='multiprocessor', default='uni', help='set multi processor method')
         parser.add_option('-n', '--processors', action='store', type='int', 
dest='n_processors', default=-1, help='set number of processors (may be 
ignored)')
+        parser.add_option('--numpy-raise', action='store_true', 
dest='numpy_raise', default=0, help='convert numpy warnings to errors')
 
         # Parse the options.
         (options, args) = parser.parse_args()
 
-        # Debugging flag.
+        # Debugging flag (and numpy warning to error conversion).
         if options.debug:
             status.debug = True
+        if options.numpy_raise:
+            numpy.seterr(all='raise')
 
         # Pedantic flag.
         if options.pedantic:




Related Messages


Powered by MHonArc, Updated Sat Nov 23 18:40:01 2013