Skip to content

Commit

Permalink
version 2.6.1
Browse files Browse the repository at this point in the history
and fixed test for Python 2
  • Loading branch information
nikohansen committed Nov 20, 2018
1 parent 19977e8 commit 9ab73ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
# fcts = ff # historical reasons only, replace cma.fcts with cma.ff first

__author__ = 'Nikolaus Hansen'
__version__ = "2.6.0 $Revision: 4423 $ $Date: 2018-04-25 16:34:52 +0200 (Wed, 25 Apr 2018) $"
__version__ = "2.6.1 $Revision: 4424 $ $Date: 2018-11-18 20:02:58 +0100 (Sun, 18 Nov 2018) $"
# $Source$ # according to PEP 8 style guides, but what is it good for?
# $Id: __init__.py 4423 2018-04-25 14:34:52Z hansen $
# $Id: __init__.py 4424 2018-11-18 19:02:58Z hansen $
# bash $: svn propset svn:keywords 'Date Revision Id' __init__.py
4 changes: 2 additions & 2 deletions cma/optimization_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def contour_data(fct, x_range, y_range):
>>> x0 = np.zeros(22)
>>> indices_to_vary = [2, 4]
>>> f2 = cma.fitness_transformations.FixVariables(fd,
... {i: x0[i] for i in range(len(x0))
... if i not in indices_to_vary})
... dict((i, x0[i]) for i in range(len(x0))
... if i not in indices_to_vary))
>>> isinstance(f2, cma.fitness_transformations.FixVariables)
True
>>> isinstance(f2, cma.fitness_transformations.ComposedFunction)
Expand Down
2 changes: 1 addition & 1 deletion cma/utilities/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class DictClass(dict):
"""A class wrapped over `dict` to use class .-notation.
>>> from cma.utilities.utils import DictClass
>>> dict_ = {3 * c: c for c in 'abcd'}
>>> dict_ = dict((3 * c, c) for c in 'abcd')
>>> as_class = DictClass(dict_)
>>> assert as_class.__dict__ == dict_ == as_class
>>> assert as_class.aaa == 'a'
Expand Down

0 comments on commit 9ab73ea

Please sign in to comment.