ankane / prophet-ruby

Time series forecasting for Ruby
MIT License
396 stars 11 forks source link

Seperate key and value when iterating on the hash. #2

Closed nasa42 closed 4 years ago

nasa42 commented 4 years ago

Unlike in the Python code which only iterates over dictornary keys if only one variable is present for the iterator, Ruby iterates over an array of [key, value], which causes @params[par] to be evaluated as nil.

PR #3 contains a test case which executes these lines.

ankane commented 4 years ago

Thanks @nasa42! Looks like #3 should fix it the constant case.