title: Obtaining columns of a matrix satisfying multiple booleans in Julia
body: <p>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.</p>
  <p>In python3.x I would do :</p>
  <pre class="lang-py prettyprint-override"><code>def get_special_vectors(A:np.ndarray,thresold1:float,thresold2:float) -&gt; np.ndarray:
     eigval, eigvec = np.linalg.eig(A)
     eigvec = eigvec[:,np.array(eigval &gt;= threshold1) &amp; np.array(eigval &lt;= thresold2)]
  return eigvec
  </code></pre>
  <p>However in Julia, I am following <a href="https://stackoverflow.com/questions/29331769/julia-getting-subarray-with-multiple-boolean-comparisons">this</a> post but I seem to be messing up the AND (&amp;) operator. I'm trying the following that results in a <code>MethodError</code>:</p>
  <pre><code>eigvec = eigvec[:,vec(evalA .&lt; 1.0) &amp; vec(evalA .&gt; 0)]
  </code></pre>
  <p>I'll be glad if someone can share any useful suggestions or any kind of help. Thanks in advance!</p>