added test case for `smooth=True`
thanks to @jaimefrio, using argpartition() instead of argsort() since only the two closest values are needed, eliminated duplicated sort