SciTools/iris — pull request #759 by rhattersley (2013-09-11 13:16:36+00:00)
Title: Fix masked npy reference file creation.

Testing a Cube with `assertCMLApproxData` or `assertCubeDataAlmostEqual` will result in the automatic creation of a reference `.npy` file if one does not already exist.

This PR fixes a bug in the creation of the reference file which occurs when the Cube contains a masked array. Previously the `data` component of the reference file was erroneously set to the *scalar* fill value, instead of the filled version of the full data array.

In addition, the PR avoids modifying the Cube data during the assertion checks. Fortunately no existing tests rely on the previous side-effect so none have needed to be fixed.