title: len() compared with __len__ on numpy array
body: <p>What is going on here? How can I check that <code>a</code> has length? </p>
  
  <pre><code>&gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; a = np.array(3)
  &gt;&gt;&gt; hasattr(a , '__len__')
  True
  &gt;&gt;&gt; len(a)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: len() of unsized object
  </code></pre>
  
  <p>Here, python considers <code>a</code> to not have length:</p>
  
  <pre><code>&gt;&gt;&gt;a.shape
  ()
  </code></pre>
  
  <p>I am using python 2.7.3 and  numpy 1.8.0.</p>
  
  <p>Thanks.</p>