(Minor: if A can have duplicate elements, the choice of complementing the indices and the presence of S2 contains all the elements in A and not in S1 - this is not the same thing.)
, , :
>>> A = np.random.sample(10)
>>> S1, S2 = np.split(np.random.permutation(A), [7])
>>> S1
array([ 0.97128145, 0.5617039 , 0.42625808, 0.39108218, 0.52366291,
0.73606525, 0.5279909 ])
>>> S2
array([ 0.45652426, 0.38622805, 0.99084781])
np.setdiff1d, , S1:
>>> S2 = np.setdiff1d(A, S1)
>>> S2
array([ 0.38622805, 0.45652426, 0.99084781])