title: Fast way to Hash Numpy objects for Caching
body: <p>Implementing a system where, when it comes to the heavy mathematical lifting, I want to do as little as possible. </p>
  
  <p>I'm aware that there are issues with memoisation with numpy objects, and as such implemented a lazy-key cache to avoid the whole "Premature optimisation" argument.</p>
  
  <pre><code>def magic(numpyarg,intarg):
      key = str(numpyarg)+str(intarg)
  
      try:
          ret = self._cache[key]
          return ret
      except:
          pass
  
      ... here be dragons ...
      self._cache[key]=value
      return value
  </code></pre>
  
  <p>but since string conversion takes quite a while...</p>
  
  <pre><code>t=timeit.Timer("str(a)","import numpy;a=numpy.random.rand(10,10)")
  t.timeit(number=100000)/100000 = 0.00132s/call
  </code></pre>
  
  <p>What do people suggest as being 'the better way' to do it?</p>