astropy/astropy — pull request #2900 by hamogu (2014-08-27 19:21:32+00:00)
Title: fitting with weights does not work

I follow the example here:
http://astropy.readthedocs.org/en/latest/modeling/index.html#simple-1-d-model-fitting
up to
```
In [54]: g = fit_g(g_init, x, y)

In [55]: g
Out[55]:
```
Now, I add simple weights, where each point has a weight of one, so I expect the same result, but instead I find:
```
In [56]: g = fit_g(g_init, x, y, weights=np.ones_like(x))

In [57]: g
Out[57]:
```

(In practice, I have weights that are different for every point, but if "all weights are equal" does not work, then that's not going to work either.)

@embray