SciTools/iris — pull request #905 by esc24 (2014-01-03 10:44:39+00:00)
Title: Fixed iris.util.array_equal to avoid issues with fully masked arrays

The following fails on upstream/master:
```python
>>> import iris
>>> cube = iris.load_cube(iris.sample_data_path('space_weather.nc'), 'electron density')
>>> res = cube + cube
```
producing
```ValueError: This operation cannot be performed as there
are differing coordinates (longitude) remaining which cannot be ignored.```
I tracked this down to the fact the longitude coordinate is fully masked (I know masked coords are not supported in Iris, but that can wait for another day). The problem stems from:
```python
>>> lon = cube.coord('longitude')
>>> lon == lon
masked
```
This PR fixes the problem by altering ```iris.util.array_equal``` so it ignores any mask if present. This matches the behaviour of ```numpy.array_equal``` as stated in the existing ```iris.util.array_equal``` docstring. You could argue that we should modify the function to handle masked_arrays properly (that is open to various interpretations), but the chosen approach fixes the problem, is simpler, and reflects numpy behaviour.

Note that the change also means that ```iris.util.array_equal``` now matches ```numpy.array_equal``` in other ways too such as handling other types via ```np.asarray()```.