code: def get_rgbarray(self, idx, out=None, order='RGB', image_order=''):
          
          # prepare output array
          shape = idx.shape
          depth = len(order)
  
          if (image_order is not None) and (len(image_order) > 1):
              # indexes contain RGB axis, so omit this
              res_shape = shape[:-1] + (depth, )
          else:
              res_shape = shape + (depth, )
  
          if out is None:
              out = np.empty(res_shape, dtype=self.dtype, order='C')
          else:
              # TODO: assertion check on shape of out
              assert res_shape == out.shape, \
                  RGBMapError("Output array shape %s doesn't match result "
                              "shape %s" % (str(out.shape), str(res_shape)))
  
          res = RGBPlanes(out, order)
  
          # set alpha channel
          if res.hasAlpha:
              aa = res.get_slice('A')
              aa.fill(self.maxc)
  
          idx = self.get_hasharray(idx)
  
          self._get_rgbarray(idx, res, image_order=image_order)
  
          return res
docs: Parameters
          ----------
          idx : index array
  
          out : output array or None
              The output array.  If `None` one of the correct size and depth
              will be created.
  
          order : str
              The order of the color planes in the output array (e.g. "ARGB")
  
          image_order : str or None
              The order of channels if indexes already contain RGB info.