def moved_in(nn_orig, nn_proj, i, k):
    """Determine points that are neighbours in the projection space,
    but were not neighbours in the original space.
    nn_orig
      neighbourhood matrix for original data
    nn_proj
      neighbourhood matrix for projection data
    i
      index of the point considered
    k
      size of the neighbourhood considered
    Return a list of indices for points which are 'moved in' to point i
    """

    pp = list(nn_proj[i, 1:k + 1])
    oo = list(nn_orig[i, 1:k + 1])

    for j in oo:
        if (j in oo) and (j in pp):
            pp.remove(j)

    return pp