docs: def getscale(self):
          """Obtain the scale values along a dimension.
  
          Args::
  
            no argument
  
          Returns::
  
            list with the scale values; the list length is equal to the
            dimension length; the element type is equal to the dimension
            data type, as set when the 'setdimscale()' method was called.
  
          C library equivalent : SDgetdimscale
                                                    """
  
          # Get dimension info. If data_type is 0, no scale have been set
          # on the dimension.
          status, dim_name, dim_size, data_type, n_attrs = _C.SDdiminfo(self._id)
          _checkErr('getscale', status, 'cannot execute')
          if data_type == 0:
              raise HDF4Error("no scale set on that dimension")
  
          # dim_size is 0 for an unlimited dimension. The actual length is
          # obtained through SDgetinfo.
          if dim_size == 0:
              dim_size = self._sds.info()[2][self._index]
  
          # Get scale values.
          if data_type in [SDC.UCHAR8, SDC.UINT8]:
              buf = _C.array_byte(dim_size)
  
          elif data_type == SDC.INT8:
              buf = _C.array_int8(dim_size)
  
          elif data_type == SDC.INT16:
              buf = _C.array_int16(dim_size)
  
          elif data_type == SDC.UINT16:
              buf = _C.array_uint16(dim_size)
  
          elif data_type == SDC.INT32:
              buf = _C.array_int32(dim_size)
  
          elif data_type == SDC.UINT32:
              buf = _C.array_uint32(dim_size)
  
          elif data_type == SDC.FLOAT32:
              buf = _C.array_float32(dim_size)
  
          elif data_type == SDC.FLOAT64:
              buf = _C.array_float64(dim_size)
  
          else:
              raise HDF4Error("getscale: dimension has an "\
                               "illegal or unsupported type %d" % data_type)
  
          status = _C.SDgetdimscale(self._id, buf)
          _checkErr('getscale', status, 'cannot execute')
          return _array_to_ret(buf, dim_size)