0

I have two numpy arrays of shape:

x.shape # (50000, 784)
y.shape # (50000,)

Why can't I use:

X_y = np.hstack([X, y])

My desired outcome is to add y as another column to X

X_y.shape # (50000, 785)
cs95
  • 379,657
  • 97
  • 704
  • 746
Wizard
  • 1,533
  • 4
  • 19
  • 32

0 Answers0