Update nxnk.py
Update nxnk.py

Fix error in add_cycle: was not validating weight as a float for the
closing edge, and needed the "nodes" argument to be a list or indexable.
Now a generator can be used.

acardona/nxnk