0

What would be a numpy function that goes through array a and then output the indexes where values of array b is allocated.

Code:

a = np.array(["BTCUSD", "ETHUSDC", "BBB", "ETHUSD", "cow"])
b=  np.array(["BTCUSD", "ETHUSD"])

Expected output:

Indexes: 0, 3
tony selcuk
  • 699
  • 1
  • 8

1 Answers1

0
phraseIndex = np.where(a == phrase)

w3 Schools

Stack Overflow

NumPy Docs

yeeshue99
  • 228
  • 1
  • 8