title: How to make a matrix with a size of 2 cells?
body: <p>How to make a matrix with a size of 2 cells?</p>
  <p>I need a matrix like a chessboard but with two cells in one place</p>
  <p>the matrix should have size n X m, cells size 2 X 2
  I wrote this code:
  [In]:</p>
  <pre><code>def mat(n, m):
      sq = np.zeros((n, m))
      sq[::2, 1::2] = 1
      sq[1::2, ::2] = 1
      a = str(sq).replace('.', '')
      print(a)
  mat(10, 10)
  
  [Out]:
  
   [0 1 0 1 0 1 0 1 0 1]
   [1 0 1 0 1 0 1 0 1 0]
   [0 1 0 1 0 1 0 1 0 1]
   [1 0 1 0 1 0 1 0 1 0]
   [0 1 0 1 0 1 0 1 0 1]
   [1 0 1 0 1 0 1 0 1 0]
   [0 1 0 1 0 1 0 1 0 1]
   [1 0 1 0 1 0 1 0 1 0]
  </code></pre>
  <p>but I need it like this:</p>
  <pre><code> [0 0 1 1 0 0 1 1 0 0]
   [0 0 1 1 0 0 1 1 0 0]
   [1 1 0 0 1 1 0 0 1 1]
   [1 1 0 0 1 1 0 0 1 1]
   [0 0 1 1 0 0 1 1 0 0]
   [0 0 1 1 0 0 1 1 0 0]
   [1 1 0 0 1 1 0 0 1 1]
   [1 1 0 0 1 1 0 0 1 1]
   [0 0 1 1 0 0 1 1 0 0]
   [0 0 1 1 0 0 1 1 0 0]
  </code></pre>