def is_arraylike(x):
    """
    Determine if `x` is array-like. `x` is index-able if it provides the
    `__len__` and `__getitem__` methods. Note that `__getitem__` should
    accept 1D NumPy integer arrays as an index

    Parameters
    ----------
    x: any
        The value to test for being array-like

    Returns
    -------
    bool
        `True` if array-like, `False` if not
    """
    return hasattr(x, '__len__') and hasattr(x, '__getitem__')