def _infer_x_for_line(y):
    """
    Infers the x for a line if no x is provided.
    """
    array_shape = shape(y)

    if len(array_shape) == 0:
        return []
    if len(array_shape) == 1:
        return arange(array_shape[0])
    if len(array_shape) > 1:
        return arange(array_shape[1])