-
Notifications
You must be signed in to change notification settings - Fork 138
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
run tests in ci #59
run tests in ci #59
Conversation
917eeaa
to
464da71
Compare
Yes... the tests are still an issue... :/ |
Subset of tests actually do pass on 2.7 and I think the same subset should also pass on 3.5+ once the python3 PR is merged. |
5be7660
to
0992ab3
Compare
7fa04f9
to
22cd241
Compare
0992ab3
to
749a232
Compare
22cd241
to
b27cd84
Compare
749a232
to
8739d25
Compare
b27cd84
to
d689acf
Compare
@loli tests now passing. I had to add an eps to some code for python3 compat in round calls. |
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside the single comment all looks perfect. Thanks again! And sorry I am responding with such delays - currently I do not have much free time at my hand.
But would love to see an official P3 release!
medpy/filter/houghtransform.py
Outdated
@@ -192,7 +193,8 @@ def template_ellipsoid (shape): | |||
A boolean array containing an ellipsoid. | |||
""" | |||
# prepare template array | |||
template = numpy.zeros([int(round(x / 2.)) for x in shape], dtype=numpy.bool) # in odd shape cases, this will include the ellipses middle line, otherwise not | |||
# we add eps to keep old rounding up behavior | |||
template = numpy.zeros([int(round(x / 2. + 1e-9)) for x in shape], dtype=numpy.bool) # in odd shape cases, this will include the ellipses middle line, otherwise not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a little bit hackish to me. I assume you added the eps to account for the differences in P2 and P3 round() behaviour (banker's rounding vs. to nearest even)?
I think a more elegant solution to the P2 rounding behaviour in P3 would be:
import decimal
decimal.Decimal(x / 2.).quantize(decimal.Decimal('1'), rounding=decimal.ROUND_HALF_UP)
What do you think?
Depends on #58 (cleanup build matrix)Depends on #60 (python 3)