I am trying to cut a 1D Array[Double] using the slice method. I wrote a method that returns the start and end index as a tuple (Int,Int) .
def getSliceRange(): (Int,Int) = { val start = ... val end = ... return (start,end) }
How can I use getSliceRange return value directly?
I tried:
myArray.slice.tupled(getSliceRange())
But this gives me compilation-Error:
Error:(162, 13) missing arguments for method slice in trait IndexedSeqOptimized; follow this method with `_' if you want to treat it as a partially applied function myArray.slice.tupled(getSliceRange())
source share