zero323 commented on a change in pull request #35380:
URL: https://github.com/apache/spark/pull/35380#discussion_r796712727



##########
File path: python/pyspark/ml/_typing.pyi
##########
@@ -75,3 +78,5 @@ RankingEvaluatorMetricType = Union[
     Literal["ndcgAtK"],
     Literal["recallAtK"],
 ]
+
+VectorLike = Union[ndarray, Vector, List[float], Tuple[float, ...]]

Review comment:
       I am not super happy about adding this here, but unless we plant to 
revisit something like #14263, it is probably the way to go.
   
   I was thinking about `np.typing.ArrayLike`, but we'd still need unions with 
our vectors, and it has much bigger impact on the hints, than simply changing 
the the alias.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to