I'm trying to build an array of an array to give it as a argument to a method. The value of inner arrays are any kind of data (AnyVal) such as Int or Double.
The method's signature is as follows:
def plot[T <: AnyVal](config:Map[String, String], data:Array[Array[T]]): Unit = {
This is the code:
val array1 = (1 to 10).toArray
val array2 = ArrayBuffer[Int]()
array1.foreach { i =>
array2 += (getSize(summary, i))
}
val array3 = new Array[Int](summary.getSize())
val arrays = ArrayBuffer[Array[AnyVal]](array1, array2.toArray, array3) # <-- ERROR1
Gnuplotter.plot(smap, arrays.toArray) # <-- ERROR2
However, I have two errors:
What might be wrong?