cdms2.axis

isSubsetVector(vec1, vec2, tol)[source]

Checks if vec1 is a subset of vec2.

Parameters
vec1(cdms2.TransientAxis, cdms2.FileAxis, numpy.ndarray)

Subset data.

vec2(cdms2.TransientAxis, cdms2.FileAxis, numpy.ndarray)

Superset data.

tolfloat

Tolerance used when checking for subset.

Returns
(bool/int), int

First value of True denotes vec1 is a subset of vec2. A value of 0 or False denotes the opposite.

Second value is the starting index of vec1 in vec2 if it is a subset.