improve linear search for KNN efficiency w/ NumPY
<p>I am trying to calculate the distance of each point in the testing set from each point in the training set:</p>

<p>This is what my loop looks like right now:</p>

<pre><code> for x in testingSet
    for y in trainingSet
        print numpy.linalg.norm(x-y)
</code></pre>

<p>Where testingSet and trainingSet are numpy arrays where each row of the two sets hold the feature data for one example.</p>

<p>However, it's running extremely slowly, taking more than 10 minutes since my data set is bigger (testing set of 3000, training set of ~10,000). Does this have to do with my method or am I utilizing numPY incorrectly?</p>