Make cov and cor similar to mean and var by removing keyword arguments. #13465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #13081 and the type instability that motivated that issue.
I think it is actually quite rare that users would like to provide a precalculated mean and when they do, they would like maximum performance which they wouldn't get from a keyword argument function anyway. Since precalculated means are rare, I have also chosen not to export
covm
andcorm
.It is probably more likely that someone would like the uncorrected version of the covariance, but it is not hard to get without the keyword argument.
The dimension keyword is simply too inconsistent with what we are doing for
mean
,var
,sum
etc.I've also moved the documentation to the method definitions and split it out on the individual methods.