-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
MAINT: Deprecate numpy matrix conversion functions #4238
MAINT: Deprecate numpy matrix conversion functions #4238
Conversation
Could you a note in both:
|
Move implementation of from_numpy_matrix to from_numpy_array.
ebbef3a
to
5c507df
Compare
It looks like you will manually need to redo 0d0ebe0, since it is keeping the reformatted text and black is fine w/ it either way. I prefer the shorter lines here and the reformatting isn't relevant for this PR. |
The style from 0d0ebe0 is the one that the current version of black (20.8b1) gives me. I overrode it manually and pushed in df7e11a, but that fails CI (it fails for me locally with the pre-commit checks too). |
df7e11a
to
b6d2f6c
Compare
Hello @rossbar! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-10-07 01:46:40 UTC |
This LGTM. Two final minor suggestions:
to
now that we allow 88 characters per line.
(This was added years ago.) Should we remove those two lines, since |
Yup - good suggestions! I also un-special-cased a line in the dtype-to-pytype dictionary. |
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 looks good to me. :}
* DEP: Deprecate to/from_numpy_matrix. Move implementation of from_numpy_matrix to from_numpy_array. * TST: Add tests and warnings filters for deprecations. * DOC: Add deprecation notes. * STY: fix autofmt'd lines in conftest. * MAINT: apply suggestions from code review.
Adds deprecation warnings + associated tests to
to_numpy_matrix
andfrom_numpy_matrix
.Originally,
from_numpy_array
as simply a pass-through function callingfrom_numpy_matrix
. Re-organized so thatfrom_numpy_matrix
is now the pass-through, and the implementation is infrom_numpy_array
to make the removal easier down the road.Added tests to ensure the deprecation warnings are raised, and warnings filters to suppress warnings related to
to/from_numpy_matrix
in the remainder of the test suite.