-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP: type annotations for nancorr #44227
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
TYP: type annotations for nancorr #44227
Conversation
cov: bool = ..., | ||
minp=..., | ||
) -> np.ndarray: ... # ndarray[float64_t, ndim=2] | ||
minp: int | None = ..., |
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.
we may pass None from pandas/core/frame.py:9667. base_cov = libalgos.nancorr(mat, cov=True, minp=min_periods)
In nancorr_spearman we don't allow None
, if not specified, the default is 1, specified in the function signature.
The default is also 1 in nancorr, coded if None which is the signature default.
Not sure whether this inconsistency is a big deal.
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.
could open an issue about this
minp: int = ..., | ||
) -> np.ndarray: ... # ndarray[float64_t, ndim=2] | ||
def nancorr_kendall( |
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 was removed in #43403
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
mat: np.ndarray, # ndarray[float64_t, ndim=2] | ||
minp: int = ..., | ||
) -> np.ndarray: ... # ndarray[float64_t, ndim=2] | ||
) -> npt.NDArray[np.float64]: ... # ndarray[float64_t, ndim=2] |
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.
have you heard anything about if/when/how npt.NDArray is going to support something equivalent to ndim=2
?
No description provided.