Skip to content

Conversation

brianbreitsch
Copy link
Contributor

This is a fix for the problem addressed in this issue: #16

This will enable Python 3 users to use Lightning without getting errors when plotting.
The errors were due to the difference between the ways Python 2 and Python 3 handle the range built-in. Python 2 range returns an actual container of values, whereas Python 3 range returns an iterator object. By casting range to list, it forces Python 3 to create a container for the values of the range iterator, while Python 2 will behavior remains the same.

@freeman-lab freeman-lab changed the title Cast ranges to lists on lines 117 and 257 of types.py to add Python 3 su... Cast ranges to lists for force and adjacency plots May 2, 2015
@freeman-lab
Copy link
Member

This LGTM, will merge in. Just modified the title to make it a little shorter. Thanks for the contribution @brianbreitsch !

freeman-lab added a commit that referenced this pull request May 2, 2015
Cast ranges to lists for force and adjacency plots
@freeman-lab freeman-lab merged commit dae0a20 into lightning-viz:master May 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants