cf.DimensionCoordinate.unique

DimensionCoordinate.unique()[source]

The unique elements of the data.

Returns
Data

The unique data array values in a one dimensional Data object.

Examples

>>> print(f.array)
[[4 2 1]
 [1 2 3]]
>>> print(f.unique().array)
[1 2 3 4]
>>> f[1, -1] = cf.masked
>>> print(f.array)
[[4 2 1]
 [1 2 --]]
>>> print(f.unique().array)
[1 2 4]