Skip to content

Issue of Int object is not iterable #1

@sureshgautam

Description

@sureshgautam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions