This is not an issue per se. There is a more convenient and natural way of single-element array slicing in NumPy. Instead of : `lr.predict(X_test_std[0, :].reshape(1, -1)) ` We can do : `lr.predict(X_test_std[:1, :]) `