X-DataInitiative / tick

Module for statistical learning, with a particular emphasis on time-dependent modelling
https://x-datainitiative.github.io/tick/
BSD 3-Clause "New" or "Revised" License
488 stars 106 forks source link

[Minor Fix][download_helper.py] #403

Closed sara-02 closed 5 years ago

sara-02 commented 5 years ago

The line https://github.com/X-DataInitiative/tick/blob/6989fddb7117bdf9b7c9faa284f9d163a1bee140/tick/dataset/download_helper.py#L188 returns a KeyView which being a set-like object cannot be accessed directly via index.

TypeError: 'KeysView' object does not support indexing

A minor fix is need to change it to list/or iterator instead.

key_0  = list(dataset.keys())[0]
stephanegaiffas commented 5 years ago

Yes indeed, can you do a pull request for this ? Plus len(dataset.keys()) should be replaced by len(dataset) Best

sara-02 commented 5 years ago

@stephanegaiffas Sure. Is there a development branch or should I create the PR against the master?

PhilipDeegan commented 5 years ago

master is fine :+1: