<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rle_1d(arr):
 """Return the length, starting position and value of consecutive identical values. Parameters arr : sequence Array of values to be parsed. Returns ------- (values, run lengths, start positions) values : np.array The values taken by arr over each run run lengths : np.array The length of each run start position : np.array The starting index of each run Examples -------- (array([1, 2, 3]), array([2, 4, 6]), array([0, 2, 6])) """

    ia = np.asarray(arr)
    n = len(ia)

    if n == 0:
        e = 'run length array empty'
        warn(e)
        return None, None, None

    y = np.array(ia[1:] != ia[:-1])  # pairwise unequal (string safe)
    i = np.append(np.where(y), n - 1)  # must include last element position
    rl = np.diff(np.append(-1, i))  # run lengths
    pos = np.cumsum(np.append(0, rl))[:-1]  # positions
    return ia[i], rl, pos