From 330e7bdcbdb9e85e4b48c2c7c54511428f1b1f72 Mon Sep 17 00:00:00 2001 From: Ahmed Gad Date: Thu, 20 Apr 2023 09:35:05 -0400 Subject: [PATCH 1/2] PyGAD 3.0.1 Fix an issue with passing user-defined function/method for parent selection. https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/179 --- __init__.py | 2 +- pygad.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index 71f207b9..316b67c5 100644 --- a/__init__.py +++ b/__init__.py @@ -1,3 +1,3 @@ from .pygad import * # Relative import. -__version__ = "3.0.0" +__version__ = "3.0.1" diff --git a/pygad.py b/pygad.py index 9916a154..b63e6131 100644 --- a/pygad.py +++ b/pygad.py @@ -1747,9 +1747,9 @@ def run(self): # Selecting the best parents in the population for mating. if callable(self.parent_selection_type): - self.last_generation_parents, self.last_generation_parents_indices = self.select_parents(self, - self.last_generation_fitness, - self.num_parents_mating, self) + self.last_generation_parents, self.last_generation_parents_indices = self.select_parents(self.last_generation_fitness, + self.num_parents_mating, + self) if not type(self.last_generation_parents) is numpy.ndarray: self.logger.error("The type of the iterable holding the selected parents is expected to be (numpy.ndarray) but {last_generation_parents_type} found.".format(last_generation_parents_type=type(self.last_generation_parents))) raise TypeError("The type of the iterable holding the selected parents is expected to be (numpy.ndarray) but {last_generation_parents_type} found.".format(last_generation_parents_type=type(self.last_generation_parents))) From 7dac6f05a8f45b83ef8ca8412b333e49610c1380 Mon Sep 17 00:00:00 2001 From: Ahmed Gad Date: Thu, 20 Apr 2023 09:37:48 -0400 Subject: [PATCH 2/2] PyGAD 3.0.1 Documentation --- docs/source/Footer.rst | 11 +++++++++++ docs/source/conf.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/source/Footer.rst b/docs/source/Footer.rst index 6de145e0..54814baf 100644 --- a/docs/source/Footer.rst +++ b/docs/source/Footer.rst @@ -1279,6 +1279,17 @@ Release Date 8 April 2023 operators roulette wheel and stochastic universal. https://github.com/ahmedfgad/GeneticAlgorithmPython/pull/168 +.. _pygad-301: + +PyGAD 3.0.1 +----------- + +Release Date 20 April 2023 + +1. Fix an issue with passing user-defined function/method for parent + selection. + https://github.com/ahmedfgad/GeneticAlgorithmPython/issues/179 + PyGAD Projects at GitHub ======================== diff --git a/docs/source/conf.py b/docs/source/conf.py index 0799f5e7..eca93138 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = 'Ahmed Fawzy Gad' # The full version, including alpha/beta/rc tags -release = '3.0.0' +release = '3.0.1' master_doc = 'index'