Scala, Type could not find implicit value for parameter n

scala

Solution

`median` expects a var-arg argument. You could expand the list with `_*` syntax, like this:

import Numeric._
import grizzled.math.stats._

val l = List[Double](123.0, 133.0, 155.0, 166.0, 177.0)
println(median(l: _*))

This compiles and outputs 155.0.

Problem

``` import Numeric._ import grizzled.math.stats._ val l = List[Double](123.0, 133.0, 155.0, 166.0, 177.0) println(median(l)) ``` Above you see an example which describes the usage of the package `grizzled.math.stats` at scala grizzled doc. I am not able to reproduce this simple example. I always get following errors: - could not find implicit value for parameter n: Numeric[Array[Double]] - not enough arguments for method median: (implicit n: Numeric[Array[Double]])Double. Unspecified value parameter n. Any suggestion to resolve this compilation error is welcome. Thank you in advance.

Original source