code: def gdaldem_mem_ma(ma, ds=None, res=None, extent=None, srs=None, processing='hillshade', returnma=False, computeEdges=False):
      
      if ds is None:
          ds = mem_ds(res, extent, srs=None, dtype=gdal.GDT_Float32)
      else:
          ds = mem_ds_copy(ds)
      b = ds.GetRasterBand(1)
      b.WriteArray(ma)
      out = gdaldem_mem_ds(ds, processing=processing, returnma=returnma)
      return out
docs: Wrapper to allow gdaldem calculations for arbitrary NumPy masked array input
      Untested, work in progress placeholder
      Should only need to specify res, can caluclate local gt, cartesian srs