Skip to content

Error when using leftLabels/rightLabels #38

@gbmd

Description

@gbmd

if len(labels > 0):

pretty sure this should be len(labels) > 0...

       df_compare['pred_RF'].values,
       colorDict=colorDict,
       figure_name='visualization/output/sankeytest',
       rightLabels=['C','I','R','P','AUX'])```

yields 

`Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/georg/.local/share/virtualenvs/pvpotential-aZgESz7z/lib/python3.8/site-packages/pySankey/sankey.py", line 119, in sankey
    check_data_matches_labels(leftLabels, df['right'], 'right')
  File "/home/georg/.local/share/virtualenvs/pvpotential-aZgESz7z/lib/python3.8/site-packages/pySankey/sankey.py", line 34, in check_data_matches_labels
    if len(labels >0):
TypeError: '>' not supported between instances of 'str' and 'int'`

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