-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Doctest failure for PowerTransformer on mac? #12584
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
Comments
I can reproduce on Windows 10, so seems that it's not trivial.
|
Maybe we should also run doctests on Appveyor. |
I believe we cannot easily run the doctests on windows because of difference in the way the numpy array dtypes are displayed on windows and reworking the doctests to make them platform agnostic would be too tedious and hurt readability of the documentation. I think we should consider that the goal of the doctests is only to test that the examples in the documentation are up to date with the code. Checking that the code runs correctly on all platform should be the responsibility of the regular test suite. |
Back to the original issue, a small change on one of the values of the second feature can impact lambda significantly. On my Linux machine where the doctest pass, I observe the following: >>> PowerTransformer().fit([[1, 2], [3, 2], [4, 5]]).lambdas_
array([ 1.38668178, -3.10053309])
>>> PowerTransformer().fit([[
8000
1, 2], [3, 2], [4, 5 + 1e-15]]).lambdas_
array([ 1.38668178, -3.10053336]) So I believe this doctest should use an ellipsis. |
You're right, though I need some time to figure out the differences across different platforms. |
I edited my previous comment because I had not completed my sentence... |
I pushed a fix in #12595. |
Subsequent to #12522 it seems I get the following test failure when running on my own machine. @NicolasHug is this level of imprecision surprising?
show_versions
The text was updated successfully, but these errors were encountered: