Encontre o valor menor mais próximo em uma matriz python

>>> # the smallest element of myArr greater than myNumber
>>> myArr[myArr > myNumber].min()  
44

>>> # the largest element of myArr less than myNumber
>>> myArr[myArr < myNumber].max()
4
Busy Boar