title: How to merge mesh grid points from two rectangles in python?
body: <p>I need to merge the mesh grids formed at two different (adjoining) rectangles. Following is the pictorial representation of the rectangle:</p>
  <p><a href="https://i.stack.imgur.com/1J1cb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1J1cb.jpg" alt="enter image description here" /></a></p>
  <p>I can create the mesh grids of the individual rectangles. For example for the green rectangle, using the following code snippet, we can create a mesh grid.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>xvalues = np.array([0, 2, 4, 6, 8, 10])
  yvalues = np.array([6, 8, 10, 12])
  x, y = np.meshgrid(xvalues, yvalues)
  positions = np.vstack([x.ravel(), y.ravel()])
  theGridPoints = (np.array(positions)).T</code></pre>
  </div>
  </div>
  </p>
  <p>I can make the grid points for the blue rectangle too. However, I'm unable to join them inside a single object. I tried to join them as the sum of <code>position1</code> and <code>position2</code>. I get the value error on the console as:</p>
  <pre><code>ValueError: operands could not be broadcast together with shapes (.,.) (.,.)
  </code></pre>
  <p>How can I solve it?</p>