python/pyspark/ml/pipeline.py
def _stages_py2java(py_stages, cls):
    """
    Transforms the parameter of Python stages to a Java array of Java stages.
    :param py_stages: An array of Python stages.
    :return: A Java array of Java Stages.
    """

    for stage in py_stages:
        assert(isinstance(stage, JavaWrapper),
               "Python side implementation is not supported in the meta-PipelineStage currently.")
    gateway = SparkContext._gateway
    java_stages = gateway.new_array(cls, len(py_stages))
    for idx, stage in enumerate(py_stages):
        java_stages[idx] = stage._transfer_stage_to_java()
    return java_stages

    Transforms the parameter of Python stages to a Java array of Java stages.
    :param py_stages: An array of Python stages.
    :return: A Java array of Java Stages.
    
Transforms the parameter of Python stages to a Java array of Java stages.
Transforms the parameter of Python stages to a Java array of Java stages .
def _stages_py2java(py_stages, cls):
    for stage in py_stages:
        assert(isinstance(stage, JavaWrapper),
               "Python side implementation is not supported in the meta-PipelineStage currently.")
    gateway = SparkContext._gateway
    java_stages = gateway.new_array(cls, len(py_stages))
    for idx, stage in enumerate(py_stages):
        java_stages[idx] = stage._transfer_stage_to_java()
    return java_stages
def _stages_py2java ( py_stages , cls ) : for stage in py_stages : assert ( isinstance ( stage , JavaWrapper ) , "Python side implementation is not supported in the meta-PipelineStage currently." ) gateway = SparkContext . _gateway java_stages = gateway . new_array ( cls , len ( py_stages ) ) for idx , stage in enumerate ( py_stages ) : java_stages [ idx ] = stage . _transfer_stage_to_java ( ) return java_stages
Transforms the parameter of Python stages to a Java array of Java stages.
Transforms the parameter of Python stages to a Java array of Java stages .
"""
    Transforms the parameter of Python stages to a Java array of Java stages.
    :param py_stages: An array of Python stages.
    :return: A Java array of Java Stages.
    """
A Java array of Java Stages.
A Java array of Java Stages .
py_stages
An array of Python stages.
An array of Python stages .
cls