You can use boolean indexing to filter an array based on a condition. Create a boolean array of the same shape as your original array and use it to index the array.
import numpy as np
arr = np.array([1, 2, 3, 4, 5, 6])
condition = arr > 3
filtered_arr = arr[condition]
print(filtered_arr) # Output: [4 5 6]