is_ivy_container#

ivy.is_ivy_container(x, /)[source]#

Determine whether the input x is an Ivy Container.

Parameters:

x (Any) – The input to check

Return type:

bool

Returns:

ret – Boolean, whether or not x is an ivy container.

Examples

>>> x = ivy.Container()
>>> print(ivy.is_ivy_container(x))
True
>>> x = [2, 3]
>>> print(ivy.is_ivy_container(x))
False
Array.is_ivy_container(self)[source]#

ivy.Array instance method variant of ivy.is_ivy_container. This method simply wraps the function, and so the docstring for ivy.is_ivy_container also applies to this method with minimal changes.

Parameters:

self (Array) – The input to check

Return type:

bool

Returns:

ret – Boolean, whether or not x is an ivy container.

Examples

>>> x = ivy.array([0, 1, 2])
>>> print(x.is_ivy_container())
False