PR-366 style changes

I did some git things to apply @rgommers's suggestions to @jtravs's PR https://github.com/scipy/scipy/pull/366, but I don't know git very well.