def METHOD_NAME():
    data = np.array([[], []])
    with pytest.raises(ValueError):
        EPSFModel(data)
    data = np.ones((5, 5), dtype=float)
    data[2, 2] = np.inf
    with pytest.raises(ValueError, match='must be finite'):
        EPSFModel(data)
    data[2, 2] = np.nan
    with pytest.raises(ValueError, match='must be finite'):
        EPSFModel(data, flux=None)
    data[2, 2] = 1
    for oversampling in [-1, [-2, 4], (1, 4, 8), ((1, 2), (3, 4)),
                         np.ones((2, 2, 2)), 2.1, np.nan, (1, np.inf)]:
        with pytest.raises(ValueError):
            EPSFModel(data, oversampling=oversampling)
    origin = (1, 2, 3)
    with pytest.raises(TypeError):
        EPSFModel(data, origin=origin)