SciTools/iris — pull request #796 by pp-mo (2013-10-14 13:53:15+00:00)
Title: Support 1-D array attributes.  Moved some results files.

Although netcdf allows for attributes to be 1-D arrays, some Iris code would choke on that because the equality tests for numpy arrays do not produce simple booleans (i.e. ```a == b``` is not a truth value, but an array of them).
Simple examples :
```
>>> c1 = iris.cube.Cube([])
>>> c2 = c.copy()
>>> c1.attributes['a'] = np.array([1,2,3])
>>> c2.attributes['a'] = np.array([1,2,5])
>>> c1.is_compatible(c2)
Traceback (most recent call last):
File "", line 1, in
File "/home/h05/itpp/git/iris/iris_main/lib/iris/cube.py", line 674, in is_compatible
if self.attributes[key] != other.attributes[key]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
>>>
>>> iris.util.describe_diff(c1, c2)
Traceback (most recent call last):
File "", line 1, in
File "/home/h05/itpp/git/iris/iris_main/lib/iris/util.py", line 230, in describe_diff
if cube_a.is_compatible(cube_b):
File "/home/h05/itpp/git/iris/iris_main/lib/iris/cube.py", line 674, in is_compatible
if self.attributes[key] != other.attributes[key]:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
>>>
```

Following a global code search, I identified and fixed 3 places where this seems to act, and extended the related test routines.