mailRe: Formating issues in the 1.3 line


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

Header


Content

Posted by Sébastien Morin on July 12, 2007 - 16:30:
Hi,

Here is a patch that fixes function spacing (2 preceding empty lines) issues 
of
the 1.3 line (r3340), except when a commented line precedes the function (like
at line 31 of 'maths_fns/ri.py').

Cheers !


Séb  :)




Selon Sébastien Morin <sebastien.morin.1@xxxxxxxxx>, 11.07.2007:

Oups...

The file wasn't loaded onto the server when I pressed 'send'.

Sorry for that. It seems I should finish my coffee before sending mails...

Ciao !


Séb  :P




Selon Sébastien Morin <sebastien.morin.1@xxxxxxxxx>, 11.07.2007:

Hi,

Here is a patch for revision 3339 of line 1.3 concerning all indentation
issues
(without the tab issues inside the OpenDX strings.

This small patch modifies solely 2 files
('test_suite/system_tests/model_free.py' and 'float.py')

Ciao !



Séb



Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 10.07.2007:

Hi,

I've committed this 1.3 line patch to the repository (r3339).  I
specificially excluded the 'dx/isosurface_3D.py' file because these
changes could have caused the OpenDX programs to fail (the text output
with trailing whitespace was generated by OpenDX itself, and therefore
removing it might be dangerous).  If you could Seb, it would be best
if the indentation fixes were placed into a patch for r3339 as
'patch__indentation_tab' modifies solely the 'dx/isosurface_3D.py'
file.  The indentation inside the strings embedded in this file should
remain as they are because OpenDX may expect this indentation.

Cheers,

Edward



On 7/10/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi Ed !

In fact, I thought about this but wasn't sure...

Here is the patch without the modification to the code where it should
end
in '\
', thus without any modification to those files :

maths_fns/mf.py
maths_fns/jw_mf.py
maths_fns/jw_mf_comps.py
maths_fns/chi2.py
minimise/levenberg_marquardt.py
minimise/line_search/test_functions.py


Ciao !


Séb



Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 10.07.2007:

Sorry, I didn't realise to warn you that the trailing single space 
in
the equation lines which terminate in '\' are important.  This
character, if not followed by a space, will cause the newline to be
removed from the docstring in the python help system.  For example 
if
you type

relax> from maths_fns import jw_mf
relax> help(jw_mf.calc_S2f_S2s_ts_d2jw_dS2fdS2s)

with the patch applied, you can see the issue - the middle line gets
appended to the top line.  A similar issue occurs in the OpenDX 
input
files that are created by relax.  All these special single trailing
whitespaces are important.  I'm really sorry for not having realised
earlier, it's been a long time since I worked on that code.

Regards,

Edward



On 7/10/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi,

Here is a patch for trailing whitespaces in the code for the 1.3
line
(revision
3338).

This should fix all formating issues of this kind for the entire
code...

Ciao


Séb  :)






Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 09.07.2007:

Thanks.  Please try to keep different types of changes separate
though.  All the changes so far are whitespace related so I can
commit
the patch as fixing whitespace formatting in the 1.3 line.  If
there
are other changes, these should go as separate commits into the
relax
repository.  That way I can decide if the whitespace commit will
be
back ported to the 1.2 line (which isn't really necessary) or if
other
changes in individual commits should be back ported (some
probably
will while others may not).

Cheers,

Edward


On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi Ed !

I will send a single large patch tomorrow when I have 
corrected
more
code...

Bye


Séb



Edward d'Auvergne wrote:
Hi,

These minor formatting changes do need to made to the
repository.
Would you still have all the changes in your checked out 
copy
Séb?
If
you could send a single patch of all the changes, it will be
much
easier for me to apply.  That would be much appreciated.

Thanks,

Edward


On 7/9/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx>
wrote:
Hi all,

Here are a few patches solving fomating issues in the 1.3
line
(revision 3324).

patch_sample_scripts_palmer              ->
sample_scripts/palmer.py

patch_test_suite_runner                  ->
sample_scripts/relax_curve_diff.py

patch_sample_scripts_relax_curve_diff    ->
sample_scripts/remap.py

patch_test_suite_system_tests_jw_mapping ->
test_suite/formatting.py

patch_sample_scripts_remap               ->
test_suite/runner.py

patch_test_suite_system_tests_main       ->
test_suite/system_tests/jw_mapping.py

patch_test_suite_formatting              ->
test_suite/system_tests/main.py

patch_test_suite_system_tests_model_free ->
test_suite/system_tests/model_free.py


These are low importance changes but nevertheless the work
needs
to
be done.

Cheers.


Séb :)
_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@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-devel





