nchammas commented on a change in pull request #34671:
URL: https://github.com/apache/spark/pull/34671#discussion_r754560349
##########
File path: python/pyspark/mllib/_typing.pyi
##########
@@ -16,8 +16,11 @@
# specific language governing permissions and limitations
# under the License.
-from typing import List, Tuple, Union
+from typing import List, Tuple, TypeVar, Union
from pyspark.mllib.linalg import Vector
from numpy import ndarray # noqa: F401
+from py4j.java_gateway import JavaObject
VectorLike = Union[ndarray, Vector, List[float], Tuple[float, ...]]
+C = TypeVar("C", bound=type)
+JavaObjectType = Union[JavaObject, bytearray, bytes]
Review comment:
OK, will do. I originally had it inlined but created the alias since
it's used in 4 different places in `mllib/common.py`.
--
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]