Skip to content
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

Add DateTime to DateTime standard conversion. #4273

Merged
merged 2 commits into from
Oct 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Microsoft.ML.Data/Data/Conversion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ private Conversions()
AddStd<DT, I8>(Convert);
AddStd<DT, R4>(Convert);
AddStd<DT, R8>(Convert);
AddStd<DT, DT>(Convert);
AddAux<DT, SB>(Convert);

AddStd<DZ, I8>(Convert);
Expand Down Expand Up @@ -1673,5 +1674,9 @@ public void Convert(in TX src, ref SB dst)
public void Convert(in BL src, ref R8 dst) => dst = System.Convert.ToDouble(src);
public void Convert(in BL src, ref BL dst) => dst = src;
#endregion FromBL

#region ToDT
public void Convert(in DT src, ref DT dst) => dst = src;
Copy link
Member

@codemzs codemzs Oct 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public void Convert(in DT src, ref DT dst) => dst = src; [](start = 8, length = 56)

Does not have test coverage as per https://codecov.io/gh/dotnet/machinelearning/pull/4273/diff #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a unit test for the new DateTime to DateTime conversion method.


In reply to: 330341048 [](ancestors = 330341048)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, PH!


In reply to: 330650008 [](ancestors = 330650008,330341048)

#endregion ToDT
}
}