--
         ______________________________________
     _______________________________________________
    |                                               |
   || Sebastien Morin                               ||
  ||| Etudiant au PhD en biochimie                  |||
 |||| Laboratoire de resonance magnetique nucleaire ||||
||||| Dr Stephane Gagne                             |||||
 |||| CREFSIP (Universite Laval, Quebec, CANADA)    ||||
  ||| 1-418-656-2131 #4530                          |||
   ||                                               ||
    |_______________________________________________|
         ______________________________________









------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx






------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx






------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx


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

This is the relax-devel mailing list
relax-devel@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-devel





------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx



------------------------
Sébastien Morin
Étudiant M.Sc. Biochimie
Laboratoire S. Gagné
3252 Pav. Marchand (Université Laval)
Tél : (418) 656-2131 #4530
Fax : (418) 656-7176
e-mail : sebastien.morin.1@xxxxxxxxx
Index: prompt/help.py
===================================================================
--- prompt/help.py      (revision 3340)
+++ prompt/help.py      (working copy)
@@ -45,9 +45,11 @@
 interactive python help system, type 'help_python()'.
     """
 
+
     def __repr__(self):
         return self.text
 
+
     def __call__(self, *args, **kwds):
         if len(args) != 1 or type(args[0]) == str:
             print self.text
@@ -64,8 +66,10 @@
 to the help function built into the normal python interpreter.
     """
 
+
     def __repr__(self):
         return self.text
 
+
     def __call__(self, *args, **kwds):
         return pydoc.help(*args, **kwds)
Index: prompt/gpl.py
===================================================================
--- prompt/gpl.py       (revision 3340)
+++ prompt/gpl.py       (working copy)
@@ -26,6 +26,7 @@
         help(gpl)
         return "The GNU General Public License."
 
+
 def gpl():
     """
                     GNU GENERAL PUBLIC LICENSE
Index: generic_fns/residue.py
===================================================================
--- generic_fns/residue.py      (revision 3340)
+++ generic_fns/residue.py      (working copy)
@@ -26,7 +26,6 @@
 from selection import molecule_loop, parse_token, tokenise
 
 
-
 def copy(res_num_from=None, res_name_from=None, res_num_to=None, 
res_name_to=None):
     """Copy the contents of the residue structure from one residue to a new 
residue.
 
Index: generic_fns/molecule.py
===================================================================
--- generic_fns/molecule.py     (revision 3340)
+++ generic_fns/molecule.py     (working copy)
@@ -28,7 +28,6 @@
 # The relax data storage object.
 
 
-
 def copy(res_num_from=None, res_name_from=None, res_num_to=None, 
res_name_to=None):
     """Copy the contents of the residue structure from one residue to a new 
residue.
 
Index: generic_fns/spin.py
===================================================================
--- generic_fns/spin.py (revision 3340)
+++ generic_fns/spin.py (working copy)
@@ -28,7 +28,6 @@
 # The relax data storage object.
 
 
-
 def copy(res_num_from=None, res_name_from=None, res_num_to=None, 
res_name_to=None):
     """Copy the contents of the residue structure from one residue to a new 
residue.
 
Index: generic_fns/diffusion_tensor.py
===================================================================
--- generic_fns/diffusion_tensor.py     (revision 3340)
+++ generic_fns/diffusion_tensor.py     (working copy)
@@ -514,8 +514,6 @@
         relax_data_store = Data
 
 
-
-
     def copy(self, run1=None, run2=None):
         """Function for copying diffusion tensor data from run1 to run2."""
 
Index: generic_fns/selection.py
===================================================================
--- generic_fns/selection.py    (revision 3340)
+++ generic_fns/selection.py    (working copy)
@@ -64,6 +64,7 @@
     molecules, residues and spins, or the union or intersection
     of two other Selection objects."""
 
+
     def __init__(self, select_string):
         """Initialise a Selection object.
 
@@ -101,6 +102,7 @@
             self.residues = parse_token(res_token)
             self.spins = parse_token(spin_token)
 
+
     def __contains__(self, obj):
         if self._union:
             return (obj in self._union[0]) or (obj in self._union[1])
@@ -124,6 +126,7 @@
 
         return False
 
+
     def intersection(self, select_obj0, select_obj1):
         """Make a Selection object the intersection of two Selection objects
 
@@ -136,6 +139,7 @@
             raise RelaxError, "Cannot define multiple Boolean relationships 
between Selection objects"
         self._intersect = (select_obj0, select_obj1)
 
+
     def union(self, select_obj0, select_obj1):
         """Make a Selection object the union of two Selection objects
 
Index: scons/distrib.py
===================================================================
--- scons/distrib.py    (revision 3340)
+++ scons/distrib.py    (working copy)
@@ -31,7 +31,6 @@
 from version import version
 
 
-
 def gpg_sign(target, source, env):
     """Builder action for creating a GPG signature of the binary 
distribution file."""
 
Index: scons/manuals.py
===================================================================
--- scons/manuals.py    (revision 3340)
+++ scons/manuals.py    (working copy)
@@ -31,7 +31,6 @@
 from version import version
 
 
-
 def clean_manual_files(target, source, env):
     """Builder action for removing the temporary manual files."""
 
Index: sample_scripts/remap.py
===================================================================
--- sample_scripts/remap.py     (revision 3340)
+++ sample_scripts/remap.py     (working copy)
@@ -2,6 +2,7 @@
 
 from Numeric import Float64, array
 
+
 def remap(values):
     """Remapping function."""
 
Index: sample_scripts/relax_curve_diff.py
===================================================================
--- sample_scripts/relax_curve_diff.py  (revision 3340)
+++ sample_scripts/relax_curve_diff.py  (working copy)
@@ -33,7 +33,6 @@
 # The relax data storage object.
 
 
-
 def back_calc(name):
     """Back calculate the peak intensities.
 
Index: test_suite/unit_tests/generic_fns/test_pipes.py
===================================================================
--- test_suite/unit_tests/generic_fns/test_pipes.py     (revision 3340)
+++ test_suite/unit_tests/generic_fns/test_pipes.py     (working copy)
@@ -30,10 +30,10 @@
 from relax_errors import RelaxError, RelaxNoRunError, RelaxRunError
 
 
-
 class Test_pipes(TestCase):
     """Unit tests for the functions of the 'generic_fns.pipes' module."""
 
+
     def setUp(self):
         """Set up for all the data pipe unit tests."""
 
Index: test_suite/unit_tests/generic_fns/test_residue.py
===================================================================
--- test_suite/unit_tests/generic_fns/test_residue.py   (revision 3340)
+++ test_suite/unit_tests/generic_fns/test_residue.py   (working copy)
@@ -30,10 +30,10 @@
 from relax_errors import RelaxError, RelaxNoRunError, RelaxRunError, 
RelaxSpinSelectDisallowError
 
 
-
 class Test_residue(TestCase):
     """Unit tests for the functions of the 'generic_fns.residue' module."""
 
+
     def setUp(self):
         """Set up for all the residue unit tests."""
 
Index: test_suite/unit_tests/generic_fns/test_selection.py
===================================================================
--- test_suite/unit_tests/generic_fns/test_selection.py (revision 3340)
+++ test_suite/unit_tests/generic_fns/test_selection.py (working copy)
@@ -32,6 +32,7 @@
 class Test_selection(TestCase):
     """Unit tests for the functions of the 'generic_fns.selection' module."""
 
+
     def setUp(self):
         """Set up some residues and spins for testing their selection and 
deselection."""
 
@@ -305,6 +306,7 @@
         # Test loop length.
         self.assertEqual(i, 5)
 
+
     def test_reverse(self):
         """Test spin system selection reversal.
 
Index: test_suite/unit_tests/maths_fns/test_chi2.py
===================================================================
--- test_suite/unit_tests/maths_fns/test_chi2.py        (revision 3340)
+++ test_suite/unit_tests/maths_fns/test_chi2.py        (working copy)
@@ -31,6 +31,7 @@
 class Test_chi2(TestCase):
     """Unit tests for the maths_fns.chi2 relax module."""
 
