title: Maximum allowed value for a numpy data type
body: <p>I am working with numpy arrays of a range of data types (uint8, uint16, int16, etc.). I would like to be able to check whether a number can be represented within the limits of an array for a given datatype. I am imagining something that looks like:</p>
  
  <pre><code>&gt;&gt;&gt; im.dtype
  dtype('uint16')
  &gt;&gt;&gt; dtype_max(im.dtype)
  65535
  &gt;&gt;&gt; dtype_min(im.dtype)
  0
  </code></pre>
  
  <p>Does something like this exist? By the way, I feel like this has to have been asked before, but my search came up empty, and all of the "similar questions" appear to be unrelated.</p>
  
  <p>Edit: Of course, now that I've asked, one of the "related" questions does have the answer. Oops. </p>