cf.Quantization.has_parameter¶
- Quantization.has_parameter(parameter)[source]¶
Whether a parameter has been set.
Added in version (cfdm): 1.7.0
See also
- Parameters:
- parameter:
str
The name of the parameter.
- Parameter example:
parameter='geoid_name'
- parameter:
- Returns:
bool
True if the parameter has been set, otherwise False.
Examples
>>> f = cf.Quantization() >>> f.set_parameter('earth_radius', 6371007) >>> f.has_parameter('earth_radius') True >>> f.get_parameter('earth_radius') 6371007 >>> f.del_parameter('earth_radius') 6371007 >>> f.has_parameter('earth_radius') False >>> print(f.del_parameter('earth_radius', None)) None >>> print(f.get_parameter('earth_radius', None)) None