docs: def from_array(cls, array, sids):
          """
          :param array: array of shape (N, L) or (N, L, I)
          :param sids: array of N site IDs
          """
          n_sites = len(sids)
          n = len(array)
          if n_sites != n:
              raise ValueError('Passed %d site IDs, but the array has length %d'
                               % (n_sites, n))
          if len(array.shape) == 2:  # shape (N, L) -> (N, L, 1)
              array = array.reshape(array.shape + (1,))
          self = cls(*array.shape[1:])
          for sid, poes in zip(sids, array):
              self[sid] = ProbabilityCurve(poes)
          return self