cf.Constructs.filter_by_size¶
-
Constructs.
filter_by_size
(*sizes)[source]¶ Select domain axis constructs by size.
New in version 1.7.3.
See also
filter_by_axis
,filter_by_data
,filter_by_key
,filter_by_measure
,filter_by_method
,filter_by_naxes
,filter_by_identity
,filter_by_ncdim
,filter_by_ncvar
,filter_by_property
,filter_by_type
,filters_applied
,inverse_filter
,unfilter
Parameters: - sizes: optional
Select domain axis constructs that have any of the given sizes.
A size is specified by an
int
.If no sizes are provided then all domain axis constructs are selected.
Returns: Constructs
The selected domain axis constructs and their construct keys.
Examples:
Select domain axis constructs that have a size of 1:
>>> d = c.filter_by_size(1)
Select domain axis constructs that have a size of 1 or 96:
>>> d = c.filter_by_size(1, 96)