code: def _dim(Pot):
      
      from galpy.potential import planarPotential, linearPotential
      if isinstance(Pot,list):
          return nu.amin(nu.array([_dim(p) for p in Pot],dtype='int'))
      elif isinstance(Pot,(Potential,planarPotential,linearPotential,
                           DissipativeForce)):
          return Pot.dim
docs: NAME:                                                                       
         _dim                                                                                
      PURPOSE:
  
         Determine the dimensionality of this potential
  
      INPUT:
  
         Pot - Potential instance or list of such instances
  
      OUTPUT:
  
         Minimum of the dimensionality of all potentials if list; otherwise Pot.dim
  
      HISTORY:
  
         2016-04-19 - Written - Bovy (UofT)