loess
loess copied to clipboard
do not normalize datasets with too less entries
It loess is called with an array less than 4 data-points and normalization is enabled an error occurs in https://github.com/yongjun21/loess/blob/master/src/helpers.js#L12 because math.std can not be called with an empty array. Also it makes no sense for arrays with less than 4 entries.
This fix returns the original array is it has too little entries.