-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix Numpy and Scipy deprecation warnings #163
Conversation
Thanks a lot! Changes look good. Could you run the linter too, so the CI pipeline passes? Probably just some whitespace |
I made some changes, but this is all new to me so I hope that I correctly addressed your concerns. While introducing myself to pylint and PEP-8, I noticed that many locations may not comply with PEP-8 (mostly regarding naming conventions and unused variables). P.S. The major issue was that the usage of lambdas is not permitted. That was a surprise to me... |
Made changes that I hope will fix the formatting issues and ran the following checks which resulted in no error:
P.S. Sorry for the iterative process for something that should be trivial... I am learning something new here with flake8 and black. |
Hi @yanbomb Looks like black is getting caught on the lack of empty lines before & after the nested functions. She's a stickler for the rules ;) An example from the diff:
Dunno why the Windows tests are passing, but that should help you get the PEP8 stuff cleared up. |
Nice! I triggered the tests and it all looks good, I'll leave for Tommy to merge. |
Should I click the "close with comment" button to close this PR? |
Nope, you're all good. Tommy will have the final say & merge. He may want to bump the version for a new release to PyPI. |
* Fix Numpy and Scipy deprecation warnings (#163) * fix numpy deprecation (product to prod) * fix numpy deprecation (brentq) * fix numpy deprecation (quad/nquad) * changes to meet PEP-8 * Fix flake8 and black formatting errors * Bump version to 1.1.9 (#164) Co-authored-by: tommyod <tommy.odland> * Update build.yml with pypi API token (#165) * Update build.yml with pypi API token * Remove push condition * Replaced numpy.asfarray with numpy.asarray using the proper dtype. (#169) * Replaced numpy.asfarray with numpy.asarray using the proper dtype. * Newer version of numpy return np.True_ instead of True. Changed this in two doctests. * Changed to correct dtype from int32 to long. Changed doctest to use assert --------- Co-authored-by: skrylow <[email protected]> * Version 1.1.10 with numpy 2.0 support (#171) --------- Co-authored-by: yanbomb <[email protected]> Co-authored-by: SergejKr <[email protected]> Co-authored-by: skrylow <[email protected]>
Fix Numpy and Scipy deprecation warnings.
Changes:
Setup:
Verification:
I ran pytest and got 573 passed tests; 0 failues; 43 skipped (also ran these tests; all passed); 94 warnings. The warning are related to: a) Silverman and Scott methods with multiples weights (92 warnings), b) datetime deprecation (does not seem to be related to KDEpy)
Note:
There is another instance of brentq in bw_selection.py that did not emit warnings during testing. Code was left as is, but more testing could eventually reveal additional deprecation warnings. The easy fix would be to wrap the function using a lambda function: