Skip to content

Instantly share code, notes, and snippets.

@agentcoops
Created September 8, 2010 22:28
Show Gist options
  • Save agentcoops/570953 to your computer and use it in GitHub Desktop.
Save agentcoops/570953 to your computer and use it in GitHub Desktop.
// From the repl:
scala> val features: Seq[Array[FeatureNode]] = values._2
features: Seq[Array[liblinear.FeatureNode]] = List(Array(FeatureNode(idx=1, value=1.0)), Array(FeatureNode(idx=2, value=1.0)))
scala> features.toArray
res5: Array[Array[liblinear.FeatureNode]] = Array(Array(FeatureNode(idx=1, value=1.0)), Array(FeatureNode(idx=2, value=1.0)))
// But when this is otherwise executed:
[info] null (TraversableOnce.scala:388)
[info] scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:388)
[info] scala.collection.immutable.List.toArray(List.scala:45)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment