title: Applying circular mask with periodic boundary conditions in python
body: <p>This question is related to: <a href="https://stackoverflow.com/questions/8647024/how-to-apply-a-disc-shaped-mask-to-a-numpy-array">How to apply a disc shaped mask to a numpy array?</a></p>
  
  <p>From the solution: <a href="https://stackoverflow.com/a/8650741/4484153">https://stackoverflow.com/a/8650741/4484153</a>, is it possible to obtain circular mask in the following manner:</p>
  
  <pre><code>&gt;&gt;&gt; new_arr
  array([[ True,  True,  True,  True,    1.,  1.,  1.,  True],
         [ True,  True,  True,  True,  True,  1., True, True],
         [ True,  True,  True,  True,    1.,  1.,  1.,  True],
         [ True,  True,  True,  True,    1.,  1.,  1.,  True],
         [ 1.,    True,    1.,    1.,    1.,  1.,  1.,  1.  ],
         [ 1.,      1.,    1.,    1.,    1.,  1.,  1.,  1.  ],
         [ 1.,    True,    1.,    1.,    1.,  1.,  1.,  1.  ],
         [ True,  True,  True,  True,    1.,  1.,  1.,  True]])
  </code></pre>
  
  <p>in such a way that the array wraps around its columns and rows?</p>