cf.Data.get_deterministic_name¶
- Data.get_deterministic_name()[source]¶
Get the deterministic name for the data.
If there is a deterministic name then, in some sense, the data may be assumed to be equal to that of another
Dataobject with the same deterministic name. This measure of equality is different to that applied by theequalsmethod in that:Numerical tolerance is not accounted for.
NaN and inf values are considered equal.
Warning
Two
Dataobjects that are considered equal by theirequalsmethods could have different deterministic names, and twoDataobjects that are considered unequal by theirequalsmethods could have the same deterministic names.Performance
Ascertaining a measure of equality via deterministic names does not require the Dask array to be computed so is, in general, much faster than using the
equalsmethod.Added in version (cfdm): 1.11.2.0
See also
- Returns:
strThe deterministic name.
Examples
>>> d = cf.Data([1, 2, 3], 'm') >>> d.has_deterministic_name() True >>> d.get_deterministic_name() '6380dd3674fbf10d30561484b084e9b3' >>> d1 = cf.Data([1, 2, 3], 'metre') >>> d1.get_deterministic_name() '6380dd3674fbf10d30561484b084e9b3' >>> d1.get_deterministic_name() == d.get_deterministic_name() True >>> d1.equals(d) True
>>> e = d + 1 - 1 >>> e.get_deterministic_name() '0b83ada62d4b014bae83c3de1c1d3a80' >>> e.get_deterministic_name() == d.get_deterministic_name() False >>> e.equals(d) True