code: def to_array(self, ebruptures):
          
          data = []
          for ebr in ebruptures:
              rup = ebr.rupture
              self.cmaker.add_rup_params(rup)
              ruptparams = tuple(getattr(rup, param) for param in self.params)
              point = rup.surface.get_middle_point()
              multi_lons, multi_lats = rup.surface.get_surface_boundaries()
              bounds = ','.join('((%s))' % ','.join(
                  '%.5f %.5f' % (lon, lat) for lon, lat in zip(lons, lats))
                                for lons, lats in zip(multi_lons, multi_lats))
              try:
                  rate = ebr.rupture.occurrence_rate
              except AttributeError:  # for nonparametric sources
                  rate = numpy.nan
              data.append(
                  (ebr.serial, ebr.srcidx, ebr.n_occ, rate,
                   rup.mag, point.x, point.y, point.z, rup.surface.get_strike(),
                   rup.surface.get_dip(), rup.rake,
                   'MULTIPOLYGON(%s)' % decode(bounds)) + ruptparams)
          return numpy.array(data, self.dt)
docs: Convert a list of ebruptures into an array of dtype RuptureRata.dt