cf.Variable.unique

Variable.unique()[source]

The unique elements of the data array.

Examples 1:
>>> f.unique()
Returns:
out: cf.Data

Returns the unique data array values in a one dimensional cf.Data object.

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