code: def _initial_voltage(self, buses, generators):
          
          Vm = array([bus.v_magnitude for bus in buses])
  
          # Initial bus voltage angles in radians.
          Va = array([bus.v_angle * (pi / 180.0) for bus in buses])
  
          V = Vm * exp(1j * Va)
  
          # Get generator set points.
          for g in generators:
              i = g.bus._i
              V[i] = g.v_magnitude / abs(V[i]) * V[i]
  
          return V
docs: Returns the initial vector of complex bus voltages.
  
          The bus voltage vector contains the set point for generator
          (including ref bus) buses, and the reference angle of the swing
          bus, as well as an initial guess for remaining magnitudes and
          angles.