First of all, wonderful contribrituion to solve portfolio optimization using GA!
During implementation, found issue with 'int object is not iterable' while executing next_generation in Task#10. Saw issue duteto sum(chk), where chk is an integer variable in the scope and used in sum function, which except list, tuple, dict, or arrey as its input. I applied the fix by removing sum (Original: if sum(chk)>0 Change: if chk>0:) in the next_generation function, however, please verify and fix your code base, or reject if I missed anything in which context fix is not required.
PS:
ipython notebook was executed in the google colab environment.
After applying the changes, solution works fine as per requirements.
First of all, wonderful contribrituion to solve portfolio optimization using GA!
During implementation, found issue with 'int object is not iterable' while executing next_generation in Task#10. Saw issue duteto sum(chk), where chk is an integer variable in the scope and used in sum function, which except list, tuple, dict, or arrey as its input. I applied the fix by removing sum (Original: if sum(chk)>0 Change: if chk>0:) in the next_generation function, however, please verify and fix your code base, or reject if I missed anything in which context fix is not required.
PS:
ipython notebook was executed in the google colab environment.
After applying the changes, solution works fine as per requirements.