+
     def setUp(self):
         """Create a number of objects for the calculation and testing of the 
chi-squared equations."""
 
Index: test_suite/unit_tests/test_float.py
===================================================================
--- test_suite/unit_tests/test_float.py (revision 3340)
+++ test_suite/unit_tests/test_float.py (working copy)
@@ -31,6 +31,7 @@
 NEG_FLOAT_EPSILON = -FLOAT_EPSILON
 NEG_FLOAT_NORMAL =  -FLOAT_NORMAL
 
+
 def makeDictById(elements):
     result ={}
     for element in elements:
@@ -38,6 +39,7 @@
 
     return result
 
+
 def winnowDictToListById(dict,elements):
     resultDict = copy(dict)
 
@@ -70,6 +72,7 @@
         for (fpClass, value) in zip(i,i):
             self.assertEqual(fpClass, getFloatClass(value))
 
+
     def test_isZero(self):
         positives = (ZERO,NEG_ZERO)
         negatives= winnowDictToListById(self.tests,positives)
Index: test_suite/unit_tests/unit_test_runner.py
===================================================================
--- test_suite/unit_tests/unit_test_runner.py   (revision 3340)
+++ test_suite/unit_tests/unit_test_runner.py   (working copy)
@@ -253,6 +253,8 @@
     def __init__(self,e,module):
         self.e=e
         self.module=module
+
+
     def __str__(self):
         result = self.e.__str__()
         result = result + '\n\n***WARNING: no tests from module %s will be 
run!!!' % self.module
@@ -263,10 +265,12 @@
         super(ImportErrorTestCase,self).__init__('testImportError')
         self.syntax_error=syntax_error
 
+
     def testImportError(self):
         raise self.syntax_error
         #self.fail(self.syntax_error.__str__())
 
+
 def load_test_case(package_path,  module_name, class_name):
     ''' load a testCase from the file system using a package path, file name
         and class name
@@ -355,6 +359,7 @@
     suite = unittest.TestSuite()
     '''the root test suite to which testSuites and cases are added'''
 
+
     def __init__(self, root_path=None, pattern_list=[PY_UNIT_TEST_PATTERN]):
         ''' Initialise the unit test finder.
 
@@ -376,8 +381,6 @@
         self.paths_scanned = False
 
 
-
-
     def scan_paths(self):
         '''Scan directories and paths for unit test classes and load them 
into TestSuites
 
@@ -470,6 +473,7 @@
                 the module to be searched for would be test_float.Test_float.
     '''
 
+
     def __init__(self, root_path=os.curdir, test_module=None, 
search_for_root_path=True,
                   search_for_unit_test_path=True, verbose = False):
         '''Initialise the unit test runner.
@@ -579,12 +583,6 @@
         self.verbose = verbose
 
 
-
-
-
-
-
-
     def get_first_instance_path(self, path, target_path, 
offset_path=os.curdir):
         '''Get the minimal path searching up the file system to 
target_directory.
 
@@ -644,7 +642,6 @@
         return result
 
 
-
     def paths_from_test_module(self, test_module):
         '''Determine the possible paths of the test_module.
 
@@ -718,9 +715,6 @@
         return result
 
 
-
-
-
     def run(self, runner=None):
         '''Run a unit test or set of unit tests.
 
Index: test_suite/system_tests/main.py
===================================================================
--- test_suite/system_tests/main.py     (revision 3340)
+++ test_suite/system_tests/main.py     (working copy)
@@ -42,6 +42,7 @@
 class System_tests:
     """The system/functional tests component of the relax test suite."""
 
