-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Merge vonmises into stats pyx #5944
Conversation
One test failure:
|
merging the files make sense to me |
e34a80d
to
8922926
Compare
Should be fixed now. Also rebased on the new #5936. |
Travis is unhappy about some minor doc issues: |
8922926
to
38f65ca
Compare
fixed |
for i in range(len(temp)): | ||
p = <int>(1 + a1 + a2 * temp_ks[i] - a3 / (temp_ks[i] + a4)) | ||
temp[i] = von_mises_cdf_series(temp_ks[i], temp_xs[i], p) | ||
temp[i] = 0 if temp[i] < 0 else 1 if temp[i] > 1 else temp[i] |
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.
Whoa. Can't believe this is legal. I had to read it out loud, then again, and then consult the red-colored part of the diff. This is very cool, but please have some mercy for us mere mortals.
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.
I thought this actually reads quite "intuitively" (as if it was English)?
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.
Well, you can probably attribute my confusion to ESL.
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.
So, do you want me to change this? I think it's more readable than min(max(temp[i], 0), 1)
...
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.
If it were my PR, I would just write out two nested if-then-else clauses. Which is not cute etc. But this is your PR, and I won't hold it for this.
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.
I'll just leave it as it is then, unless someone else objects.
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.
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.
Although this is unlikely to be a bottleneck, it still looks like gratuitiously invoking the Python runtime...
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.
Needs rebase, the other PR was merged. |
38f65ca
to
9ca3d3f
Compare
Done. |
@@ master #5944 diff @@
======================================
Files 238 238
Stmts 43822 43822
Branches 8215 8215
Methods 0 0
======================================
Hit 34251 34251
Partial 2603 2603
Missed 6968 6968
|
Ok, merging. Thanks @anntzer |
Suggested in #5936, only makes sense if that PR is merged first.