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

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -