I am trying to obtain only those columns of a matrix that satisfy two or more boolean conditions. More specifically, I am trying to find only those eigenvectors of a matrix based on certain constraints on the eigenvalues.
In python3.x I would do :
def get_special_vectors(A:np.ndarray,thresold1:float,thresold2:float) -> np.ndarray:
eigval, eigvec = np.linalg.eig(A)
eigvec = eigvec[:,np.array(eigval >= threshold1) & np.array(eigval <= thresold2)]
return eigvec
However in Julia, I am following this post but I seem to be messing up the AND (&) operator. I'm trying the following that results in a MethodError:
eigvec = eigvec[:,vec(evalA .< 1.0) & vec(evalA .> 0)]
I'll be glad if someone can share any useful suggestions or any kind of help. Thanks in advance!