Find the second closest index to value

前端 未结 0 1023
死守一世寂寞
死守一世寂寞 2021-02-09 09:26

I am using

index = (np.abs(array - value)).argmin()

to find the index in an array with the smallest absolute difference to a value.

How

相关标签:
回答
  • 消灭零回复
提交回复
热议问题