cf.Field.subset

Field.subset(*args, **kwargs)

Return the instance if it matches the given conditions.

Equivalent to:

def subset(f, *args, **kwargs):
    if f.match(*args, **kwargs):
        return f
    raise ValueError('')
Parameters :
args, kwargs :

As for the match method.

Returns :
out :

The variable as an object identity, if it matches the given conditions.

Raises :
ValueError :

If the variable does not match the conditions.

Previous topic

cf.Field.squeeze

Next topic

cf.Field.subspace

This Page