I'm trying to implement the following code, but keep receiving a syntax error on the last line of the code. However I can't find the mistake. In my view it works exactly the same as the code before. Thanks a lot for any help!
import numpy as np
import matplotlib.pyplot as plt
N=100
D=2
X=np.random.randn(N,D)
#Center first 50 points at (-2,-2)'
X[:50,:] =X[:50,:] - 2 * np.ones((50,D))
#Center last 50 points at 2,2
X=[50:,:]=X[50:,:] + 2 * np.ones((50,D))
X=[50:,:]=X[50:,:]