def isarray(o):
    """Checks whether or nor an object is an array.

    Parameters
    ----------
    o : object
        Some object.

    Returns
    -------
    bool
        Indicates whether or not the object is an array.

    Examples
    --------

    >>> isarray([1, 2, 3])
    True
    >>> isarray('text')
    False

    """
    return not isinstance(o, str) and hasattr(o, '__getitem__') and hasattr(o,
        '__iter__')
