title: How to print a numpy array as a string of the format (1 2) (3 4) (5 6)?
body: <p>I have a numpy array such as follows:</p>
  
  <pre><code>[[181  2]
   [  3 45]
   [  5  6]]
  </code></pre>
  
  <p>However, I'm required to print it as this new format:</p>
  
  <pre><code>(181 2) (3 45) (5 6)
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>' '.join(map(str, my_arr)).replace('[','(').replace(']',')')
  </code></pre>
  
  <p>However, due to the whitespace in the original numpy array, the map includes this whitespace so that my result is:</p>
  
  <pre><code>(181  2) (  3 45) (  5  6)
  </code></pre>
  
  <p>Which includes the original whitespace. Unfortunately, this is an unacceptable format for my purposes, but I cannot figure out a solution.</p>
  
  <p>I have also tried flattening the array first and then converting it to a string of numbers of the following format:</p>
  
  <pre><code>181 2 3 45 5 6
  </code></pre>
  
  <p>But, from here I wouldn't know how to insert ( and ) characters for every pair of numbers to get the required format above?</p>