def METHOD_NAME(im, yexp):
    """Return data from image object, using the yexp value for shape/type"""
    assert yexp.ndim == 2
    (ny, nx) = yexp.shape
    dtype = yexp.dtype.type
    def proc(s):
        """Convert 'i,j = z' to a tuple (i, j, z)"""
        # no error checking
        toks = s.split('=')
        z = dtype(toks[1])
        toks = toks[0].split(',')
        i = int(toks[0])
        j = int(toks[1])
        return (i, j, z)
    # There is almost-certainly a better way to do this, but for
    # now be explicit (the array sizes are not expected to be large,
    # so it doesn't need to be efficient).
    out = np.zeros((ny, nx), dtype=dtype)
    d = im.xpaget("data image 1 1 {} {} no".format(nx, ny))
    for l in d.split('\n'):
        if l.strip() == '':
            continue
        i, j, z = proc(l)
        out[j - 1, i - 1] = z
    return out