claesenm / optunity

optimization routines for hyperparameter tuning
http://www.optunity.net
Other
416 stars 78 forks source link

Python V3 - "zip object not subscriptable" #94

Open RomainCendre opened 6 years ago

RomainCendre commented 6 years ago

I was using for the first time you're module and I got this error: "zip object not subscriptable" in cross_validation.py at line 108

I just replace : return [list(zip(*g)[0]) for _, g in it.groupby(enumerate(labels), op.itemgetter(1))]

By : return [list(zip(*g))[0] for _, g in it.groupby(enumerate(labels), op.itemgetter(1))]

As zip is not accessible by index so from list that's OK.

I'm not sure of my solution, so I let you modify it if it seems acceptable,

Best regards

luded commented 6 years ago

bless you Romain! that worked for me. Thanks