cf.CoordinateList

class cf.CoordinateList(sequence=())[source]

Bases: cf.variablelist.VariableList

An ordered sequence of coordinates stored in a list-like object.

In some contexts, whether an object is a coordinate or a coordinate list is not known and does not matter. So to avoid ungainly type testing, some aspects of the CoordinateList interface are shared by a coordinate and vice versa.

Any attribute or method belonging to a coordinate may be used on a coordinate list and will be applied independently to each element.

Just as it is straight forward to iterate over the coordinates in a coordinate list, a coordinate will behave like a single element coordinate list in iterative and indexing contexts.

Initialization

Parameters :
sequence : iterable, optional

Define a new list with these elements.

CoordinateList attributes

subspace Subspace each variable in the list, returning a new list of variables.

CoordinateList methods

append
copy Return a deep copy.
count Return the number of occurrences of a given value.
delprop Delete a CF property from each element of the list.
dump Return a string containing the full descriptions of each variable in
equals True if two instances are equal, False otherwise.
extend
getprop Return a built-in list of a CF properties from each element.
hasprop Return a built-in list describing whether each element has a CF
index Return the first index of a given value.
insert Insert an object before the given index in place.
match Return a list of booleans showing which elements match the given conditions.
name Return a built-in list of the names of each element of the list of
override_units Override the each element’s data array units in place.
pop
remove
reverse
select Return the elements which match the given conditions.
set_equals True if two instances are set-wise equal, False otherwise.
setprop Set a CF property on each element of the list.
sort Sort the elements in place.

Table Of Contents

Previous topic

cf.Comparison.evaluate

Next topic

cf.CoordinateList.subspace

This Page