-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
API dim to n_dim in make_sparse_spd_matrix
#27718
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
Conversation
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
dim to `n_dim in make_sparse_spd_matrixdim to n_dim in make_sparse_spd_matrix
Signed-off-by: Adam Li <[email protected]>
glemaitre
left a comment
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.
You need to add a specific test to check the deprecation warning.
You also need a new test for checking that we raise the expected error.
I also saw some other failure, I assume that we were using the dim variable in someway.
| ), | ||
| FutureWarning, | ||
| ) | ||
| n_dim = dim |
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.
do not change n_dim but _n_dim. We should raise an error if a user try to specify both n_dim and dim.
I assume that the time of the deprecation, we need to have n_dim=None to detect explicitely if a user pass n_dim=1 or not. This is annoying but I don't see how to detect this case otherwise. This would not change the default value because None would default to 1. Somehow, we can omit to document it explicitely, and make a more silent deprecation because I don't think that any user will use n_dim=Noe explicitely to set it to 1.
Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]>
Signed-off-by: Adam Li <[email protected]>
glemaitre
left a comment
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.
LGTM on my side. Thanks @adam2392
Co-authored-by: Guillaume Lemaitre <[email protected]>
thomasjpfan
left a comment
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.
Otherwise LGTM
Co-authored-by: Thomas J. Fan <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]> Co-authored-by: Thomas J. Fan <[email protected]>
Reference Issues/PRs
Fixes: #27669
What does this implement/fix? Explain your changes.
Deprecates
dimin place ofn_dim.Any other comments?