-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
make invert-categorical-map
more strict on unknown reverse mapping values
#395
Comments
invert-categorical-map
more strict on unknown reversr mappinginvert-categorical-map
more strict on unknown reverse mapping values
Not sure really what to do here. If you had chosen values that do not round to 0 and 1 you would have gotten an exception, perhaps we should use Math/round as opposed to a pure long cast. |
This looks error prone to me, but not sure what to fix neither.
|
I would expect that the above produces a look up map: |
The issue there is floating point comparison |
This is as well related to the new discussion: |
In order to make categorical mapping related code less brittle,
I think we should check and fail in more situations, one is this one:
The initial mapping was derived as x -> 1 and y -> 0, but the current code happily maps back 0.342.
This should fail in my view, in the same way as
other numbers like 3 and 4 fail: " Unable to find src value for numeric value 0.342"
The text was updated successfully, but these errors were encountered: