title: Apply a pairwise shapely function on two numpy arrays of shapely objects
body: <p>I have two arrays of different length. One contains shapely polygons, the other contains shapely points. I want to run the a_polygon.contains(a_point) shapely function for every possible combination of elements in both arrays.</p>
  
  <p>I was looking at <a href="https://stackoverflow.com/questions/1208118/using-numpy-to-build-an-array-of-all-combinations-of-two-arrays">this post</a> as building a two column matrix with all the possible combinations in the rows could be a desirable intermediate step. But the loop in the 'cartersian(arrays)' function might hinder performance when the input data is huge. </p>
  
  <p>I tried to broadcast one of the arrays, and then applying the shapely function:</p>
  
  <pre><code>Polygons_array[:,newaxis].contains(Points_array)
  </code></pre>
  
  <p>but that, off course, does not work. I am aware of the recently released geopandas library, but it is not an option for my Canopy installation. </p>