Just plugging in the example from documentation gives this error from line derivative(sin, x, 10) # scalar derivative