cf.DomainList¶
- class cf.DomainList(domains=None)[source]¶
An ordered sequence of domain constructs.
A domain list supports the python list-like operations (such as indexing and methods like
append). These methods provide functionality similar to that of a built-in list. The main difference is that when a domain construct element needs to be assessed for equality itsequalsmethod is used, rather than the==operator.Added in version 3.11.0.
Initialisation.
- Parameters:
- domains: (sequence of)
Domain, optional Create a new list with these domain constructs.
- domains: (sequence of)
Selecting¶
Select elements by their metadata constructs. |
|
Select list elements constructs by identity. |
|
Select list elements by netCDF variable name. |
|
Select list elements by property. |
|
Select list elements by the number of domain axis constructs. |
|
Alias of |
|
Alias for |
Comparison¶
Whether two lists are the same. |
xarray¶
Methods
Convert the list elements to an |
Miscellaneous¶
Close all files referenced by each construct in the list. |
|
Return a deep copy. |
Aliases¶
Alias of |
|
Alias for |
List-like operations¶
These methods provide functionality identical to that of a Python
list, with one exception:
When a field construct element needs to be assessed for equality, its
equalsmethod is used, rather than the==operator. This affects thecount,index,remove,__contains__,__eq__and__ne__methods.
For example
>>> dl.count(x)
is equivalent to
>>> sum(d.equals(x) for d in dl)
Append object to the end of the list. |
|
Remove all items from list. |
|
Return number of occurrences of value. |
|
Extend list by appending elements from the iterable. |
|
Return first index of value. |
|
Insert object before index. |
|
Remove and return item at index (default last). |
|
Remove first occurrence of value. |
|
Reverse IN PLACE. |
|
Sort of the list in place. |
|
The binary arithmetic operation |
|
Called to implement membership test operators. |
|
The rich comparison operator |
|
Return self>=value. |
|
Called to implement evaluation of f[index] |
|
Called to implement evaluation of f[i:j] |
|
Return self>value. |
|
Implement iter(self). |
|
Implement self+=value. |
|
Implement self*=value. |
|
Return self<=value. |
|
Return len(self). |
|
Return self<value. |
|
The binary arithmetic operation |
|
The rich comparison operator |
|
Called by the |
|
Return value*self. |
|
Set self[key] to value. |
|
Called by the |
Special methods¶
Alias for |
|
Called by the |