numpy/numpy — pull request #3404 by tomyun (2013-06-06 02:31:55+00:00)
Title: ma.empty/ones/zeros_like to copy mask properly

As reported in #3145 and #2572, `ma.empty_like` does not copy, but merely assigns a reference to the original mask, leading to undesirable results.

This patch makes `numpy.ma.empty_like()` to work properly, in addition to newly introduced `numpy.ma.ones_like()` and `numpy.ma.zeros_like()`.

However, `numpy.empty_like()` and siblings still do not handle masks correctly. This could be a work demanding more lower-level changes.