title: Load image into `np.array`, force `0..255` RGB values to `0.00..1.00` float values?
body: <p>I want to load a .PNG into a 2D structure of 1D structures of RGB values. For example, a <code>16x16</code> image would be represented as a <code>16x16x3</code> array, where the deepest subarray of length <code>3</code> is the RGB values.</p>
  <p>I know of <code>PIL</code> and <code>numpy</code>, and tried something along the lines of:</p>
  <pre class="lang-py prettyprint-override"><code>from PIL import Image
  from numpy import asarray
  
  # ...
  
  loaded_image = asarray(Image.open('filename.png'))
  </code></pre>
  <p>This does indeed make a <code>16x16x3</code> <code>numpy</code> array, but its of values between <code>0..255</code>. I try to then iterate over them and make them between <code>0.00..1.00</code>:</p>
  <pre class="lang-py prettyprint-override"><code>for row in range(len(loaded_image)):
    for col in range(len(loaded_image[0])):
      for channel in range(len(loaded_image[0][0])):
        loaded_image[row][col][channel] /= 256
  </code></pre>
  <p>But this tells me the array is read-only.</p>
  <p>Is there a better method for this? If it matters, I only really care about greyscale (<code>R = G = B</code>), so it could actually be a <code>16x16x1</code> structure. Is there a method using Python standard libraries?</p>