larray.AxisCollection.isaxis

AxisCollection.isaxis(value) bool[source]

Test if input is an Axis object or the name of an axis contained in self.

Parameters
valueAxis or str

Input axis or string

Returns
bool

True if input is an Axis object or the name of an axis contained in the current AxisCollection instance, False otherwise.

Examples

>>> a = Axis('a=a0,a1')
>>> b = Axis('b=b0,b1')
>>> col = AxisCollection([a, b])
>>> col.isaxis(a)
True
>>> col.isaxis('b')
True
>>> col.isaxis('c')
False