def assign(value, index, arr):
    """Fake functional numpy assignment

    Just to make things easier for function pipelines

    Args:
      value: the value to assing
      index: the index
      arr: the array

    Returns:
      Not a new array, but the same array updated

    >>> a = np.arange(6).reshape((2, 3))
    >>> assign(1, (slice(None), 2), a)
    array([[0, 1, 1],
           [3, 4, 1]])

    """
    arr[index] = value
    return arr