Sklearn train_test_split() error: Found input variables with inconsistent numbers of samples
You need the shape of your training data to be (num_samples, num_features) or in your case (10000000, 2). An easy way to fix this is to transpose X before feeding it to the train test split:

X_train, X_test, y_train, y_test = train_test_split(X.T, Y, test_size=0.2, random_state=0)
regr.fit(X_train, y_train)  # &lt;-- also 'y_train' not 'Y_train' here