🐛 Bug Report
My cube has a scalar coordinate with a masked point. When I print out the coordinate, it displays the point as masked (i.e. --) as expected, but if I print the whole cube, it displays the underlaying data under the mask.
I have only tested this with scalar coordinates but it may also be applicable to cell measure/ancillary variables.
How To Reproduce
>>> from iris.cube import Cube
>>> from iris.coords import AuxCoord
>>> import numpy.ma as ma
>>> cube = Cube([1])
>>> coord = AuxCoord(ma.masked, 'height')
>>> cube.add_aux_coord(coord)
>>> print(cube.coord('height'))
AuxCoord : height / (unknown)
points: [--]
shape: (1,)
dtype: float64
standard_name: 'height'
>>> print(cube)
unknown / (unknown) (-- : 1)
Scalar coordinates:
height 0.0
In the above you can see that when I just print the height coordinate it is displayed as -- but printing the cube displays it as 0
Expected behaviour
I would expect that printing the above would return:
>>> print(cube)
unknown / (unknown) (-- : 1)
Scalar coordinates:
height --
And the same goes for scalar cell measures and ancillary variables
🐛 Bug Report
My cube has a scalar coordinate with a masked point. When I print out the coordinate, it displays the point as masked (i.e.
--) as expected, but if I print the whole cube, it displays the underlaying data under the mask.I have only tested this with scalar coordinates but it may also be applicable to cell measure/ancillary variables.
How To Reproduce
In the above you can see that when I just print the height coordinate it is displayed as
--but printing the cube displays it as0Expected behaviour
I would expect that printing the above would return:
And the same goes for scalar cell measures and ancillary variables