docs: def asarray(self, file=None, out=None, **kwargs):
          """Read image data from files and return as numpy array.
  
          The kwargs parameters are passed to the imread function.
  
          Raise IndexError or ValueError if image shapes do not match.
  
          """
          if file is not None:
              if isinstance(file, int):
                  return self.imread(self.files[file], **kwargs)
              return self.imread(file, **kwargs)
  
          im = self.imread(self.files[0], **kwargs)
          shape = self.shape + im.shape
          result = create_output(out, shape, dtype=im.dtype)
          result = result.reshape(-1, *im.shape)
          for index, fname in zip(self._indices, self.files):
              index = [i-j for i, j in zip(index, self._startindex)]
              index = numpy.ravel_multi_index(index, self.shape)
              im = self.imread(fname, **kwargs)
              result[index] = im
          result.shape = shape
          return result