From 002d7a49c3a57fd0842588081faf78370ab90b11 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Fri, 29 Oct 2021 13:20:05 +0100 Subject: [PATCH] TYP: type annotations for nancorr --- pandas/_libs/algos.pyi | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pandas/_libs/algos.pyi b/pandas/_libs/algos.pyi index 6dd1c7c9fb209..df8ac3f3b0696 100644 --- a/pandas/_libs/algos.pyi +++ b/pandas/_libs/algos.pyi @@ -50,18 +50,14 @@ def kth_smallest( # Pairwise correlation/covariance def nancorr( - mat: np.ndarray, # const float64_t[:, :] + mat: npt.NDArray[np.float64], # const float64_t[:, :] cov: bool = ..., - minp=..., -) -> np.ndarray: ... # ndarray[float64_t, ndim=2] + minp: int | None = ..., +) -> npt.NDArray[np.float64]: ... # ndarray[float64_t, ndim=2] def nancorr_spearman( - mat: np.ndarray, # ndarray[float64_t, ndim=2] + mat: npt.NDArray[np.float64], # ndarray[float64_t, ndim=2] minp: int = ..., -) -> np.ndarray: ... # ndarray[float64_t, ndim=2] -def nancorr_kendall( - 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] # ----------------------------------------------------------------------