title: Strange class initialization in Python
body: <p>In the python library <a href="https://github.com/sam-cox/pytides" rel="nofollow noreferrer">pytides</a>, I came across a strange method to <strong>initialize</strong> a class (the <a href="https://github.com/sam-cox/pytides/blob/master/pytides/tide.py" rel="nofollow noreferrer">Tide</a> class and its <a href="https://github.com/sam-cox/pytides/wiki/How-to-use-the-NOAA&#39;s-published-Harmonic-Constituents-in-Python-with-Pytides" rel="nofollow noreferrer">initialization </a>).
  I reproduced below a simplified version of the code :</p>
  
  <pre><code>import numpy as np
  
  class Foo(object):
      def __init__(self,x,y):
          self.x = x
          self.y = y
  
  class Foobar(object):
      dtype = np.dtype([('fooObj', object),
                        ('A', float),
                        ('B', float)])
  
      def __init__(self,model):
          '''model: an ndarray of type Foobar.dtype '''
          self.model = model
  
  
  # initialize a Foobar object
  myFoos = [Foo(4,3),Foo(4,9),Foo(0,2)]
  A = [2,3,4]
  B = [8,9,0]
  model = np.zeros(len(myFoos), dtype = Foobar.dtype)
  model['fooObj'] = myFoos     #what is that?!?
  model['A'] = A
  model['B'] = B
  myFoobar = Foobar(model=model)
  </code></pre>
  
  <p>As I understand, the dtype variable in Foobar is a global variable, but I don't understand what's the point to have it. Is it just here to provide a convenient way to initialize Foobar? Moreover the Foobar class needs an array of Foobar.dtype at construction, is not a sort of cyclic call (which should crash)?</p>