title: How to convert from numpy array to file byte object?
body: <p>I read an image file as</p>
  
  <pre><code>with open('abc.jpg', 'rb') as f:
      a = f.read()
  </code></pre>
  
  <p>On the other hand, I use <code>cv2</code> to read the same file</p>
  
  <pre><code>b = cv2.imread('abc.jpg', -1)
  </code></pre>
  
  <p>How to convert <code>b</code> to <code>a</code> directly?</p>
  
  <p>Thanks.</p>