class_docstr: Binary numpy array representation of a mask.
  
  # Arguments
      data: Mask array, with the dimensions: (num_instances, height, width)
      pad_dim: bool
code: def to_erles(self, h, w) -> EncodedRLEs:
      # HACK: force empty annotations to have valid shape
      if len(self.data.shape) == 1:
          return EncodedRLEs(
              mask_utils.encode(
                  np.asfortranarray(
                      self.data[:, None, None].transpose(1, 2, 0)
                  )
              )
          )
      else:
          return EncodedRLEs(
              mask_utils.encode(
                  np.asfortranarray(self.data.transpose(1, 2, 0))
              )
          )
  
imports: from icevision.imports import *
  from icevision.utils import *
  from PIL import Image
label_desc: Use image node_id 6 for calling the MaskArray obj's underlying member method code with example usage: obj.to_erles(h, w) and returns: EncodedRLEs, EncodedRLEs