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

DM-11454: Modify UnitNormMap to round trip zero-length vectors #25

Merged
merged 2 commits into from Aug 3, 2017

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Aug 1, 2017

Ehnance unit test of UnitNormMap to test transforming position = center.

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Some style comments, otherwise looks good.

[7.0, -23.0, -3.0, 45.0, 0.0],
[fullCenter[0], 1.0, 2.0, -6.0, 30.0, 1.0],
[fullCenter[1], 3.0, 99.0, -5.0, 21.0, 0.0],
[fullCenter[2], -5.0, 3.0, -7.0, 37.0, 0.0],
], dtype=float)[0:nin]
Copy link
Member

Choose a reason for hiding this comment

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

This is kind of hard to follow. Maybe move fullCenter and fullIndata (?) outside the loop, to make it clearer that each iteration only needs a subset?

], dtype=float)[0:nin]
self.checkRoundTrip(unitnormmap, indata)

outdata = unitnormmap.applyForward(indata)
norm = outdata[-1]

# the first input point is at the center, so the expected output
# [Nan, Nan, ..., Nan, 0]
pred_out_at_center = [np.nan] * nin
Copy link
Member

Choose a reason for hiding this comment

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

Try to be consistent in your naming style; I see a mixture of camel-case, underscores, and undelimited names for variables.

Ehnance unit test of UnitNormMap to test transforming position = center.
PolyTran has changed and this broke a test that expected equality;
checking that the results are close is good enough
@r-owen r-owen merged commit 44d35b8 into master Aug 3, 2017
@ktlim ktlim deleted the tickets/DM-11454 branch August 25, 2018 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants