Skip to content

Timeseries example code is unnecessarily verbose #1479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ganik opened this issue Oct 31, 2018 · 0 comments · Fixed by #1516
Closed

Timeseries example code is unnecessarily verbose #1479

ganik opened this issue Oct 31, 2018 · 0 comments · Fixed by #1516
Assignees

Comments

@ganik
Copy link
Member

ganik commented Oct 31, 2018

v.0.7.0-preview-27031-8:
file: Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs

List tempData = new List();
for (int i = 0; i < size / 2; i++)
tempData.Add(new Data(5));
for (int i = 0; i < size / 2; i++)
tempData.Add(new Data((float)(5 + i * 1.1)));
foreach (var d in tempData)
data.Add(new Data(d.Value));

Simplify the code by removing tempData.

@ganik ganik self-assigned this Oct 31, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant