add unit/integrted tests for dpc

How do you compute the ydada?  If you have a case that is not
round-tripping then something is _very_ wrong.

On Tue Nov 25 2014 at 4:19:19 PM thegreatwall <notifications@github.com>
wrote:

> In skxray/tests/test_dpc.py:
>
> > +             7.30619109 + 9.59495554j]
> > +    rss = dpc._rss_factory(len(ydata))
> > +    res = dpc.dpc_fit(rss, xdata, ydata, start_point, solver)
> > +    assert_array_almost_equal(res, [1.34, 0.23])
> > +
> > +    # Test 2 (succeeded): res = [0.88, 0.28]
> > +    ydata = [0, 0.38340055 - 0.79208839j, 1.17473457 - 1.31057189j,
> > +             2.23675349 - 1.40233156j,  3.38291514 - 0.97277188j,
> > +             4.40000000 + 0.j, 5.07437271 + 1.45915782j,
> > +             5.21909148 + 3.27210698j, 4.69893829 + 5.24228756j,
> > +             3.45060497 + 7.1287955j]
> > +    res = dpc.dpc_fit(rss, xdata, ydata, start_point, solver)
> > +    assert_array_almost_equal(res, [0.88, 0.28])
> > +
> > +    """
> > +    # Test 3 (failed): res = [-0.25595591, -0.27603199]
>
> I think it's the problem of the input data.
>
> I generate xdata and the 2 fitting variables first. Then calculate ydata.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Nikea/scikit-xray/pull/177/files#r20896508>.
>