def _is_arraylike(x):
 return (hasattr(x, '__len__') or hasattr(x, 'shape') or hasattr(x, '__array__'))

def _is_arraylike ( x ) : return ( hasattr ( x , '__len__' ) or hasattr ( x , 'shape' ) or hasattr ( x , '__array__' ) )
returns whether the input is array-like .