Skip to content

Fix runtime exception in MapKeyToVector sample. #3287

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

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ private class DataPoint

private class TransformedData : DataPoint
{
public uint[] TimeframeVector { get; set; }
public uint[] CategoryVector { get; set; }
public float[] TimeframeVector { get; set; }
Copy link
Member Author

Choose a reason for hiding this comment

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

the other option is leave it as uint[] but add another transform in the pipeline that converts these column types from float to uint but this is not currently possibly because we don't have float to uint converter in Conversions.cs but of course that can be added and we can use C#'s convention for conversion to uint by casting.

CC: @TomFinley

Copy link
Contributor

Choose a reason for hiding this comment

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

I think changing the type is appropriate -- this is a key-to-vector sample, the output type of key-to-vector is a float vector, so, this change seems appropriate at least to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @TomFinley

public float[] CategoryVector { get; set; }
}
}
}