I have two arrays in NumPy
a = np.array([])
b = np.array([])
These arrays are being populated throughout the code with cohesive values. But now I want to delete elements from both arrays where values in a are greater than the number 5.
I guess it's something like
a = a[~a>5]
but I don't know how to delete the element with exact same index in the array b.
ix = a <= 5and thena = a[ix]andb = b[ix](or do it in one linea = a[a <= 5]