refactor: as-double-array
SortedQueue and sorted-queue
scipy-compatible medfilt with tests