numpy/numpy — pull request #211 by efiring (2012-02-19 08:16:40+00:00)
Title: ENH: add angle() function to ma

Working with a complex dtype in masked arrays, I keep tripping over the lack of ma.angle as a companion to ma.absolute. Using np.angle is not adequate because it does not preserve the mask. This pull request adds an angle function and includes tests for its use with and without its optional kwarg.

I suspect it was originally missed because in numpy, angle is not a ufunc but is instead a function in lib/function_base. As far as I can see, however, it can be handled in ma using the _MaskedUnaryOperation class, so that is what I did.