+
     def __init__(self, relax):
         """The relax system/functional tests.
 
@@ -238,7 +239,6 @@
         return global_pass
 
 
-
     def exec_tests(self, test_array):
         """Function for running the tests."""
 
Index: float.py
===================================================================
--- float.py    (revision 3340)
+++ float.py    (working copy)
@@ -136,9 +136,11 @@
 CLASS_POS_ZERO =  256
 CLASS_NEG_ZERO = 512
 
+
 def isZero(float):
     return isMantissaAllZeros(float) and isExpAllZeros(float)
 
+
 def getFloatClass(float):
     ''' get the ieee-class (nan,inf etc) of apython float
 
@@ -256,6 +258,7 @@
 
     return packed
 
+
 def floatAsByteArray(obj):
     ''' unpack a python float as a list of 8 bytes
 
@@ -279,7 +282,6 @@
     return list(bytes)
 
 
-
 def getSignBit(obj):
     ''' get the sign bit from a python float
 
@@ -298,6 +300,7 @@
     # grab last byte and check if sign bit is set
     return unpacked[7]  & SIGNBIT
 
+
 def isPositive(obj):
     ''' test if a a pyhton float is positive
 
@@ -314,6 +317,7 @@
     else:
         return True
 
+
 def isNegative(obj):
     ''' test if a a pyhton float 64 bit ieee-74 double is negative
 
@@ -326,7 +330,6 @@
     return not isPositive(obj)
 
 
-
 def areUnordered(obj1,obj2):
     ''' test to see if two python float  are unordered
 
@@ -372,6 +375,7 @@
 
     return result
 
+
 def copySign(fromNumber,toDouble):
     ''' copy the sign bit from one python float  to another
 
@@ -438,10 +442,6 @@
     return result
 
 
-
-
-
-
 def getMantissaBytes(obj):
     ''' get the 7 bytes that makeup the mantissa of float
 
@@ -467,6 +467,7 @@
     # remove the exponent bytes that can be removed
     return bytes[:7]
 
+
 def getExponentBytes(obj):
     ''' get the 2 bytes that makeup the exponent of a float
 
@@ -496,8 +497,6 @@
     return bytes[6:]
 
 
-
-
 def isExpAllZeros(obj):
     ''' check if the bits of the exponent of a float is zero
 
@@ -518,6 +517,7 @@
 
     return result
 
+
 def isMantissaAllZeros(obj):
     ''' check if the bits of the mantissa of a float is zero
 
@@ -540,6 +540,7 @@
 
     return result
 
+
 def isExpAllOnes(obj):
     ''' check if the bits of the exponent of a floatis all 1 bits
 
@@ -561,6 +562,7 @@
 
     return result
 
+
 def isNaN(obj):
     ''' check to see if a python float is an ieee-754 double not a number 
(nan)
 
@@ -594,6 +596,7 @@
         #    result = True
     return result
 
+
 def isInf(obj):
     ''' check to see if a python float is an infinity
 
@@ -626,6 +629,7 @@
 
     return result
 
+
 def isPosInf(obj):
     ''' check to see if a python float is positive infinity
 
Index: data/mol_res_spin.py
===================================================================
--- data/mol_res_spin.py        (revision 3340)
+++ data/mol_res_spin.py        (working copy)
@@ -38,6 +38,7 @@
 class SpinContainer(Prototype):
     """Class containing all the spin system specific data."""
 
+
     def __init__(self, spin_name=None, spin_num=None, select=1):
         """Set up the default objects of the spin system data container."""
 
@@ -78,6 +79,7 @@
 class SpinList(list):
     """List type data container for spin system specific data."""
 
+
     def __init__(self):
         """Set up the first spin system data container."""
 
@@ -117,6 +119,7 @@
 class ResidueContainer(Prototype):
     """Class containing all the residue specific data."""
 
+
     def __init__(self, res_name=None, res_num=None):
         """Set up the default objects of the residue data container."""
 
@@ -159,6 +162,7 @@
 class ResidueList(list):
     """List type data container for residue specific data."""
 
+
     def __init__(self):
         """Set up the first residue data container."""
 
@@ -198,6 +202,7 @@
 class MoleculeContainer(Prototype):
     """Class containing all the molecule specific data."""
 
+
     def __init__(self, mol_name=None):
         """Set up the default objects of the molecule data container."""
 
@@ -239,6 +244,7 @@
 class MoleculeList(list):
     """List type data container for the molecule specific data."""
 
+
     def __init__(self):
         """Set up the first molecule data container."""
 
Index: data/__init__.py
===================================================================
--- data/__init__.py    (revision 3340)
+++ data/__init__.py    (working copy)
@@ -40,6 +40,7 @@
     # The current data pipe.
     current_pipe = None
 
+
     def __repr__(self):
         """The string representation of the object.
 
