zero323 commented on a change in pull request #34513: URL: https://github.com/apache/spark/pull/34513#discussion_r755596954
########## File path: python/pyspark/mllib/stat/_statistics.py ########## @@ -170,10 +190,29 @@ def corr(x, y=None, method=None): if not y: return callMLlibFunc("corr", x.map(_convert_to_vector), method).toArray() else: - return callMLlibFunc("corr", x.map(float), y.map(float), method) + return callMLlibFunc( + "corr", x.map(float), y.map(float), method # type: ignore[arg-type] Review comment: In such case it would be better to `cast` `x`, as we expect it is going to be `RDD[float]`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org