astropy/astropy — pull request #2652 by adonath (2014-06-23 08:35:04+00:00)
Title: Fixed kernel multiplication with  numpy floats #2174

This PR fixes the multiplication of kernels with numpy floats. The bug was not easy to spot. The problem was that the `__rmul__` method of the kernel was not called, because the kernel has an `__array__` method implemented, which was used for the multiplication with numpy floats from the left. This behaviour is fixed now, by additionally implementing the `__array_wrap__` method, which checks for the context of the multiplication. Furthermore I added some regression tests.