Index: data/pipe_container.py
===================================================================
--- data/pipe_container.py      (revision 3340)
+++ data/pipe_container.py      (working copy)
@@ -34,6 +34,7 @@
 class PipeContainer(Prototype):
     """Class containing all the program data."""
 
+
     def __init__(self):
         """Set up all the PipeContainer data structures."""
 
Index: data/diff_tensor.py
===================================================================
--- data/diff_tensor.py (revision 3340)
+++ data/diff_tensor.py (working copy)
@@ -30,7 +30,6 @@
 from relax_errors import RelaxError
 
 
-
 def dependency_generator(diff_type):
     """Generator for the automatic updating the diffusion tensor data 
structures.
 
@@ -374,6 +373,7 @@
 class DiffTensorSimList(ListType):
     """Empty data container for Monte Carlo simulation diffusion tensor 
data."""
 
+
     def __init__(self, param_name, diff_element):
         """Initialise the Monte Carlo simulation parameter list.
 
Index: data/prototype.py
===================================================================
--- data/prototype.py   (revision 3340)
+++ data/prototype.py   (working copy)
@@ -31,6 +31,7 @@
 class Prototype(object):
     """Base class implementing the prototype design pattern."""
 
+
     def __deepcopy__(self, memo):
         """Replacement deepcopy method."""
 
Index: minimise/line_search/more_thuente.py
===================================================================
--- minimise/line_search/more_thuente.py        (revision 3340)
+++ minimise/line_search/more_thuente.py        (working copy)
@@ -264,7 +264,6 @@
         Ik = copy.deepcopy(Ik_new)
 
 
-
 def print_data(text, k, a, Ik, Ik_lim):
     """Temp func for debugging."""
 
Index: minimise/line_search/backtrack.py
===================================================================
--- minimise/line_search/backtrack.py   (revision 3340)
+++ minimise/line_search/backtrack.py   (working copy)
@@ -23,6 +23,7 @@
 
 from Numeric import dot
 
+
 def backtrack(func, args, x, f, g, p, a_init=1.0, rho=0.5, c=1e-4, 
max_iter=500):
     """Backtracking line search.
 
Index: minimise/line_search/nocedal_wright_interpol.py
===================================================================
--- minimise/line_search/nocedal_wright_interpol.py     (revision 3340)
+++ minimise/line_search/nocedal_wright_interpol.py     (working copy)
@@ -26,6 +26,7 @@
 from interpolate import cubic_ext, quadratic_fafbga
 quadratic = quadratic_fafbga
 
+
 def nocedal_wright_interpol(func, args, x, f, g, p, a_init=1.0, mu=0.001, 
print_flag=0):
     """A line search algorithm based on interpolation.
 
Index: minimise/line_search/nocedal_wright_wolfe.py
===================================================================
--- minimise/line_search/nocedal_wright_wolfe.py        (revision 3340)
+++ minimise/line_search/nocedal_wright_wolfe.py        (working copy)
@@ -26,6 +26,7 @@
 from interpolate import cubic_ext, quadratic_fafbga
 quadratic = quadratic_fafbga
 
+
 def nocedal_wright_wolfe(func, func_prime, args, x, f, g, p, a_init=1.0, 
max_a=1e5, mu=0.001, eta=0.9, tol=1e-10, print_flag=0):
     """A line search algorithm implemented using the strong Wolfe conditions.
 
Index: minimise/line_search/interpolate.py
===================================================================
--- minimise/line_search/interpolate.py (revision 3340)
+++ minimise/line_search/interpolate.py (working copy)
@@ -23,6 +23,7 @@
 
 from Numeric import sqrt
 
+
 def cubic_int(a, b, fa, fb, ga, gb):
     """Cubic interpolation using f(a), f(b), g(a), and g(b).
 
Index: minimise/line_search/test_functions.py
===================================================================
--- minimise/line_search/test_functions.py      (revision 3340)
+++ minimise/line_search/test_functions.py      (working copy)
@@ -28,6 +28,7 @@
 
 from more_thuente import more_thuente
 
+
 def run():
     print "\n\n\n\n\n\n\n\n\n\n\n\n\t\t<<< Test Functions >>>\n\n\n"
     print "\nSelect the function to test:"

Related Messages


Powered by MHonArc, Updated Sun Jul 15 12:03:02 2007