예제 #1
0
        def convert(value):
            if value is None:
                raise TypeError("None is not allowed.")
            else:
                valueForConversion = value
                if isinstance(value, JavaObject):
                    valueForConversion = list(value)

                return TypeConverters.toListString(valueForConversion)
예제 #2
0
 def convert(value):
     package = getattr(_jvm().ai.h2o.sparkling.ml.params, "H2OAlgoParamsHelper$")
     return [e for e in
             package.__getattr__("MODULE$").getValidatedEnumValues(enumClass, TypeConverters.toListString(value),
                                                                   nullEnabled)]