Reputation: 2000
import numpy as np
arr1= np.array([10,20,30,40,50])
arr2= np.array([False, False, True, True, True])
result=arr1[arr2] #[30 40 50]
Having hard time to grasp this. When another numpy array is passed to an existing numpy array, all elements multiplied?
Upvotes: 0
Views: 232