cf.Data.__contains__¶
-
Data.
__contains__
(value)[source]¶ Membership test operator
in
x.__contains__(y) <==> y in x
Returns True if the value is contained anywhere in the data array. The value may be a
cf.Data
object.Examples:
>>> d = Data([[0.0, 1, 2], [3, 4, 5]], 'm') >>> 4 in d True >>> Data(3) in d True >>> Data([2.5], units='2 m') in d True >>> [[2]] in d True >>> numpy.array([[[2]]]) in d True >>> Data(2, 'seconds') in d False