python - How to get an index for an element in numpy array? -


if have:

a = np.array(['a','b','c','d']) 

how index letter 'c'?

np.where find positions:

> np.where(a == 'c')[0][0] 2 

Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -