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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -