Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get index of value in list if value meet condition python

>>> import numpy as np
>>> a = np.array([1, 2, 3, 1, 2, 3])
>>> np.where(a > 2)[0]
[2 5]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #index #list #meet #condition #python
ADD COMMENT
Topic
Name
4+1 =