I would like to return numbers from a list which are closer to each other than a treshold. I can do that with this script, but i'm looking for a faster solution. Is it possible with NumPy or SciPy?

```
mylist = [2, 4, 54, 43, 43, 3]

for i in range(len(mylist)):
    for j in range(i + 1, len(mylist)):
        closer_than = 2
        if mylist[i] < mylist[j] + closer_than and mylist[i] > mylist[j] - closer_than:
            print("close values:", mylist[i], mylist[j])    

```