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

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -