📌  相关文章
📜  在数组python代码示例中找到最接近的较小值

📅  最后修改于: 2022-03-11 14:45:09.561000             🧑  作者: Mango

代码示例1
>>> # 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