title: creating numpy array with coordinates of vertices of N-dimensional cube
body: <p>What could be an efficient way of creating numpy array containing the coordinates of vertices of the N-dimensional cube centered at origin of coordinates, given the dimension <code>N</code>.</p>
  
  <p>For example, for <code>N=1</code> it should return <code>np.array([[1],[-1]])</code></p>
  
  <p>For <code>N=2</code> it should return <code>np.array([[1,1],[1,-1],[-1,1],[-1,-1]])</code></p>
  
  <p>For <code>N=3</code>: <code>np.array([[1,1,1],[1,1,-1],[1,-1,1],[1,-1,-1],[-1,1,1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]])</code></p>