Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/5930#discussion_r29789116
--- Diff: mllib/src/main/scala/org/apache/spark/ml/param/params.scala ---
@@ -218,6 +219,18 @@ class BooleanParam(parent: Params, name: String, doc:
String) // No need for isV
override def w(value: Boolean): ParamPair[Boolean] = super.w(value)
}
+/** Specialized version of [[Param[Array[T]]]] for Java. */
+class StringArrayParam(parent: Params, name: String, doc: String, isValid:
Array[String] => Boolean)
+ extends Param[Array[String]](parent, name, doc, isValid) {
+
+ def this(parent: Params, name: String, doc: String) =
+ this(parent, name, doc, ParamValidators.alwaysTrue)
+
+ override def w(value: Array[String]): ParamPair[Array[String]] =
super.w(value)
+
+ private[param] def wCast(value: Seq[String]): ParamPair[Array[String]] =
w(value.toArray)
--- End diff --
Would renaming `wCast` -> `w` work? I think it should compile.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]