cf.Field.unique

Field.unique

The unique elements of the array.

Returns a one dimensional cf.Data object.

Examples:
>>> 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.unique.array
[1, 2, 4]

Previous topic

cf.Field.subspace

Next topic

cf.Field.Units

This Page