this throws a compiler warning:
let ptr = UnsafePointer(array) vDSP_meanvD(ptr + startIdx, 1, &mean, UInt(stopIdx - startIdx))