Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 26)
26.
In NumPy, how do you find the indices of elements that satisfy a given condition in an array?
np.index_of(arr, condition)
np.where(condition, arr)
np.find_indices(arr, condition)
np.where(condition)
Answer: Option
Explanation:
The np.where() function in NumPy returns the indices of elements that satisfy a given condition.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.