title: numpy.ndarray: converting to a "normal" class
body: <p>[Python 3]</p>
  
  <p>I like <code>ndarray</code> but I find it annoying to use.</p>
  
  <p>Here's one problem I face. I want to write <code>class Array</code> that will inherit much of the functionality of ndarray, but has only one way to be instantiated: as a zero-filled array of a certain size. I was hoping to write:</p>
  
  <pre><code>class Array(numpy.ndarray):
    def __init__(size):
      # What do here?
  </code></pre>
  
  <p>I'd like to call <code>super().__init__</code> with some parameters to create a zero-filled array, but it won't work since <code>ndarray</code> uses a global function <code>numpy.zeros</code> (rather than a constructor) to create a zero-filled array.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>Why does ndarray use global (module) functions instead of constructors in many cases? It is a big annoyance if I'm trying to reuse them in an object-oriented setting.</p></li>
  <li><p>What's the best way to define <code>class Array</code> that I need? Should I just manually populate <code>ndarray</code> with zeroes, or is there any way to reuse the <code>zeros</code> function?</p></li>
  </ol>